Skip to content

[rig-tasks] Daily rig evaluation — 2026-07-23 — 4/5 passed #46

Description

@github-actions

Summary

Task Description Typecheck Key finding
1 Env variable auditor (p.bash, s.enum, s.optional) pass Typecheck passed; runtime fails on missing Copilot server (expected in CI)
2 Git contributor stats (multiple p.bash, s.array of s.object) pass Clean — multiple p.bash in a single p\`` template works correctly
3 File complexity classifier (p.bash, s.record(s.number), s.enum) pass s.record(s.number) as complexityDistribution required manual typing; no ergonomic shorthand
4 Package health checker (two-agent chaining, p.read, s.boolean, s.enum) fail TS6133: 'extractor' is declared but its value is never readnoUnusedLocals: true rejects intermediate helper agents
5 TODO tracker (p.bash, p.write, s.enum ×2, s.array of s.object) pass p.write inside p\`template accepted without complaint;s.enum` x2 in same schema works fine

Problems encountered

Task 4 — noUnusedLocals rejects intermediate chaining agents

What the code tried to do: Declare two agents (extractor and assessor) where the intent is to call extractor first, pass its result to assessor. The extractor was declared as a module-level const without being explicitly called (since SKILL.md recommends exporting only the root agent and not calling agents at module scope).

What went wrong:

TS6133: 'extractor' is declared but its value is never read.

Because the project's tsconfig.json has "noUnusedLocals": true, an intermediate agent declaration that is only meant for conceptual chaining (without a direct call or explicit export) is rejected. This creates a trap: SKILL.md says "do not call agents directly at module scope" and "export exactly one default root agent", but noUnusedLocals requires all declared variables to be used or exported.

Minimal reproduction:

import { agent, s } from "rig";
const helper = agent({ model: "mini", instructions: "...", output: s.string }); // TS6133!
const root = agent({ model: "mini", instructions: "...", output: s.string });
export default root;

Fix applied: Collapsed both agents into one that does all work in a single pass. The two-agent chaining pattern requires either: (a) calling helper(...) inline in root's instruction template, or (b) registering helper under the agents spec field.

--typecheck does not exit-early — connects to Copilot after typecheck

When using cat program.ts | node rig.ts --typecheck, the runtime does NOT exit after a successful typecheck. It proceeds to connect to the Copilot SDK server. In CI environments without a running Copilot server this produces a confusing error: Failed to connect to CLI server: connect ECONNREFUSED 127.0.0.1:7777, even though the typecheck itself passed. A user cannot distinguish "typecheck passed" from "typecheck failed" based on exit code alone in this environment.

Expected behavior: --typecheck should exit 0 after a successful typecheck without attempting to connect to the agent runtime.

Improvement opportunities

Missing schema helpers (s.*)

  • s.literal(value) is documented in the header comments (s.literal(value,desc?) EnumSchema with a single value) but not prominently in SKILL.md. Generated code reached for s.enum("only-value") instead. Document s.literal with an example.
  • s.integer is listed in rig.ts comments but absent from SKILL.md. Integer-count fields like commitCount and lineNumber were typed as s.number, losing precision intent.
  • s.nullable is mentioned in the rig.ts header (s.nullable(inner) accepts inner|null) but not in SKILL.md's schema helpers section. Code used s.optional where s.nullable would be semantically more accurate.

Missing prompt helpers (p.*)

  • No p.glob(pattern) helper — when programs need to enumerate files to feed context, they use p.bash("find ... | head -N") as a workaround. A p.glob(pattern) intent that lists matching file paths would be cleaner and more composable.
  • No p.readMany(paths[]) helper — reading multiple files requires either multiple ${p.read(...)} expressions or a p.bash("cat file1 file2") workaround.

Error message quality

  • When --typecheck flag is used in stdin mode but typecheck passes, the subsequent ECONNREFUSED error gives no indication that typecheck succeeded. The error message should be preceded by a ✓ Typecheck passed line before attempting runtime connection.
  • Typecheck errors reference a temp file path (.tmp/rig-stdin-PIv7is/program.ts) rather than indicating it's the user's stdin program. The path should be normalized to <stdin program> in error output.

API ergonomics

  • Two-agent chaining with noUnusedLocals: The natural pattern of declaring a helper agent then an orchestrator fails under strict TypeScript settings. SKILL.md should document the required alternatives: (a) use agents spec field, (b) declare helper as export const, or (c) call the helper inline. Currently, SKILL.md's "do not call agents at module scope" guidance and noUnusedLocals: true are in direct conflict for multi-agent programs.
  • --typecheck-only flag: Users running in CI want to validate a program without a Copilot runtime. The current --typecheck flag still attempts to run after typecheck. A --typecheck-only (or --check) flag that exits after typecheck would fill this gap.

Documentation gaps

  • SKILL.md lists s.literal, s.integer, s.nullable in the rig.ts file header but not in the SKILL.md schema helpers table. These should be added.
  • SKILL.md does not document the interaction between noUnusedLocals and multi-agent programs — this is the most common authoring mistake for newcomers.
  • SKILL.md says "For inline markdown skill mode, export exactly one default root agent with no input and do not call it directly" but does not clarify what to do with helper agents in multi-step chains.

Tasks run today

  • (new) Task 1: Environment variable auditor classifying env vars as secret/path/other using p.bash and s.enum
  • (new) Task 2: Git contributor stats analyzer using multiple p.bash calls and s.array of nested s.object
  • (new) Task 3: TypeScript source file complexity classifier using p.bash, s.record(s.number), and s.enum
  • (new) Task 4: Package health checker with two-agent chaining using p.read, s.boolean, s.enumFAILED (noUnusedLocals rejects intermediate agent)
  • (new) Task 5: TODO/FIXME/HACK comment tracker using p.bash grep + p.write for markdown output, dual s.enum fields

Generated by Daily Rig Task Generator · sonnet46 82.3 AIC · ⌖ 4.77 AIC · ⊞ 5.5K ·

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions