Conversation
…orkflows Add three agentic workflows for maintaining Go package specifications: - spec-extractor: Extracts README.md specs from Go packages using copilot engine with cache-memory round-robin (daily, creates PRs) - spec-enforcer: Generates spec-driven test suites using Claude engine with cache-memory round-robin (daily, creates PRs) - spec-librarian: Daily audit of all specs for inconsistencies and staleness (daily, creates issues) All workflows share the 'pkg-specifications' label for common tracking. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1b7312fb-2292-4227-84ea-2d170e3906be Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Remove hardcoded package count in spec-librarian success criteria - Clarify spec-extractor success criteria with dynamic package count - Add SPEC_AMBIGUITY and SPEC_MISMATCH comment conventions to spec-enforcer Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1b7312fb-2292-4227-84ea-2d170e3906be Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
April 13, 2026 20:32
View session
pelikhan
approved these changes
Apr 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds three new agentic workflows (extractor, enforcer, librarian) plus their compiled lockfiles to keep pkg/*/README.md as authoritative package specs and generate spec-derived tests / audits on a daily cadence.
Changes:
- Add
spec-extractorworkflow to round-robin generate/updatepkg/*/README.mdspecifications and open PRs. - Add
spec-enforcerworkflow to generatespec_test.gofiles from README specs and open PRs. - Add
spec-librarianworkflow to audit coverage/staleness/drift across all packages and open a deduped issue when needed.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/spec-extractor.md | New workflow definition for generating/updating package README specifications and creating PRs. |
| .github/workflows/spec-extractor.lock.yml | Compiled workflow for spec-extractor (pinned actions/images, expanded jobs). |
| .github/workflows/spec-enforcer.md | New workflow definition for generating spec-driven tests from README specifications and creating PRs. |
| .github/workflows/spec-enforcer.lock.yml | Compiled workflow for spec-enforcer (pinned actions/images, expanded jobs). |
| .github/workflows/spec-librarian.md | New workflow definition for daily spec audits, drift/staleness checks, and issue creation with deduping. |
| .github/workflows/spec-librarian.lock.yml | Compiled workflow for spec-librarian (pinned actions/images, expanded jobs). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
.github/workflows/spec-librarian.md:142
- The “Exported functions in source” check only matches
func <Name>at the beginning of the line, so it will miss exported methods (e.g.,func (T) Method) which are also part of the public API surface. Consider including receiver methods in the extraction (or using a Go-aware symbol listing via Serena /go doc/go list) so API drift detection is accurate.
# Exported functions in source
grep -h "^func [A-Z]" pkg/<package>/*.go 2>/dev/null | sed 's/(.*//' | sort
.github/workflows/spec-librarian.md:193
- This dependency validation step greps only lines containing the keyword
import, which won’t capture actual imported package paths for multi-line import blocks (it will typically just matchimport (). That makes the dependency graph check unreliable; consider extracting quoted import specs (lines containing"...") or usinggo list/Serena to get the real import set per package.
if [ -f "$dir/README.md" ]; then
echo "=== $pkg ==="
grep -h "import" "$dir"/*.go 2>/dev/null | grep "gh-aw/pkg/" | sort -u
fi
- Files reviewed: 6/6 changed files
- Comments generated: 3
| pkg=$(basename "$dir") | ||
| if [ -f "$dir/README.md" ]; then | ||
| spec_date=$(git log -1 --format=%ci -- "$dir/README.md" 2>/dev/null) | ||
| source_date=$(git log -1 --format=%ci -- "$dir/*.go" 2>/dev/null) |
| ### Step 4: Identify Dependencies | ||
|
|
||
| ```bash | ||
| grep -h "import" pkg/<package>/*.go | grep -v "_test.go" |
Comment on lines
+39
to
+41
| - "head -n * pkg/*/*.go" | ||
| - "cat pkg/*/*.go" | ||
| - "wc -l pkg/*/*.go" |
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.
Three daily workflows to maintain
pkg/*/README.mdas authoritative package specifications. All share thepkg-specificationslabel.spec-extractor.md— Copilot engine. Round-robin 3-4 packages/run via cache-memory. Analyzes exported symbols, doc comments, and dependencies to generate/update README.md specs in W3C style. Creates PRs.spec-enforcer.md— Claude engine. Round-robin 2-3 packages/run via cache-memory. Generatesspec_test.gofiles derived from README.md specifications, not from reading implementation source. UsesSPEC_AMBIGUITY:/SPEC_MISMATCH:comment conventions for documenting gaps. Creates PRs.spec-librarian.md— Copilot engine. Full daily audit across all packages. Checks coverage gaps, staleness (source newer than spec by >7 days), API drift (undocumented/phantom symbols), cross-package terminology conflicts, and dependency graph accuracy. Creates issues withskip-if-matchdedup.