Skip to content

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

Closed as not planned

Description

@github-actions

Summary

Task Description Typecheck Key finding
1 (reused) Environment variable auditor (p.bash, s.enum, s.array) ✅ pass Required {"type":"module"} package.json in temp dir — not obvious from docs
2 (reused) Git contributor stats analyzer (multiple p.bash, nested s.object) ✅ pass Clean and idiomatic
3 (reused) TypeScript file complexity classifier (p.bash, s.record, s.enum) ✅ pass s.record with s.object values works well
4 (new) File dependency graph (multiple p.read, s.record(s.array(s.string))) ✅ pass p.read with known paths is ergonomic
5 (new) Test coverage gap finder (p.bash, repair addon, s.object) ✅ pass repair addon import from "rig/addons" not surfaced in SKILL.md examples

Problems encountered

Task 1 — CommonJS/ESM module context error

What happened: Running --typecheck on a .ts file placed in /tmp/ failed with:

error TS1295: ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'.
error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls

Root cause: TypeScript inherited the nearest package.json from /tmp/gh-aw/, which lacked "type": "module". Adding {"type": "module"} to the temp directory resolved it.

Impact: Confusing first-run experience for any user who typecheck rig programs outside the project root. The error message points to verbatimModuleSyntax and module resolution options, but the fix is simply adding a package.json in the target directory.

Minimal reproduction:

echo 'import { agent } from "rig"; export default agent({ model: "mini" });' > /tmp/myagent.ts
node skills/rig/rig.ts /tmp/myagent.ts --typecheck
# → TS1295 errors

Improvement opportunities

Missing schema helpers (s.*)

  • s.literal(value): No way to express exact literal string/number values without using s.enum with a single value. A s.literal("ready") helper would be more expressive for tagged unions.
  • s.tuple([...items]): Useful for fixed-arity output arrays (e.g., [filename, lineCount]), currently not available.
  • s.nullable(shape): Distinct from s.optional — for JSON null values in output, there is no dedicated helper.

Missing prompt helpers (p.*)

  • p.glob(pattern): A declarative p.glob("src/**/*.ts") intent would avoid needing p.bash("find . -name '*.ts' ...") boilerplate for simple file enumeration. This would be more portable and clearly signal intent.
  • p.env(varName): For reading a single environment variable declaratively rather than wrapping p.bash("printenv VAR").

Error message quality

  • The TS1295/TS1479 error from running typecheck on files outside an ESM context is unhelpful — rig could detect this and emit a friendlier message like: "Tip: add {"type":"module"} to a package.json in the same directory as your rig program."

API ergonomics

  • repair addon discoverability: import { repair } from "rig/addons" is not shown in the SKILL.md fast-generation checklist. New users writing programs with repair addons have no clear pointer to this import path. The checklist should include an example.
  • s.record with complex values: s.record(s.object({...})) works correctly but the SKILL.md only shows s.record(s.string) as an example. A nested-object record example would help generated code avoid trial and error.

Documentation gaps

  • ESM context requirement: SKILL.md does not mention that rig programs must be in an ESM module context ("type": "module" in nearest package.json) for typecheck to work. This should be noted in the "Install" or "Fast generation checklist" section.
  • rig/addons imports: The repair and addon system is documented, but import { repair } from "rig/addons" as the import path is not prominently shown.
  • --typecheck flag: The --typecheck flag is used in rig.ts but not documented in SKILL.md. A brief note in the "Commands" table would help.

Tasks run today

  • (reused) Task 1: Environment variable auditor that classifies env vars as secret/path/other using p.bash and s.enum
  • (reused) Task 2: Git contributor stats analyzer using multiple p.bash calls and s.array of nested s.object
  • (reused) Task 3: TypeScript source file complexity classifier using p.bash, s.record, and s.enum
  • (new) Task 4: File dependency graph analyzer reading multiple TS files via p.read, outputting s.record of imports per file
  • (new) Task 5: Test coverage gap finder using p.bash vitest run + repair addon with maxTurns:3, structured s.object output

Generated by Daily Rig Task Generator · sonnet46 47.2 AIC · ⌖ 4.54 AIC · ⊞ 5.5K · ◷

Activity

  1. pelikhan commented on Jul 23, 2026

    @pelikhan
    Collaborator

    @copilot rename rig.ts to rig.mts to implement module system automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions