Repository navigation
Closed as not planned
Description
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 errorsImprovement opportunities
Missing schema helpers (s.*)
s.literal(value): No way to express exact literal string/number values without usings.enumwith a single value. As.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 froms.optional— for JSON null values in output, there is no dedicated helper.
Missing prompt helpers (p.*)
p.glob(pattern): A declarativep.glob("src/**/*.ts")intent would avoid needingp.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 wrappingp.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
repairaddon 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.recordwith complex values:s.record(s.object({...}))works correctly but the SKILL.md only showss.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 nearestpackage.json) for typecheck to work. This should be noted in the "Install" or "Fast generation checklist" section. rig/addonsimports: The repair and addon system is documented, butimport { repair } from "rig/addons"as the import path is not prominently shown.--typecheckflag: The--typecheckflag is used inrig.tsbut 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.bashands.enum - (reused) Task 2: Git contributor stats analyzer using multiple
p.bashcalls ands.arrayof nesteds.object - (reused) Task 3: TypeScript source file complexity classifier using
p.bash,s.record, ands.enum - (new) Task 4: File dependency graph analyzer reading multiple TS files via
p.read, outputtings.recordof imports per file - (new) Task 5: Test coverage gap finder using
p.bashvitest run +repairaddon withmaxTurns:3, structureds.objectoutput
Generated by Daily Rig Task Generator · sonnet46 47.2 AIC · ⌖ 4.54 AIC · ⊞ 5.5K · ◷
Activity
pelikhan commentedon Jul 23, 2026
@copilot rename rig.ts to rig.mts to implement module system automatically