Skip to content

[rig-tasks] Add 10 rig samples — 2026-08-02 - #336

Merged
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-02-fb6f920f4d4a7c56
Aug 2, 2026
Merged

[rig-tasks] Add 10 rig samples — 2026-08-02#336
pelikhan merged 1 commit into
mainfrom
rig-tasks/2026-08-02-fb6f920f4d4a7c56

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

Summary

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

# File Description Typecheck
1 351-ts-import-depth-analyzer-v2.md TS import depth analyzer (reused) pass
2 352-env-file-completeness-checker-v2.md Env file completeness checker (reused) pass
3 353-stale-branch-detector-v2.md Stale branch detector (reused) pass
4 354-license-header-checker-v2.md License header checker (reused) pass
5 355-yaml-config-diff-v2.md YAML config diff (reused) pass
6 356-monorepo-workspace-lister-v2.md Monorepo workspace lister (reused) pass
7 357-ts-decorator-usage-scanner.md TS decorator usage scanner (new) pass
8 358-git-tag-semver-validator-v2.md Git tag semver validator (new) pass
9 359-package-json-completeness-scorer.md Package.json completeness scorer (new) pass
10 360-parallel-branch-analysis-workflow.md Parallel branch analysis workflow (new) pass

Typecheck failures

None — all 10 tasks passed typecheck. Task 10 (parallel branch analysis workflow) required one fix: the initial version incorrectly used parallel([promise, promise]) instead of Promise.all([...]), and tried to import call from "rig" (it is only available as a workflow body context prop). Both issues were corrected before writing the sample file.

Tasks run

  • (reused) TypeScript import depth analyzer
  • (reused) Env file completeness checker
  • (reused) Stale branch detector
  • (reused) License header checker
  • (reused) YAML config diff
  • (reused) Monorepo workspace lister
  • (new) TypeScript decorator usage scanner
  • (new) Git tag semver validator v2
  • (new) Package.json completeness scorer
  • (new) Parallel branch analysis workflow

Generated by Daily Rig Task Generator · sonnet46 146 AIC · ⌖ 9.37 AIC · ⊞ 6.8K ·

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

github-actions Bot commented Aug 2, 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 three correctness issues in the new samples.

📋 Key Themes & Highlights

Issues Found

  • 357: Decorator regex @([A-Z][a-zA-Z0-9]*) silently misses all lowercase decorators (@inject, @override, etc.) — a silent correctness bug in the tool handler.
  • 355: changedKeys instruction says "estimate from content" — the tooling only extracts keys (not values), so this field will consistently be unreliable. The schema should either be fixed or the limitation documented.
  • 360: staleCount in branchHealthAgent counts remote-tracking refs, not stale-by-age branches. This corrupts the downstream overallHealth classifier, which uses staleCount >= 3 as a threshold — any repo with 3+ remotes will be misclassified.

Positive Highlights

  • ✅ Clean, consistent agent structure across all 10 samples
  • ✅ Good use of repair() addon throughout
  • ✅ Sample 360 is a great demonstration of the workflow + Promise.all + call.json pattern
  • defineTool handlers keep logic deterministic and out of the LLM path where possible

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

handler: async ({ filePath }: { filePath: string }) => {
try {
const content = await readFile(filePath, "utf-8");
const decoratorRegex = /@([A-Z][a-zA-Z0-9]*)/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.

[/grill-with-docs] The regex @([A-Z][a-zA-Z0-9]*) silently skips lowercase decorators — e.g. @override, @inject, @memoize, @autobind — which are common in Angular, NestJS, and reflection-metadata usage. This produces silent false-negatives with no indication anything was missed.

💡 Suggested fix
const decoratorRegex = /@([a-zA-Z][a-zA-Z0-9]*)/g;

Lowercase decorators (e.g. @inject, @readonly) are a standard TypeScript pattern; the current pattern excludes them entirely without any warning in the output.

1. Call extractYamlKeys on the base file content to get baseKeys.
2. Call extractYamlKeys on the target file content to get targetKeys.
3. Call diffKeys with baseKeys and targetKeys to get addedKeys and removedKeys.
4. changedKeys: keys present in both but with differing values — estimate from content or leave empty.

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 instruction "estimate from content or leave empty" gives the LLM no reliable way to detect value changes — YAML parsing is needed to compare values, not text estimation. Consumers of this agent may assume changedKeys is authoritative when it will frequently be empty or incorrect.

💡 Suggested fix

Since extractYamlKeys only returns keys (not values), the agent cannot reliably detect changed values. Either:

  • Remove changedKeys from the output schema and note the limitation in the description, or
  • Add a extractYamlKeyValues tool that returns a Record<string, string> and diffs values explicitly.

Leaving the instruction as "estimate" teaches a bad pattern for agent samples.

Branch list:
${p.bash("git branch -a 2>/dev/null || echo ''")}

Count totalBranches (all branches listed). List activeBranches as local branch names (lines not starting with "remotes/").

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] staleCount = totalBranches - activeBranches.length misuses the term "stale" — branches on remotes/ are not stale, they're remote-tracking refs. This conflates "remote" with "stale", which makes the output misleading and is inconsistent with how sample 353 (stale-branch-detector) defines staleness by commit age.

💡 Suggested fix

Rename staleCount to remoteCount and activeBranches to localBranches to accurately reflect what's being counted:

output: s.object({
  totalBranches: s.int,
  remoteCount: s.int,
  localBranches: s.array(s.string),
}),

This keeps vocabulary consistent with sample 353, where "stale" is specifically defined by commit date age.

phase("Synthesize");
const overallHealth = await call.json(
`Given branchHealth=${JSON.stringify(branchHealth)} and commitFrequency=${JSON.stringify(commitFrequency)},
classify overallHealth as "healthy" (averagePerDay >= 1 and staleCount < 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.

[/grill-with-docs] The overallHealth thresholds reference staleCount from branchHealth, but that field actually counts remote-tracking refs (not stale-by-age branches). A repo with 10 remotes always classifies as "critical" regardless of actual staleness.

💡 Why this matters

This is a downstream consequence of the staleCount naming in branchHealthAgent. Using a raw remote-branch count as a staleness signal in the health classifier produces unreliable results in any real repo with forks or CI branches. Fix by renaming the field to remoteCount (per the other comment) and removing it from the health thresholds, or replacing it with an actual age-based stale count.

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