You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/spec-librarian.md
+9-124Lines changed: 9 additions & 124 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,24 +92,23 @@ Perform a comprehensive daily audit of all Go package specifications under `pkg/
92
92
93
93
**🚨 MANDATORY: You MUST call either `noop` or `create_issue` before exiting, regardless of outcome.**
94
94
This workflow has `strict: true` and `create-issue` as its only write safe output. If no issue is needed, call `noop` as your LAST action before finishing.
95
+
Do not use background sub-agents for this workflow. Run checks directly with shell commands, keep intermediate output concise, and reserve enough time to emit a final safe output.
95
96
96
97
## Phase 1: Inventory All Packages and Specifications
97
98
98
-
Use the `coverage-checker` agent. It returns JSON with`total_packages`, `packages_with_specs`,
99
-
`coverage_pct`, `all_pkgs`, `has_spec`, and `missing_specs`. Use this output for all subsequent phases.
99
+
Run direct shell commands to compute`total_packages`, `packages_with_specs`,
100
+
`coverage_pct`, `all_pkgs`, `has_spec`, and `missing_specs`. Use these values for all subsequent phases.
100
101
101
102
## Phase 2: Staleness Detection
102
103
103
-
Use the `staleness-detector` agent, passing the `has_spec` list from Phase 1.
104
-
It returns stale packages with `spec_date`, `source_date`, `days_behind`, `undocumented_funcs`,
105
-
and `phantom_funcs`.
104
+
Run direct shell commands for each package in `has_spec` to detect stale specifications with
105
+
`spec_date`, `source_date`, `days_behind`, `undocumented_funcs`, and `phantom_funcs`.
106
106
107
107
## Phase 3: Cross-Package Consistency Checks
108
108
109
-
Use the `consistency-checker` agent to validate import paths, naming conventions,
110
-
and dependency graphs. It returns `import_issues`, `naming_issues`, and `dependency_issues`.
111
-
Perform terminology consistency analysis (Check 3) yourself using the spec content
112
-
collected in Phase 1.
109
+
Run direct shell commands to validate import paths, naming conventions, and dependency graphs.
110
+
Produce `import_issues`, `naming_issues`, and `dependency_issues`.
111
+
Perform terminology consistency analysis (Check 3) using the spec content collected in Phase 1.
113
112
114
113
### Check 3: Terminology Consistency
115
114
@@ -142,7 +141,7 @@ For each specification, assess quality on these dimensions:
142
141
Call the `noop` safe-output tool:
143
142
144
143
```json
145
-
{"noop": {"message":"All package specifications are consistent and up-to-date. Coverage: N/20 packages. No issues found."}}
144
+
{"message":"All package specifications are consistent and up-to-date. Coverage: N/20 packages. No issues found."}
146
145
```
147
146
148
147
### If issues ARE found
@@ -267,117 +266,3 @@ The following specifications are outdated:
267
266
- ✅ Issue created if problems found, or noop if all is well
268
267
269
268
{{#runtime-import shared/noop-reminder.md}}
270
-
271
-
## agent: `coverage-checker`
272
-
---
273
-
model: small
274
-
description: Lists all pkg/ packages and reports README.md coverage metrics as JSON
275
-
---
276
-
You are a coverage auditor for a Go repository. Your task is to enumerate all packages
277
-
under `pkg/` and check which ones have a `README.md` specification file.
278
-
279
-
Run the following commands and collect the results:
280
-
281
-
```bash
282
-
find pkg/* -maxdepth 0 -type d | sort
283
-
```
284
-
285
-
```bash
286
-
find pkg -name 'README.md' -type f | sort
287
-
```
288
-
289
-
From the output, compute:
290
-
-`total_packages`: count of directories under `pkg/`
291
-
-`packages_with_specs`: count of `pkg/*/README.md` files found
292
-
-`coverage_pct`: `packages_with_specs / total_packages * 100` (rounded to one decimal)
293
-
-`all_pkgs`: sorted list of all package names (basename only)
294
-
-`has_spec`: sorted list of package names that have a `README.md`
295
-
-`missing_specs`: sorted list of package names that are missing a `README.md`
296
-
297
-
Return ONLY a JSON object with these six fields and no additional text.
298
-
299
-
## agent: `staleness-detector`
300
-
---
301
-
model: small
302
-
description: Compares git timestamps for each package's source vs spec and detects API drift
303
-
---
304
-
You are a staleness detector for Go package specifications. You receive a list of packages
305
-
that have a `README.md` (`has_spec`). For each package, determine whether its specification
0 commit comments