📚 Package Specification Audit Report
Date: 2026-05-03
Total Packages: 22
Packages with Specs: 22
Coverage: 100%
All 22 packages under pkg/ have a README.md specification — full coverage. However, API drift was detected in 4 packages where source code has grown significantly beyond what the specifications document.
Coverage Summary
| Status |
Package |
Source Files |
Spec Lines |
Notes |
| ✅ |
actionpins |
— |
— |
Up to date |
| ✅ |
agentdrain |
— |
— |
Up to date |
| ⚠️ |
cli |
273 |
403 |
API drift: undocumented types/commands |
| ⚠️ |
console |
15 |
791 |
Minor drift: some render funcs |
| ✅ |
constants |
— |
— |
Up to date |
| ✅ |
envutil |
— |
— |
Up to date |
| ✅ |
fileutil |
— |
— |
Up to date |
| ✅ |
gitutil |
— |
— |
Up to date |
| ✅ |
logger |
— |
— |
Up to date |
| ⚠️ |
parser |
41 |
265 |
API drift: InlineSubAgent subsystem undocumented |
| ✅ |
repoutil |
— |
— |
Up to date |
| ✅ |
semverutil |
— |
— |
Up to date |
| ✅ |
sliceutil |
— |
— |
Up to date |
| ✅ |
stats |
— |
— |
Up to date |
| ✅ |
stringutil |
— |
— |
Up to date |
| ✅ |
styles |
— |
— |
Up to date |
| ✅ |
testutil |
— |
— |
Up to date |
| ✅ |
timeutil |
— |
— |
Up to date |
| ✅ |
tty |
— |
— |
Up to date |
| ✅ |
types |
— |
— |
Up to date |
| ✅ |
typeutil |
— |
— |
Up to date |
| ⚠️ |
workflow |
367 |
478 |
API drift: SandboxConfig, MCP Scripts API, GenerateWorkflowHeader undocumented |
🔍 API Drift Details
pkg/workflow — Missing Documented Symbols
Undocumented: Sandbox Subsystem (sandbox.go)
The following exported types from sandbox.go are not documented in pkg/workflow/README.md:
| Symbol |
Kind |
Description |
SandboxType |
type alias |
Sandbox type identifier |
SandboxConfig |
struct |
Top-level sandbox configuration from workflow frontmatter |
AgentSandboxConfig |
struct |
Agent-specific sandbox configuration |
SandboxRuntimeConfig |
struct |
Runtime configuration for sandbox environments |
SRTNetworkConfig |
struct |
Network configuration for SRT sandbox |
SRTFilesystemConfig |
struct |
Filesystem configuration for SRT sandbox |
Undocumented: MCP Scripts API (mcp_scripts_generator.go)
| Symbol |
Kind |
Description |
GenerateMCPScriptsToolsConfig |
func |
Generates MCP Scripts tools configuration |
GenerateMCPScriptsMCPServerScript |
func |
Generates MCP Scripts MCP server script |
GenerateMCPScriptJavaScriptToolScript |
func |
Generates JS tool script |
GenerateMCPScriptShellToolScript |
func |
Generates shell tool script |
GenerateMCPScriptPythonToolScript |
func |
Generates Python tool script |
GenerateMCPScriptGoToolScript |
func |
Generates Go tool script |
HasMCPScripts |
func |
Returns whether MCPScripts is configured |
IsMCPScriptsEnabled |
func |
Returns whether MCPScripts feature is enabled |
Undocumented: Utility Functions
| Symbol |
Source |
Description |
GenerateWorkflowHeader |
header.go |
Generates the YAML header comment block for lock files |
Recommendation: Re-run the spec-extractor workflow for pkg/workflow to capture the sandbox subsystem, MCP Scripts API, and other new additions.
pkg/parser — Missing Documented Symbols
Undocumented: Inline Sub-Agent Subsystem (sub_agent_extractor.go)
| Symbol |
Kind |
Description |
InlineSubAgent |
struct |
Represents an inline sub-agent definition |
ExtractInlineSubAgents |
func |
Extracts inline sub-agents from markdown content |
ValidateInlineSubAgentsFrontmatter |
func |
Validates inline sub-agents in frontmatter |
ValidateInlineSubAgentsInBody |
func |
Validates inline sub-agents in markdown body |
GetEngineSubAgentDir |
func |
Returns the sub-agent directory for an engine |
GetEngineSubAgentExt |
func |
Returns the sub-agent file extension for an engine |
These 6 symbols from the inline sub-agent subsystem are entirely absent from pkg/parser/README.md.
Recommendation: Re-run the spec-extractor workflow for pkg/parser to add the inline sub-agent subsystem documentation.
pkg/cli — Completeness Assessment
The pkg/cli package has 273 non-test source files, making it the largest package. The README covers the core commands well but given the package size, there is likely additional API drift. Key observations:
- Well documented: Core commands (
add, compile, audit, logs, mcp, update, trial, health, checks), key types (AuditData, TrialOptions, ToolGraph, DependencyGraph)
- Potentially undocumented: Deep audit report rendering subsystem (
audit_report_render_*.go, 7 files), codemod schedule machinery (codemod_schedule.go, compile_schedule_calendar.go), and other internal helpers
Recommendation: Run the spec-extractor workflow for pkg/cli to detect any undocumented exported symbols and ensure completeness.
pkg/console — Minor Drift
The pkg/console README is comprehensive (791 lines). The core APIs (FormatFileSize, IsAccessibleMode, FormatNumber, ToRelativePath, RenderStruct) are documented. No critical gaps found — this package appears well-maintained.
📊 Quality Scores
| Package |
Completeness |
Accuracy |
Consistency |
Overall |
workflow |
75% |
90% |
90% |
⚠️ 85% |
cli |
70% |
90% |
85% |
⚠️ 82% |
parser |
80% |
90% |
90% |
⚠️ 87% |
console |
95% |
95% |
95% |
✅ 95% |
| All others |
90%+ |
90%+ |
90%+ |
✅ 90%+ |
Action Items
📚 Next review scheduled for tomorrow. Close this issue once all items are resolved.
References:
📚 Specification review by Package Specification Librarian · ● 5.5M · ◷
📚 Package Specification Audit Report
Date: 2026-05-03
Total Packages: 22
Packages with Specs: 22
Coverage: 100%
Coverage Summary
actionpinsagentdraincliconsoleconstantsenvutilfileutilgitutilloggerparserInlineSubAgentsubsystem undocumentedrepoutilsemverutilsliceutilstatsstringutilstylestestutiltimeutilttytypestypeutilworkflowSandboxConfig, MCP Scripts API,GenerateWorkflowHeaderundocumented🔍 API Drift Details
pkg/workflow — Missing Documented Symbols
Undocumented: Sandbox Subsystem (
sandbox.go)The following exported types from
sandbox.goare not documented inpkg/workflow/README.md:SandboxTypeSandboxConfigAgentSandboxConfigSandboxRuntimeConfigSRTNetworkConfigSRTFilesystemConfigUndocumented: MCP Scripts API (
mcp_scripts_generator.go)GenerateMCPScriptsToolsConfigGenerateMCPScriptsMCPServerScriptGenerateMCPScriptJavaScriptToolScriptGenerateMCPScriptShellToolScriptGenerateMCPScriptPythonToolScriptGenerateMCPScriptGoToolScriptHasMCPScriptsIsMCPScriptsEnabledUndocumented: Utility Functions
GenerateWorkflowHeaderheader.goRecommendation: Re-run the
spec-extractorworkflow forpkg/workflowto capture the sandbox subsystem, MCP Scripts API, and other new additions.pkg/parser — Missing Documented Symbols
Undocumented: Inline Sub-Agent Subsystem (
sub_agent_extractor.go)InlineSubAgentExtractInlineSubAgentsValidateInlineSubAgentsFrontmatterValidateInlineSubAgentsInBodyGetEngineSubAgentDirGetEngineSubAgentExtThese 6 symbols from the inline sub-agent subsystem are entirely absent from
pkg/parser/README.md.Recommendation: Re-run the
spec-extractorworkflow forpkg/parserto add the inline sub-agent subsystem documentation.pkg/cli — Completeness Assessment
The
pkg/clipackage has 273 non-test source files, making it the largest package. The README covers the core commands well but given the package size, there is likely additional API drift. Key observations:add,compile,audit,logs,mcp,update,trial,health,checks), key types (AuditData,TrialOptions,ToolGraph,DependencyGraph)audit_report_render_*.go, 7 files), codemod schedule machinery (codemod_schedule.go,compile_schedule_calendar.go), and other internal helpersRecommendation: Run the
spec-extractorworkflow forpkg/clito detect any undocumented exported symbols and ensure completeness.pkg/console — Minor Drift
The
pkg/consoleREADME is comprehensive (791 lines). The core APIs (FormatFileSize,IsAccessibleMode,FormatNumber,ToRelativePath,RenderStruct) are documented. No critical gaps found — this package appears well-maintained.📊 Quality Scores
workflowcliparserconsoleAction Items
spec-extractorforpkg/workflowto document: Sandbox subsystem (6 types), MCP Scripts API (8 functions),GenerateWorkflowHeaderspec-extractorforpkg/parserto document:InlineSubAgentsubsystem (6 symbols fromsub_agent_extractor.go)spec-extractorforpkg/clito audit completeness of the 273-file packageCloses #<this issue number>(orFixes/Resolves) in the PR descriptionReferences: