Skip to content

Declare target machine on import over cli - #628

Merged
seanhodges merged 2 commits into
mainfrom
claude/machine-declaration-converted-l6ekmi
Sep 13, 2026
Merged

seanhodges merged 2 commits into
mainfrom
claude/machine-declaration-converted-l6ekmi

Conversation

@seanhodges

@seanhodges seanhodges commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

The caller can now ask for the source to open with a #MACHINE line naming
that machine, so the text alone settles what to lint, build or run it as.

This helps external tools consume the convert operation, which otherwise returns the program without any metadata about which machine the program is for.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw

`convert` answers with the machine beside the source, which serves a caller
writing the text to a file it has just named and nothing else: an editor
opening a freshly converted program has a listing whose machine has just been
established and no way to tell.

The caller can now ask for the source to open with a `#MACHINE` line naming
that machine, so the text alone settles what to lint, build or run it as. Off
by default - what `convert` answers today is byte-for-byte what it goes on
answering unless asked.

`machineDirective.ts`, which already recognises, parses and strips the line,
gains the writing half, so one module spells the syntax both ways.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw
Fold the headless-cli delta into the baseline: converting a binary file can
be asked to declare the machine it was read as, and answers unchanged when it
is not asked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw
@seanhodges seanhodges changed the title Let a conversion declare the machine it read Declare target machine on import over cli Sep 13, 2026
@seanhodges
seanhodges merged commit eef3094 into main Sep 13, 2026
8 checks passed
@seanhodges
seanhodges deleted the claude/machine-declaration-converted-l6ekmi branch September 13, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants