Skip to content

[rig-tasks] Add 10 rig samples — 2026-08-03 - #343

Merged
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-03-8ca4be6d61009ed4
Aug 4, 2026
Merged

[rig-tasks] Add 10 rig samples — 2026-08-03#343
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-03-8ca4be6d61009ed4

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Added 10 new rig sample files to skills/rig/samples/.

# File Description Typecheck
1 361-stale-branch-detector-v3.md Stale branch detector using git for-each-ref + enum classification tool pass
2 362-license-header-checker-v3.md License header checker with async file read tool + input schema pass
3 363-yaml-config-diff-v3.md YAML config diff using two sync tools + p.readInput for caller paths pass
4 364-monorepo-workspace-lister-v3.md Monorepo workspace lister with async JSON.parse tool pass
5 365-gh-actions-timing-analyzer-v2.md GH Actions timing analyzer with async workflow analysis tool pass
6 366-binary-file-detector-v2.md Binary file detector sampling 8KB via node:fs/promises open pass
7 367-lockfile-integrity-checker.md Lockfile integrity checker with s.optional tool params + repair addon pass
8 368-graphql-schema-type-extractor.md GraphQL schema type extractor with s.record root output pass
9 369-path-structure-analyzer.md Path structure analyzer using node:path basename classification pass
10 370-ci-log-error-classifier.md CI log error classifier with p.readInput + repair addon pass

Typecheck failures

None — all 10 tasks passed typecheck on the first attempt.

Tasks run

  • (reused) Stale branch detector: p.bash git for-each-ref + enum classification tool
  • (reused) License header checker: input schema + async defineTool + node:fs/promises
  • (reused) YAML config diff: p.readInput for caller-supplied paths + two sync tools
  • (reused) Monorepo workspace lister: p.bash find + async JSON.parse tool
  • (reused) GH Actions timing analyzer: async workflow analysis + repair addon
  • (reused) Binary file detector: node:fs/promises open/read + s.record output
  • (new) Lockfile integrity checker: p.read + s.optional tool params + repair
  • (new) GraphQL schema type extractor: p.bash find + async regex tool + s.record root
  • (new) Path structure analyzer: input schema + node:path + s.record + repair
  • (new) CI log error classifier: p.readInput + sync classification tool + repair

Generated by Daily Rig Task Generator · sonnet46 132.3 AIC · ⌖ 9.38 AIC · ⊞ 6.8K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 4, 2026 12:44
@pelikhan
pelikhan merged commit d26c4d9 into main Aug 4, 2026
1 check passed
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — commenting with non-blocking observations.

📋 Key Themes & Highlights

Issues Found

  • Dead input parameter (369): rootDir is declared in the input schema but p.bash hardcodes find . ... — the value is never threaded through.
  • Redundant addons: [] (362, 363, 365): The field is optional; an empty array is noise that contradicts the idiomatic style of other samples.
  • Magic constant in job-count heuristic (365): Math.max(1, jobMatches.length - 3) subtracts 3 with no explanation, which reads as a bug to learners.
  • Regex limitations not called out (368): The GraphQL type extractor's single-line regex silently misses types with nested braces or multiline bodies.
  • Unbounded lines output (370): Emitting all log lines (including info) into the output array risks context exhaustion on real CI logs.

Positive Highlights

  • ✅ Consistent use of s.optional in tool parameters (367) is a nice pattern for nullable lockfile fields.
  • repair() addon is correctly applied on agents whose output schemas are complex records (367, 369, 370).
  • ✅ All 10 samples typecheck cleanly on first attempt — a good signal of generation quality.
  • ✅ Good variety of patterns: s.record root output (368), p.readInput (363, 370), binary sampling via node:fs/promises (366).

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 48.3 AIC · ⌖ 4.46 AIC · ⊞ 6.3K
Comment /matt to run again

instructions: p`Analyze the directory structure of the given root path.

Directories found (up to depth 3):
${p.bash("find . -maxdepth 3 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' 2>/dev/null | sort || echo ''")}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] rootDir input is declared but the p.bash command ignores it — find . ... always scans CWD regardless of what the caller passes.

This makes the input field dead code and will surprise users who pass a non-default root path.

💡 Suggestion

Use p.bash with a shell variable or a separate p.readInput approach, or remove the input field if the agent is always expected to run in the target directory. For example, thread the value through:

instructions: p`...
Directories found:
${p.bash(`find "${input.rootDir}" -maxdepth 3 ...`)}`,

}),
tools: [checkLicenseHeader],
maxTurns: 8,
addons: [],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] addons: [] is redundant noise — the field is optional and an empty array has no effect. Most other samples in this repo simply omit it.

Remove the key to keep the sample canonical and uncluttered.

try {
const content = await readFile(filePath, "utf8");
const jobMatches = content.match(/^\s{0,2}[\w-]+:\s*$/gm) ?? [];
const jobCount = Math.max(1, jobMatches.length - 3);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] Math.max(1, jobMatches.length - 3) is an unexplained magic constant — subtracting 3 is not documented and will confuse readers learning from this sample.

The regex /^\s{0,2}[\w-]+:\s*$/gm matches any top-level YAML key (including on:, name:, env:), not just job entries, hence the correction. Consider a more targeted match like /^ [\w-]+:/gm (two-space indent) or at least add an inline comment explaining why 3 is subtracted.

handler: async ({ filePath }: { filePath: string }) => {
try {
const content = await readFile(filePath, "utf8");
const typeRegex = /(type|input|enum|interface|union)\s+(\w+)[^{]*\{([^}]*)\}/g;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] The regex [^{]*\{([^}]*)\} fails on types with nested braces or multi-line bodies — it will miss fields in any type whose body contains { (e.g. field default values like field: String = "{").

This is a known limitation worth calling out in the sample description so readers know to use a proper GraphQL parser for production use.

💡 Suggestion

Add a comment like:

// Note: regex-based extraction; does not handle nested braces or multi-line type bodies.
// For production use, prefer a real GraphQL parser (e.g. graphql-js).

4. Count errorCount (severity="error") and warningCount (severity="warning").
5. Set dominantError to the most common errorClass among error-severity lines, or omit if none.`,
output: s.object({
lines: s.array(s.object({

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] The lines output includes every log line regardless of severity — for large CI logs this can produce an enormous output array that exhausts the model's context or causes schema validation failures.

Consider filtering output to only error/warning lines, or adding a head -500 cap on the p.readInput step and noting the truncation in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant