docs: document run builtin output schema (#5bj)#522
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes pending #5bj.
Summary
The
run cmd argvbuiltin returnsR (M t t) ton success, and the SPEC mentioned the three-key map in prose but never as a formal schema. Personas have been learning the key set (stdout/stderr/code) by trial and error. Doc-only fix: pin the schema in SPEC.md, sync it to ai.txt and the io skill, and add an example that regression-tests the shape across engines.While verifying the keys against
run_spawninsrc/interpreter/mod.rs, I noticed thecodevalue isn't just a decimal string: on unix a signal-terminated child reportssignal:<n>, and an unknown status reportsunknown. That nuance now appears in all three doc surfaces so agents don't have to dig into the source to learn it.What's in the diff
docs: spell out run output map schema in SPEC- SPEC.md gets an explicit key/type/meaning table immediately under theProcess spawnintro paragraph.docs: sync run schema to ai.txt and io skill- ai.txt appends a one-line schema clause to the existingrundescription;skills/ilo/ilo-builtins-io.mdpreviously didn't mentionrunat all, now has a paragraph and example in## Environment / process.examples: add run output schema regression- newexamples/run-output-schema.iloexercises all three keys viamgetand anmget-default sentinel to prove each key is present (not nil), plus thecodepath on a non-zero exit.tests/examples_engines.rspicks it up automatically.Test plan
cargo build --release --features cranelift--vmcargo test --release --features cranelift --test examples_enginespassescargo test --release --features cranelift --test skill_md --test skill_modularpasses (skill files still under their token budget)Follow-ups
None. If the schema ever gains a fourth key (env, duration, etc.), the SPEC table is the canonical place to add it and the other two docs cross-reference it.