Summary
| Task |
Description |
Type |
Typecheck |
Key finding |
| 1 (reused) |
Dotenv vs process.env drift detector |
agent |
✅ pass |
s.record + defineTool + repair() composed cleanly; as const needed on return literals |
| 2 (reused) |
Vitest snapshot count workflow |
workflow |
✅ pass |
workflow() meta requires description field — omitting it caused initial failure; Promise.all + explicit type annotations on reduce needed |
| 3 (reused) |
Git stale branch reporter |
agent |
✅ pass |
defineTool returning s.enum literal with as const worked correctly |
| 4 (reused) |
TypeScript abstract class finder |
agent |
✅ pass |
p.glob + p.bash combined cleanly; s.boolean output field from tool worked well |
| 5 (reused) |
Dockerfile ENV instruction inspector |
agent |
✅ pass |
p.bash find chained correctly; tool returned structured object without issue |
| 6 (reused) |
NPM script command prefix analyzer |
agent |
✅ pass |
p.read + s.record(s.object(...)) + s.record(s.int) — smooth pattern |
| 7 (new) |
TypeScript default parameter extractor |
agent |
✅ pass |
p.glob + p.bash + repair() addon; implicit any on reduce avoided with explicit annotations |
| 8 (new) |
Git branch risk classifier |
agent |
✅ pass |
steering() + repair() addon ordering ([steering(), repair()]) required attention |
| 9 (new) |
Test file coverage pipeline |
workflow |
✅ pass |
3-stage sequential call() workflow; call() returns `T |
| 10 (new) |
JSON schema type distribution |
agent |
✅ pass |
defineTool with JSON.parse in handler; s.record(s.int) for type distribution map |
Problems encountered
No typecheck failures this run after fixing two issues discovered during development:
-
workflow() meta missing description (task 2): The initial version used meta: { name: "..." } without description. TypeScript surfaced: Property 'description' is missing in type '{ name: string; }' but required in type 'WorkflowMeta'. Fix: add description: "..." to all workflow meta objects.
-
workflow body destructuring and call type (task 2): Initial version used body(call) but the correct form is body: async ({ call }) => .... Also, Promise.all + call() results are typed T | null, requiring null-coalescing when accessing fields.
-
reduce implicit any (task 2): .reduce((sum, f) => sum + f.lineCount, 0) failed with implicit any errors. Fix: explicit type annotations (sum: number, f: { lineCount: number }).
Improvement opportunities
Missing or undiscoverable schema helpers (s.*)
No gaps found. s.record(s.int) for count maps and s.record(s.object(...)) for keyed maps worked as documented. The SKILL.md table covers these well.
Missing or undiscoverable prompt helpers (p.*)
p.glob → p.bash find combo is commonly needed when a glob finds paths but content also needs to be fetched. A p.readGlob(pattern) helper that inlines file content would reduce this pattern.
p.readOptional was referenced in several pool descriptions but not exercised; it is documented in SKILL.md but the fallback parameter semantics could use an inline example.
Error message quality
- The
WorkflowMeta.description is missing TypeScript error is clear and actionable.
- The
call type error (This expression is not callable. Type 'WorkflowContext<unknown>' has no call signatures) was confusing — the actual issue was destructuring body(call) instead of body: async ({ call }) =>. A targeted lint rule or better error message could help here.
API ergonomics
call() return type is T | null: Every caller must null-coalesce. This is correct behavior on agent failure, but it adds boilerplate at every call site in workflows. A helper like call.required(...) that throws on null might improve workflow readability.
as const on tool return literals: Required for enum schema comparison, but easy to forget. A lint rule catching return "value" in a defineTool handler where the return type is s.enum(...) would catch this reliably.
steering() + repair() ordering: The rule is [steering(), repair()] but the SKILL.md table says "Retry with final-turn warning" without making the required order visually prominent. A note in the addons section would help.
Candidate lint rules
Rule: no-untyped-reduce-in-workflow
- Invalid:
.reduce((sum, f) => sum + f.x, 0)
- Valid:
.reduce((sum: number, f: { x: number }) => sum + f.x, 0)
- Why: TypeScript cannot infer accumulator types in
.reduce() when the input comes from a call() result typed as T | null; this is a recurring pattern in workflow bodies.
- Autofix: safe (inject
: number and matching element type based on the array item schema).
Rule: require-workflow-meta-description
- Invalid:
workflow({ meta: { name: "x" }, body: ... })
- Valid:
workflow({ meta: { name: "x", description: "..." }, body: ... })
- Why:
description is required in WorkflowMeta but the compile error only appears at the call site, not at the meta literal. A dedicated lint error points at the missing field directly.
- Autofix: not safe (description content must be human-written).
Documentation gaps
- SKILL.md "High-frequency decisions" table does not mention
workflow() body destructuring syntax ({ call, phase, pipeline }). A one-liner example would prevent the body(call) confusion.
- The
addons ordering rule for [steering(), repair()] is stated in SKILL.md but buried in prose; a table row in the "High-frequency decisions" section would make it scannable.
Tasks run today
- (reused) dotenv vs process.env drift detector: reads .env.example, p.bash grep process.env usages, defineTool + repair, s.record output
- (reused) Vitest snapshot count reporter workflow: two subagents via Promise.all — snapshot scanner + parser
- (reused) Git stale branch age reporter: p.bash git branch -r, defineTool classifyBranchAge with s.enum return
- (reused) TypeScript abstract class finder: p.glob + p.bash, defineTool extractAbstractClass, s.boolean output
- (reused) Dockerfile ENV instruction parser: p.bash find Dockerfiles, defineTool parseEnvInstruction
- (reused) NPM script command prefix analyzer: p.read package.json, defineTool classifyScriptPrefix, s.record outputs
- (new) TypeScript default parameter extractor: p.glob + p.bash + defineTool + repair() addon
- (new) Git branch risk classifier: p.bash + defineTool + steering() + repair() in order
- (new) Test file coverage pipeline: 3-stage sequential workflow() + call() pipeline
- (new) JSON schema type distribution: p.glob + p.bash + defineTool + s.record(s.int) aggregation
Generated by Daily Rig Task Generator · sonnet46 198.2 AIC · ⌖ 8.45 AIC · ⊞ 6.8K · ◷
Summary
s.record+defineTool+repair()composed cleanly;as constneeded on return literalsworkflow()meta requiresdescriptionfield — omitting it caused initial failure;Promise.all+ explicit type annotations on reduce neededdefineToolreturnings.enumliteral withas constworked correctlyp.glob+p.bashcombined cleanly;s.booleanoutput field from tool worked wellp.bash findchained correctly; tool returned structured object without issuep.read+s.record(s.object(...))+s.record(s.int)— smooth patternp.glob+p.bash+repair()addon; implicitanyon reduce avoided with explicit annotationssteering()+repair()addon ordering ([steering(), repair()]) required attentioncall()workflow;call()returns `TdefineToolwith JSON.parse in handler;s.record(s.int)for type distribution mapProblems encountered
No typecheck failures this run after fixing two issues discovered during development:
workflow() meta missing
description(task 2): The initial version usedmeta: { name: "..." }withoutdescription. TypeScript surfaced:Property 'description' is missing in type '{ name: string; }' but required in type 'WorkflowMeta'. Fix: adddescription: "..."to all workflow meta objects.workflow body destructuring and
calltype (task 2): Initial version usedbody(call)but the correct form isbody: async ({ call }) => .... Also,Promise.all+call()results are typedT | null, requiring null-coalescing when accessing fields.reduce implicit
any(task 2):.reduce((sum, f) => sum + f.lineCount, 0)failed with implicitanyerrors. Fix: explicit type annotations(sum: number, f: { lineCount: number }).Improvement opportunities
Missing or undiscoverable schema helpers (
s.*)No gaps found.
s.record(s.int)for count maps ands.record(s.object(...))for keyed maps worked as documented. The SKILL.md table covers these well.Missing or undiscoverable prompt helpers (
p.*)p.glob→p.bash findcombo is commonly needed when a glob finds paths but content also needs to be fetched. Ap.readGlob(pattern)helper that inlines file content would reduce this pattern.p.readOptionalwas referenced in several pool descriptions but not exercised; it is documented in SKILL.md but the fallback parameter semantics could use an inline example.Error message quality
WorkflowMeta.description is missingTypeScript error is clear and actionable.calltype error (This expression is not callable. Type 'WorkflowContext<unknown>' has no call signatures) was confusing — the actual issue was destructuringbody(call)instead ofbody: async ({ call }) =>. A targeted lint rule or better error message could help here.API ergonomics
call()return type isT | null: Every caller must null-coalesce. This is correct behavior on agent failure, but it adds boilerplate at every call site in workflows. A helper likecall.required(...)that throws on null might improve workflow readability.as conston tool return literals: Required for enum schema comparison, but easy to forget. A lint rule catchingreturn "value"in adefineToolhandler where the return type iss.enum(...)would catch this reliably.steering()+repair()ordering: The rule is[steering(), repair()]but the SKILL.md table says "Retry with final-turn warning" without making the required order visually prominent. A note in the addons section would help.Candidate lint rules
Rule:
no-untyped-reduce-in-workflow.reduce((sum, f) => sum + f.x, 0).reduce((sum: number, f: { x: number }) => sum + f.x, 0).reduce()when the input comes from acall()result typed asT | null; this is a recurring pattern in workflow bodies.: numberand matching element type based on the array item schema).Rule:
require-workflow-meta-descriptionworkflow({ meta: { name: "x" }, body: ... })workflow({ meta: { name: "x", description: "..." }, body: ... })descriptionis required inWorkflowMetabut the compile error only appears at the call site, not at the meta literal. A dedicated lint error points at the missing field directly.Documentation gaps
workflow()body destructuring syntax ({ call, phase, pipeline }). A one-liner example would prevent thebody(call)confusion.addonsordering rule for[steering(), repair()]is stated in SKILL.md but buried in prose; a table row in the "High-frequency decisions" section would make it scannable.Tasks run today