Repository navigation
Conversation
…lowSpec, sub-agent helpers Derived from pkg/parser/README.md. Adds TestSpec_PublicAPI_ExtractMarkdownSection, TestSpec_PublicAPI_IsWorkflowSpec, TestSpec_InlineSubAgents_GetEngineSubAgentDir, and TestSpec_InlineSubAgents_GetEngineSubAgentExt. Also records SPEC_MISMATCH note on ExtractFrontmatterFromContent (README example uses MarkdownBody, actual struct field is Markdown). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pelikhan
deleted the
spec-enforcer-logger-parser-repoutil-20260513-e716c3165fb441d6
branch
May 13, 2026 13:39
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Specification Test Enforcement
This PR refreshes specification-driven tests for the next packages in the round-robin rotation. All tests are derived from each package's
README.md— implementation source was only consulted to confirm exact function signatures and observable contract.loggerparserrepoutilTest Derivation
All tests are derived from README.md specifications, not from implementation source code.
pkg/logger/spec_test.go— already covers the documented surface (New,Printf,Print,Enabled,NewSlogHandler,NewSlogLoggerWithHandler) plus the documented design decisions (enabled-state-at-construction, stderr output destination, thread-safety). The README does not document any additional public functions. No changes needed.pkg/parser/spec_test.go— expanded coverage to four additional documented functions and recorded a new spec mismatch:TestSpec_PublicAPI_ExtractMarkdownSection: validates documented behavior — extracts a named##section from markdown; returns an error when the section is missing; stops at the next same-or-higher level heading.TestSpec_PublicAPI_IsWorkflowSpec: validates documented behavior —owner/repo/path[@ref]is a workflowspec; local relative paths (.github/...),shared/prefixed paths, and single-segment paths are not.TestSpec_InlineSubAgents_GetEngineSubAgentDir: validates documented mapping —claude→.claude/agents,codex→.codex/agents,gemini→.gemini/agents, others →.github/agents.TestSpec_InlineSubAgents_GetEngineSubAgentExt: validates documented mapping —claude/codex/gemini→.md, others →.agent.md.TestSpec_PublicAPI_ExtractFrontmatterFromContent: added aSPEC_MISMATCHnote — the README usage example readsresult.MarkdownBody, but the actualFrontmatterResultfield isMarkdown. The observable contract is unchanged; the test continues to targetMarkdown.pkg/repoutil/spec_test.go— already covers the single documented function (SplitRepoSlug) including all documented error cases (missing separator, empty owner, empty repo, too many separators). No changes needed.Spec-Implementation Mismatches
New mismatch recorded:
parser.FrontmatterResult.MarkdownBody— README usage example referencesresult.MarkdownBody, but the actual struct field is namedMarkdown. Either the README example should be corrected toresult.Markdownor the field could be renamed for consistency.Preserved mismatches from previous runs apply to packages not touched in this run (notably
gitutil.FindGitRoot).Round-Robin State
Auto-generated by Package Specification Enforcer workflow §25798013859