feat: add s.nonEmptyObject schema helper and p.writeOutput prompt helper#73
Merged
pelikhan merged 3 commits intoJul 23, 2026
Conversation
- Add s.nonEmptyObject(valueSchema, description?) as a constrained RecordSchema with minProperties:1; validates that the record has at least one key at runtime - Add p.writeOutput(field, path, options?) prompt intent that instructs the harness to write the value of a named output field to a file after generation, solving the p.write ambiguity for LLM-generated content - Update RecordSchema type to include optional minProperties field - Update serializeSchema to emit minProperties in JSON Schema output - Update validateSchema to enforce minProperties on record schemas - Add 9 new tests covering both features - Update SKILL.md and README.md with new helpers and clarifications - Update file-header comment in rig.ts Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue in daily rig evaluation tasks
feat: add s.nonEmptyObject schema helper and p.writeOutput prompt helper
Jul 23, 2026
pelikhan
marked this pull request as ready for review
July 23, 2026 20:50
Collaborator
|
@copilot resolve the merge conflicts on this branch. |
…ly-evaluation-2026-07-23-05bbf768-0444-46af-9ac5-158180a6904e # Conflicts: # skills/rig/rig.ts Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Resolved. The two conflicts were both in the
All 189 tests pass (bd37a90). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the daily rig evaluation, two gaps were identified: no way to reject empty
{}map outputs at validation time, and no clean way to wire an LLM-generated output field to a file path (the existingp.writetakes a static string, creating ambiguity about who provides the content).s.nonEmptyObject(valueSchema, description?)Constrained
RecordSchemawithminProperties: 1— mirrorss.nonEmptyArrayfor maps.RecordSchematype gains an optionalminPropertiesfieldserializeSchemaemitsminPropertiesin JSON Schema outputvalidateSchemaenforces the constraint at runtimep.writeOutput(field, path, options?)New prompt intent (
mode: "prompt.writeOutput") that tells the harness to write the value of a named output field to a file after the agent generates its response — solving thep.writecontent-source ambiguity.Use
p.writeOutputwhen the content is LLM-generated; usep.writefor static content.Docs
SKILL.mdandREADME.mdupdated with both helpers, usage examples, and ap.writevsp.writeOutputguidance noterig.tsfile-header comment updated