Skip to content

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

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

[rig-tasks] Add 10 rig samples — 2026-07-25#111
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-07-25-138845cf30d5f071

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

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

# File Description Typecheck
1 78-build-log-analyzer.md Build log analyzer with repair addon, s.optional file field, s.enum severity pass
2 79-ts-type-alias-mapper.md TypeScript type alias mapper with defineTool regex categorization, s.record output pass
3 80-git-contributor-mapper.md Git contributor mapper with git shortlog, s.record keyed by name, s.enum role pass
4 81-markdown-doc-summarizer.md Markdown doc summarizer with nano subagent delegation, p.readOptional, p.writeOutput pass
5 82-workspace-config-drift.md Workspace config drift detector with p.readOptional, defineTool JSON parse, repair addon pass
6 83-commit-format-suggester.md Commit format suggester with steering+repair addons, p.writeOutput, s.enum category pass
7 84-json-schema-migration.md JSON schema migration planner with nano diffAnalyzer subagent, p.readInput pass
8 85-dockerfile-security-audit.md Dockerfile security auditor with defineTool pattern matching, p.readInput, s.enum severity pass
9 86-npm-audit-simplifier.md NPM audit simplifier with p.bash npm audit --json, repair addon, s.record output pass
10 87-git-stash-inventory.md Git stash inventory with p.bash stash list/show, s.enum staleness pass

Typecheck failures

None — all 10 tasks passed typecheck.

Tasks run

  • (reused) Build log analyzer using p.bash npm run build, repair addon maxTurns:3, outputs s.object with s.array of error objects having s.enum severity (error/warning/info), s.optional file, and s.boolean buildSucceeded flag
  • (reused) TypeScript type alias mapper using p.bash find + file content scan, defineTool for regex-based categorization, outputs s.record(s.object) with s.enum kind (primitive/union/intersection/mapped/other) and s.boolean exported per alias
  • (reused) Git contributor mapper using p.bash git shortlog and git log --name-only, outputs s.record(s.object) keyed by contributor name with commitCount, primaryAreas s.array(s.string), and role s.enum(core/peripheral/single-file)
  • (reused) Markdown doc summarizer with subagent delegation: sectionSummarizer (nano) per heading, coordinator reads README via p.readOptional, outputs s.object with sections s.array and report field written via p.writeOutput
  • (reused) Workspace config drift detector that reads multiple config files (tsconfig.json, .eslintrc.json, .prettierrc) via p.read and p.readOptional, uses defineTool for JSON parsing, outputs s.record(s.object) keyed by config file with s.array of drifted fields and s.enum status (ok/warning/error), repair addon maxTurns:2
  • (reused) Git commit message conventional-format suggester using p.bash git log, repair and steering addons, writes report via p.writeOutput, outputs s.array(s.object) with hash/original/suggested/category s.enum(feat/fix/chore/docs/test/refactor/style)
  • (new) JSON schema migration planner: reads two schema files via p.readInput, delegates structural diff analysis to a nano diffAnalyzer subagent, outputs s.array(s.object) with changeType s.enum(add/remove/modify/rename), path, description, and breakingChange s.boolean
  • (new) Dockerfile security auditor: reads Dockerfile via p.readInput, uses defineTool for pattern-matching known insecure patterns (root user, ADD vs COPY, :latest tags, ENV secrets), outputs s.object with findings s.array and s.boolean passes
  • (new) NPM audit simplifier: uses p.bash npm audit --json, repair addon maxTurns:3, outputs s.object with vulnerabilitiesByLevel s.record(s.array(s.string)), totalCount s.number, and recommendation s.string
  • (new) Git stash inventory analyzer: uses p.bash git stash list and git stash show per entry, outputs s.array(s.object) with stashRef, description, changedFiles, and staleness s.enum(fresh/aging/stale/ancient)

Generated by Daily Rig Task Generator · sonnet46 91.8 AIC · ⌖ 10.2 AIC · ⊞ 6.7K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review July 25, 2026 04:18
@pelikhan
pelikhan merged commit 4be88fc into main Jul 25, 2026
1 check 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 two correctness issues and one missing pattern.

📋 Key Themes & Highlights

Issues Found

  • 83 – output schema mismatch: p.writeOutput("reportWritten", ...) writes a file but the top-level output is s.array(...) — no reportWritten field exists to capture the path. Needs s.object wrapper with a reportWritten: s.string field (same pattern as samples 76, 81).
  • 87 – stash show bug: git stash show --name-only without a stash ref always reads stash@{0}, not each stash entry. A multi-stash inventory will return wrong files for every entry except the first.
  • 83 – empty steering(): steering() with no message injects no guidance. Pass a targeted { message: "..." } as in sample 76.
  • 85 – mixed rule in defineTool: the USER root check OR-chains an unrelated --no-check RUN pattern into the same finding, causing misleading messages.

Positive Highlights

  • ✅ Excellent breadth of patterns covered (defineTool, repair, steering, subagent delegation, p.readOptional, p.writeOutput, s.record, s.enum)
  • ✅ All 10 samples pass typecheck
  • ✅ Consistent use of || true / || echo '...' for safe bash fallbacks
  • ✅ Good // Agent role: comments throughout

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

const commitFormatSuggester = agent({
model: "small",
instructions: p`Review recent git commits: ${p.bash("git log --oneline -20 --no-merges")}. For each commit, check whether its message follows conventional commit format (type: description). Suggest a rewritten message in conventional format. Classify each commit as one of: feat, fix, chore, docs, test, refactor, style. Write the full report to commit-report.md via ${p.writeOutput("reportWritten", "commit-report.md")}.`,
output: 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] p.writeOutput("reportWritten", ...) declares a write intent but the output schema is s.array(s.object(...)) — there is no reportWritten field in the schema to capture the written path. The harness needs a corresponding string field in the output schema.

💡 Fix

Wrap in s.object and add the reportWritten field, matching the pattern from samples 76 and 81:

output: s.object({
  commits: s.array(s.object({
    hash: s.string,
    original: s.string,
    suggested: s.string,
    category: s.enum("feat", "fix", "chore", "docs", "test", "refactor", "style"),
  })),
  reportWritten: s.string,
}),

// Agent role: inventory all git stashes with their descriptions, changed files, and staleness classification.
const gitStashInventory = agent({
model: "small",
instructions: p`List all git stashes: ${p.bash("git stash list 2>/dev/null || echo 'No stashes found'")}. For each stash entry shown, show its changed files: ${p.bash("git stash show --name-only 2>/dev/null || true")}. For each stash, classify its staleness as: fresh (< 1 week), aging (1-4 weeks), stale (1-3 months), ancient (> 3 months) based on the date shown in the stash list.`,

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] git stash show --name-only without a stash reference always shows stash@{0} — only the top stash's files are fetched, not each individual stash entry. For an inventory of N stashes, this produces wrong data for all but the first.

💡 Fix

The agent needs to iterate over stash refs. Use a command that iterates, or note in the instructions that the agent should call git stash show --name-only stash@{N} per entry. A bash one-liner like this collects all at once:

git stash list --format='%gd' | xargs -I{} sh -c 'echo "---{}"; git stash show --name-only {} 2>/dev/null'

Or simplify to a single p.bash that already includes the stash ref loop.

category: s.enum("feat", "fix", "chore", "docs", "test", "refactor", "style"),
})),
maxTurns: 5,
addons: [steering(), repair()],

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] steering() is called with no message, which means no guidance text is injected on the final retry. The reference docs state: "Use steering({ message: '...' }); a positional string is invalid." An empty steering() is technically valid but wastes the final-turn hint.

💡 Suggestion

Add a targeted steering message, as in sample 76:

addons: [steering({ message: "Follow conventional commit format strictly: type(scope): imperative description." }), repair()],


const checkSecurityPattern = defineTool("checkSecurityPattern", {
description: "Check a Dockerfile line for known security anti-patterns",
parameters: s.object({ line: s.string, lineNumber: s.number }),

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 USER root check regex uses ||' pattern — /^USER\s+root\s*$/i.test(line.trim()) || /^RUN.&&.&&.*--no-check/.test(line) — the second part (--no-check) is bundled into the same 'running as root' finding. This mixes two unrelated anti-patterns into one rule, making the message "Running as root user"misleading when theRUN --no-check` branch triggers.

💡 Fix

Split into separate findings:

if (/^USER\s+root\s*$/i.test(line.trim())) {
  findings.push({ severity: "critical", message: "Running as root user", rule: "no-root-user" });
}
if (/^RUN.*--no-check/.test(line)) {
  findings.push({ severity: "high", message: "Package install skips integrity check", rule: "no-skip-check" });
}

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