Skip to content

[rig-tasks] Add 10 rig samples — 2026-07-25 - #109

Merged
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-07-25-05f6ac05bd1ad8eb
Jul 25, 2026
Merged

[rig-tasks] Add 10 rig samples — 2026-07-25#109
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-07-25-05f6ac05bd1ad8eb

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

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

# File Description Typecheck
1 68-changelog-generator.md Changelog entry generator with defineTool semver validation, p.bash git diff/log, p.write, repair() pass
2 69-todo-comment-tracker.md TODO/FIXME/HACK scanner using p.bash grep, structured output with s.enum kind, writes report via p.write pass
3 70-multi-file-subagent-summarizer.md Multi-file summarizer with nano fileSummarizer subagent, p.readInput, coordinator aggregates into s.record(s.string) pass
4 71-package-script-health.md package.json script health analyzer using p.read, defineTool name validation, s.enum status, repair() pass
5 72-ts-function-signatures.md TypeScript function signature extractor using p.bash find, p.read, defineTool regex handler, s.record output pass
6 73-git-branch-pruner.md Git branch prune candidate identifier with p.bash git commands, s.optional lastCommitDate, s.enum action, repair() pass
7 74-prettier-eslint-compat.md Prettier/ESLint config compatibility checker with p.readOptional, defineTool conflict detection, repair() pass
8 75-workflow-validator.md GitHub Actions workflow validator with nano workflowAnalyzer subagent, p.bash find, s.record aggregation pass
9 76-commit-msg-rewriter.md Commit message rewriter with steering() + repair() addons, p.writeOutput, s.enum category pass
10 77-env-key-checker.md .env key cross-checker using p.readOptional for both files, defineTool regex extraction, s.enum status pass

Typecheck failures

None — all 10 samples passed typecheck.

Tasks run

  • (reused) Changelog entry generator that reads git diff via p.bash, uses defineTool to validate semver bump type, and writes CHANGELOG.md via p.write, with s.object output tracking changes by category
  • (reused) TODO/FIXME/HACK comment tracker using p.bash grep scan and p.write to produce markdown report
  • (reused) Multi-file glob summarizer: uses p.bash to find TS files, a nano fileSummarizer subagent per file, coordinator aggregates into s.record(s.string) keyed by path
  • (reused) Package.json script health analyzer using p.read, defineTool for naming validation, s.array of script issues with s.enum status, s.enum overallHealth, repair addon maxTurns:2
  • (reused) TypeScript function signature extractor using p.bash + p.read per file, defineTool with regex-based handler for AST-like parsing, outputs s.record(s.array(s.object)) of functions per file with name/paramCount/isExported
  • (reused) Git branch prune candidate identifier using p.bash git branch --merged/--no-merged and git for-each-ref, outputs s.object with s.array of candidates each having s.enum action(keep/prune), s.optional lastCommitDate, repair addon maxTurns:3
  • (new) Prettier/ESLint config compatibility checker using p.readOptional for both configs, defineTool for conflict detection, outputs s.object with s.array of conflicts each having s.enum severity and s.boolean compatible
  • (new) GitHub Actions workflow validator with nano workflowAnalyzer subagent per file, coordinator uses p.bash find, outputs s.record(s.object) keyed by filename with issues, jobCount, and s.enum status (pass/warn/fail)
  • (new) Commit message rewriter using p.bash git log, steering addon for imperative mood, repair addon, writes summary via p.writeOutput, outputs s.array(s.object) with hash/original/revised/category s.enum
  • (new) .env file key cross-checker using p.readOptional for .env.example and .env, defineTool for regex key extraction, outputs s.object with missing/extra arrays and s.enum status (complete/partial/empty)

Generated by Daily Rig Task Generator · sonnet46 79.2 AIC · ⌖ 9.54 AIC · ⊞ 6K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review July 25, 2026 03:44
@pelikhan
pelikhan merged commit 0970e3d into main Jul 25, 2026
2 checks passed
@github-actions

github-actions Bot commented Jul 25, 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 /grill-with-docs — requesting changes on a few correctness issues.

📋 Key Themes & Highlights

Issues to fix

  • p.write vs p.writeOutput (samples 68, 69): both use p.write(path, staticContent) which writes a fixed placeholder, not the LLM-generated field. Replace with p.writeOutput(field, path).
  • p.bash with backslash regex (sample 69): 'TODO\\|FIXME\\|HACK' should use p.bashRaw`...` to pass the shell command verbatim.
  • const p shadows the p import (sample 74): the detectConflicts handler names a local variable p, shadowing rig's prompt-intent builder. Rename to prettier/eslint.
  • p.glob preferred over p.bash("find ...") (samples 70, 72): rig's declarative p.glob(pattern) is the idiomatic form for workspace file discovery.
  • Model identifier drift: all 10 samples use "small" but SKILL.md specifies "large", "mini", or "nano" in examples; preceding samples 66–67 use "mini".

Positive Highlights

  • ✅ Good variety of patterns: defineTool, subagent delegation, steering + repair addon composition, s.optional, s.record, p.readOptional.
  • ✅ Consistent // Agent role: ... comments on every agent.
  • ✅ All 10 samples passed typecheck.

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

const changelogGenerator = agent({
model: "small",
instructions: p`Review ${p.bash("git diff HEAD~1 HEAD --stat")} and ${p.bash("git log HEAD~1..HEAD --oneline")} to produce a changelog entry. Classify each change by category and determine the semver bump type. Use the validateSemver tool to confirm the bump value. Write the markdown changelog to CHANGELOG.md via ${p.write("CHANGELOG.md", "<!-- changelog -->")}`,
output: 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.

[/grill-with-docs] p.write("CHANGELOG.md", "<!-- changelog -->") writes a static placeholder, not the LLM-generated markdown field — the file will always contain the literal string <!-- changelog -->.

💡 Fix: use `p.writeOutput`

Replace the write intent so the generated markdown field is persisted:

instructions: p`...via ${p.writeOutput("markdown", "CHANGELOG.md")}`,

p.write(path, content) injects a static string; only p.writeOutput(field, path) writes a generated output field to disk after the run completes.

// Agent role: scan source files for TODO/FIXME/HACK comments and produce a structured report.
const todoCommentTracker = agent({
model: "small",
instructions: p`Scan source files using ${p.bash("grep -rn 'TODO\\|FIXME\\|HACK' --include='*.ts' . 2>/dev/null || true")} and produce a structured list of all found comments. Write a markdown report to todo-report.md via ${p.write("todo-report.md", "<!-- report -->")}`,

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] Two issues on this line:

  1. p.write("todo-report.md", "<!-- report -->") writes a static placeholder — the generated markdown field is never persisted. Use p.writeOutput("markdown", "todo-report.md") instead.

  2. The backslash \| alternation in a p.bash string goes through TypeScript string escaping before reaching the shell. The regex may not behave as intended. Use the tagged-template form p.bashRaw`grep -rn 'TODO\|FIXME\|HACK' ...` to pass the command verbatim.

💡 Suggested fix
instructions: p`Scan source files using ${p.bashRaw`grep -rn 'TODO\|FIXME\|HACK' --include='*.ts' . 2>/dev/null || true`} and produce a structured list. Write a markdown report via ${p.writeOutput("markdown", "todo-report.md")}`,

const multiFileSummarizer = agent({
model: "small",
instructions: p`Find TypeScript files using ${p.bash("find src -name '*.ts' -not -path '*/node_modules/*' 2>/dev/null | head -10 || echo 'no files'")} then delegate each file path to the fileSummarizer subagent and collect summaries keyed by file path.`,
output: s.record(s.string),

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] p.bash("find src -name '*.ts' ...") for file discovery can be replaced with p.glob("src/**/*.ts"), which is the idiomatic rig pattern (see sample 67 directly above this one).

💡 Suggested fix
instructions: p`Find TypeScript files: ${p.glob("src/**/*.ts")}. For each path delegate to fileSummarizer and collect summaries keyed by file path.`,

p.glob handles the discovery as a declarative intent, keeping the instructions cleaner and consistent with the project's established style.

const detectConflicts = defineTool("detectConflicts", {
description: "Detect rule conflicts between Prettier and ESLint configs",
parameters: s.object({ prettierConfig: s.string, eslintConfig: s.string }),
handler({ prettierConfig, eslintConfig }) {

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 detectConflicts handler declares const p (line 10: const p = JSON.parse(...)) which shadows the p import from "rig" at module scope. This creates a confusing name collision in the sample — readers will associate p with rig's prompt-intent builder, not a parsed config object.

💡 Suggested fix

Rename the local variable to avoid the shadow:

const prettier = JSON.parse(prettierConfig || "{}");
const eslint   = JSON.parse(eslintConfig  || "{}");
if (prettier.printWidth && eslint.rules?.["max-len"]) { ... }

const tsFunctionSignatures = agent({
model: "small",
instructions: p`Find TypeScript files using ${p.bash("find src -name '*.ts' 2>/dev/null | head -5 || echo 'no files'")} then read each file and use the parseSignatures tool to extract function signatures. Return results keyed by file path.`,
output: s.record(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.

[/grill-with-docs] File discovery uses p.bash("find src -name '*.ts' ...") — prefer p.glob("src/**/*.ts") (the established rig pattern) over a shell find command for workspace file discovery.

💡 Suggested fix
instructions: p`Find TypeScript files: ${p.glob("src/**/*.ts")}. Read each file and use the parseSignatures tool to extract function signatures. Return results keyed by file path.`,

});

// Agent role: read recent git changes and produce a structured changelog entry with semver bump classification.
const changelogGenerator = agent({

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] All 10 new samples use model: "small", but the SKILL.md construction rules say to use "large", "mini", or "nano" in examples, and the two immediately preceding samples (66, 67) both use "mini". Using "small" drifts from the documented vocabulary and could confuse readers learning from these samples.

Consider updating all new samples to "mini" (or "nano" for the subagent delegates) to stay consistent with the project's example conventions.

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