docs: input-form decision rule + @- heredoc as the hook-safe path#334
Merged
Conversation
…path The @- stdin/heredoc route already works and is the cleanest way to make a single multi-line edit without writing a file — and because the command line starts with ./supertool (no cat/echo), it survives enforced/autonomous runs that block bare shell builtins. The docs covered the mechanic but never the decision: when to pick colon-CLI vs @- vs @file. Add a 'Which form?' table to input-forms.md naming the cat-to-file trap, and expand the bare @- line in edits.md with a working heredoc example and cross-link. Refs #328 Co-Authored-By: Max <noreply>
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.
Context
Filed as #328 ("no supertool-native way to build an @file edit payload → forces
catheredocs"). Investigating it showed the capability was never missing:edit:@-with a TOML heredoc already makes a single multi-line edit with no file, and because the command line starts with./supertool(notcat/echo), it survives enforced/autonomous runs that block bare shell builtins. The real gap was guidance — the docs covered each mechanic but never the decision of when to pick colon-CLI vs@-vs@file, so readers (and agents) defaulted to thecat > filedetour that trips shell-tool guards and forces hand-escaped\nJSON.Changes
docs/input-forms.md— new Which form? table choosing by content shape; frames@-heredoc as the no-file/hook-safe single-edit path and names thecat > filetrap explicitly.docs/operations/edits.md— expand the bare@-one-liner into a workingedit:@-heredoc example + cross-link to the decision table.Docs only, no code change. The
@-route itself is unchanged — verifiededit:@-with a TOML body edits + runs validators correctly.Closes #328
🤖 Generated by Max — turns out the missing feature was a paragraph.