Skip to content

[rig-tasks] Add 10 rig samples — 2026-08-21 - #466

Merged
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-21-d0ee2cc8938c8d5e
Aug 22, 2026
Merged

[rig-tasks] Add 10 rig samples — 2026-08-21#466
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-21-d0ee2cc8938c8d5e

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

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

# File Description Typecheck
1 441-shell-shebang-glob-validator.md Shell script glob validator — p.glob + async defineTool checkShebangLine + repair() pass
2 442-git-log-graph-summarizer.md Git log graph summarizer — p.bash + defineTool parseGraphLine + s.enum + steering() pass
3 443-ts-complexity-scorer.md TypeScript complexity scorer — p.glob + async defineTool scoreFileComplexity + repair() pass
4 444-parallel-multi-tool-workflow.md Parallel multi-tool workflow — workflow + Promise.all + coordinator agent + s.enum pass
5 445-zlib-compression-analyzer.md Zlib compression analyzer — input s.object + p.bash + node:zlib deflateSync + repair() pass
6 446-file-crypto-hash-reporter.md File crypto hash reporter — input s.object + p.glob + node:crypto createHash + repair() pass
7 447-xml-attribute-extractor.md XML attribute extractor — input s.object + p.readInput + defineTool regex + repair() pass
8 448-workspace-symlink-inventory.md Workspace symlink inventory — p.bash + async defineTool lstat/readlink + s.enum + repair() pass
9 449-git-commit-msg-linter.md Git commit msg linter workflow — workflow + chained call() + defineTool + s.enum pass
10 450-yaml-anchor-alias-reporter.md YAML anchor alias reporter — p.glob brace pattern + async defineTool + steering() pass

Typecheck failures

Tasks 4 and 9 required fixes before passing:

  • Task 4 (parallel workflow): WorkflowMeta requires a description field (not just name). parallel() uses a homogeneous generic type, so mixed-type parallel agent calls must use Promise.all instead. call() requires a second input argument even for agents with no declared input schema.
  • Task 9 (commit msg linter workflow): Same WorkflowMeta.description issue. call() returns T | null, requiring null-coalescing before destructuring. call() second argument required.

Tasks run

  • (reused) Shell script glob validator
  • (reused) Git log graph summarizer
  • (reused) TypeScript complexity scorer
  • (reused) Workflow parallel multi-tool tester
  • (reused) Zlib file compression analyzer
  • (reused) File crypto hash reporter
  • (new) XML attribute extractor
  • (new) Workspace symlink inventory
  • (new) Git commit message linter workflow
  • (new) YAML anchor alias reporter

Generated by Daily Rig Task Generator · sonnet46 153.1 AIC · ⌖ 9.55 AIC · ⊞ 6.8K ·

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

github-actions Bot commented Aug 22, 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 /diagnosing-bugs, /codebase-design, and /grill-with-docs — requesting changes on correctness issues in the tool handler logic.

📋 Key Themes & Highlights

Bugs (correctness issues)

  • 448: lstat never throws on the symlink itself, so broken links are never detected. Replace with stat which follows the link target.
  • 449: The "other" category is dead code — the conditional that assigns it can never be true given the regex structure.
  • 445: targetDir input is declared but the p.bash command ignores it entirely, always scanning ..

Style / maintainability

  • 441: Arrow-function parameter s shadows the s schema import; rename to sh.
  • 441: Two separate import ... from "rig" lines — consolidate per project convention.

Positive Highlights

  • ✅ Diverse, well-structured samples covering glob, bash, node:zlib, node:crypto, workflows, and steering/repair addons.
  • Promise.all correctly used for parallel agent calls in sample 444.
  • ✅ Null-coalescing on call() results handled properly throughout.

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

const hasShebang = firstLine.startsWith("#!");
const shebangLine = hasShebang ? firstLine : undefined;
const standardShebangs = ["/bin/sh", "/bin/bash", "/usr/bin/env bash", "/usr/bin/env sh"];
const isStandard = hasShebang && standardShebangs.some(s => firstLine.includes(s));

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 arrow-function parameter s shadows the s schema import from "rig". This doesn't break runtime behaviour but defeats IntelliSense inside the callback and will confuse readers.

💡 Suggested fix

Rename the parameter to avoid the collision:

const isStandard = hasShebang && standardShebangs.some(sh => firstLine.includes(sh));

@@ -0,0 +1,43 @@
# 441 - Shell Shebang Glob Validator

```rig

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] Two separate imports from "rig" — consolidate them. The project convention (per AGENTS.md) is a single import from the rig alias.

💡 Suggested fix
import { agent, p, s, defineTool, repair } from "rig";

model: "small",
input: s.object({ targetDir: s.string }),
instructions: p`List files in the target directory: ${p.bash("find . -type f -size +0c")}.
For each file, call measureCompressionRatio to measure how compressible it is.

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.

[/grill-with-docs] The agent declares input: s.object({ targetDir: s.string }) but the p.bash call hardcodes find . -type f, completely ignoring the input. This makes targetDir a dead field that misleads users of the sample.

💡 Suggested fix

Either use the input in the bash command via p.readInput, or remove the input field:

instructions: p`List files in the target directory: ${p.bash("find ${p.readInput('targetDir')} -type f -size +0c")}`,

Or drop the input declaration entirely and always scan the current directory.

const target = await readlink(linkPath);
const isRelative = !target.startsWith("/");
let status: "valid" | "broken" | "relative";
try {

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.

[/diagnosing-bugs] The broken-link detection is incorrect. lstat(linkPath) does not follow symlinks — it always succeeds on the symlink file itself, so the catch branch for "broken" is never reached.

💡 Suggested fix

Use stat (which follows the link) to detect broken symlinks:

import { lstat, readlink, stat } from "node:fs/promises";

const target = await readlink(linkPath);
const isRelative = !target.startsWith("/");
let status: "valid" | "broken" | "relative";
try {
  await stat(linkPath); // follows the link; throws if broken
  status = isRelative ? "relative" : "valid";
} catch {
  status = "broken";
}

typeMatch ? typeMatch[1] as "feat" | "fix" | "chore" | "docs" | "style" | "refactor" | "test"
: isValid ? "other"
: "invalid";
const issue = isValid ? undefined : "Does not match conventional commit format: type(scope): description";

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.

[/diagnosing-bugs] Dead code: the isValid ? "other" branch is unreachable. isValid requires matching conventionalPattern, which already requires a valid type prefix — so typeMatch is always truthy when isValid is true. The "other" category is therefore never assigned.

💡 Analysis

conventionalPattern = /^(feat|fix|chore|docs|style|refactor|test)(...)?: .+/

A subject matching this regex always matches the inner type group, so typeMatch is non-null whenever isValid is true. Rewrite the guard to reflect the actual intent:

const category = typeMatch
  ? (typeMatch[1] as ...) 
  : "invalid";

Or add a distinct "other" pattern if you genuinely want to represent non-conventional but syntactically valid messages.

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