Skip to content

docs/ gains a CLI manual, and the commands stop living only in --help - #162

Merged
ninjudd merged 6 commits into
mainfrom
docs/cli
Oct 11, 2026
Merged

ninjudd merged 6 commits into
mainfrom
docs/cli

Conversation

@eve-nyx-13

@eve-nyx-13 eve-nyx-13 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

docs/ described every concept and no command. Architecture, tracks, the project model, the build graph and the audio engine explain what a track is and why the cache is the freeze, but nothing said what to type. The five-line "Try it" block in the root README was the whole of the usage documentation, and everything past it was field --help and reading cli.ts.

docs/cli.md is that missing page, and it is organized by task: install, labels, check, look around, build, play, watch, transport, record, export, sharing through a remote, create, generate, plugins, and sc render, followed by environment variables, platform notes and a command table. Every transcript in it is real output, not an invented example, and the ones that read examples/bloom work on a fresh checkout. That is why the graph, build, watch and export examples use tall-grass: creek's generated takes are not committed.

What it says that --help cannot

  • A bare song name plays live; an explicit label plays the built artifact. Every play option works on both, except --watch, which follows a live song only. On a live song, --from with --loop is a region loop that wraps from the song's extent back to the position. --click is the engine's metronome on either kind of target.
  • Build output has a four-word vocabulary. built ran the work, cached returned a stored artifact, fetched downloaded it from the project's remote, and source is a committed file that was never built at all. Saying cached about a source would claim a hit that never happened.
  • Export's reverted is the line to stop on. It means these bytes match an older version, so a change was undone and the highest-numbered export is not what you just built.
  • field --version reports daemon builds, not just the CLI's. A daemon started before the last pnpm build:native still runs the old code, and field transport quit is how you retire it.

Recording and the remote get a short section each, with the depth left to audio-engine.md and remote.md rather than repeated.

What it deliberately leaves alone

docs/README.md's "V1 platform scope" is untouched. It still lists Windows as out of scope, and amending it belongs to windows-portability.md chunk 5, not to a page describing what works today. The platform section states the macOS and Linux behaviour: AU exists only on Apple platforms, and the afplay fallback is deliberately macOS-only. It points at both port plans. Its sentence about the Windows port cites windows-portability.md §2.2 "as amended", and that amendment arrives with #161, so this should merge after #161.

Review notes

Both index edits ride along, per the convention that every doc is listed: docs/README.md's Documentation list and AGENTS.md's docs line.

Testing

Run these from the repository root of a checkout of this branch. They need pnpm install --frozen-lockfile and pnpm build. They also need either pnpm build:native or FIELD_AUDIOD pointing at a built field-audiod, plus sclang for tall-grass's SuperCollider loop. I ran them with node ../../dist/cli.js in place of field.

cd examples/bloom
field check                                   # ok
field --version                               # a "remote" line between "worker protocol 2" and "daemons in ."
field query "deps(tall-grass/track:room)"     # four labels, exit 0
field explain tall-grass/track:room           # ends with: cable: receive "drum-verb" ← track:drums, -10.0 dB (tap post), arrives at sample 0
field build tall-grass                        # six built (or cached) lines
mkdir -p /tmp/mixes
field export tall-grass --to /tmp/mixes       # exported … tall-grass-track-main-v<n>.wav
field export tall-grass --to /tmp/mixes       # current  … the same file
field export tall-grass --rate 44100 --bit-depth 16 --to /tmp/mixes   # exported … tall-grass-track-main.44100-16-v<n>.wav
FIELD_AUDIOD_NULL=1 field play tall-grass --click            # plays; ctrl-c stops
FIELD_AUDIOD_NULL=1 field play tall-grass --from 2 --loop    # "(looping)", and the position wraps from about 3.6 back to 2.1
field transport quit

The change is wrong if any of the following happens. field explain or field query exits 1 with "has no takes yet". --version shows no remote line. The export names differ from the manual's. Either play command prints a refusal instead of playing.

The remote line reads token in keychain on a machine logged in to audiofield.io. For the manual I captured not logged in with a security stub on PATH that exits 44. field devices and field transport status print your own machine's device names. The field import and field record examples write into the project, so I ran them in a scratch copy of examples/bloom. The import used a 24-bit WAV made with afconvert. The record example used a record: track made with field track create tall-grass vocal and a null-input daemon (FIELD_AUDIOD_NULL=1). It printed take tall-grass/vocal ← take-… at bar 2, chosen (…, 1.6 s) and exited.

Afterwards, examples/bloom/.field/ holds the build cache, which is gitignored, and /tmp/mixes holds the exports. field transport quit stops the daemon those commands started for the project. pnpm typecheck, pnpm test (799 passed, 1 skipped) and project check pass.

🤖 Generated with Claude Code

📽️ Projector summary of d0adbc3: https://field.amnes.ac/reviews/162

`docs/` described every concept and no command. Architecture, tracks, the
project model, the build graph and the audio engine explain what a track
is and why the cache is the freeze, but nothing said what to type; the
five-line "Try it" block in the root README was the whole of the usage
documentation, and everything past it was `field --help` and reading
`cli.ts`.

`docs/cli.md` is that missing page, task-first: install, labels, check,
look around, build, play, watch, transport, export, create, generate,
plugins, `sc render`, then environment variables, platform notes and a
command table. Every transcript in it is real output rather than an
invented example.

The parts worth writing down are the ones `--help` cannot say in a
sentence. A bare song name plays live while an explicit label plays the
built artifact, and that distinction decides which options are legal —
`--click` and a live song refuse each other, and so do `--from` and
`--loop`. Build output has a three-word vocabulary where `source` is not
a cache hit. Export's `reverted` is the line to stop on, because it means
the newest version on disk is not what you just built.

`docs/README.md`'s "V1 platform scope" is deliberately untouched. It
still lists Windows as out of scope, and amending it belongs to
windows-portability.md chunk 5 rather than to a docs page describing what
works today; the platform section states the macOS and Linux truth and
points at both port plans instead.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@eve-nyx-13

Copy link
Copy Markdown
Contributor Author

Starting review of c0bd998.

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings below; requesting changes on c0bd99854ccbc1d3a6ae46806e41ec4f4ce61a3d. Submitted as a COMMENT review because the reviewing account authored the pull request.

One finding, in the platform notes. The rest of the manual is accurate, and I checked it the way a manual deserves — against cli.ts rather than against itself.

The command surface matches

Every row of the command reference resolves. The two I expected to be wrong are right: field import <file> --song <name> is a requiredOption, and so is choose's --variant <n> — both genuinely required, so spelling them in the table is correct rather than noise. field status, field fmt, field arrangement, plugins scan|list|pin and the sc render subcommand all exist as written, and --watch really is a build option.

The transcripts are real

The body claims they are actual output, and the formatting proves it rather than merely being plausible. buildStatus returns status.padEnd(6) followed by two spaces, which is exactly the column the transcript shows:

cached  //songs/tall-grass/track:bass → …     6 + 2
built   //songs/tall-grass/gen:seven-eight-loop → …   5 + 1 pad + 2

The → .field/out/… suffix is real too (const where = o.outputPath ? ' → ' + projectRelative(…)), and I nearly filed it as invented before finding it — the watch branch omits it, which is what made it look wrong. ↻ //songs/creek/track:main 4f2a91c0b8de matches sha256.slice(0, 12) at twelve characters, and · no audible change and watching for changes (ctrl-c stops) are verbatim.

The four claims the body highlights all hold

  • built / cached / source is exactly cli.ts:404 — o.committed === true ? 'source' : o.cached ? 'cached' : 'built'.
  • reverted is cli.ts:483 — r.unchanged && r.version < r.newest, printed with (v<n> is newer and different). The manual is right that it is the line to stop on.
  • The two refusals are real and the manual scopes both correctly: --click on a live song throws "--click rides file playback", and play.ts:385 refuses --from with --loop as a region loop. Saying "on a live song" rather than "always" is the accurate framing, since the artifact path takes both.
  • field --version reporting daemon builds matches version.ts, which dials each daemon's socket.

Both index edits ride along as the convention wants, and the merge against #157 is clean (git merge-tree exits 0), so the docs/README.md list entry and #157's platform paragraph do not collide.

One note that is not a finding

The body says amending docs/README.md's "V1 platform scope" "belongs to windows-portability.md chunk 5". That was true when §5 said so, but #157 moved it: §2.4 tied the Active flip to that amendment, so #157 already makes it, and its §5 chunk 5 entry records the move. The manual itself is unaffected either way — it links to the section rather than restating it, and that link stays correct after #157 lands. Only the rationale in the pull request body is stale.

Comment thread docs/cli.md Resolved
eve-nyx-13 added a commit that referenced this pull request Aug 18, 2026
The guard was win32-only, so Linux without a built daemon still spawned
afplay and died with ENOENT naming a macOS binary — and docs/cli.md's
description of a deliberate macOS-only fallback was ahead of the code.
afplay is dead code off macOS by definition; refusing with the build
hint loses nothing anywhere and makes the manual's sentence true. The
message drops the platform name since it now serves two.

Co-Authored-By: Claude Fable 5 <[email protected]>
eve-nyx-13 added a commit that referenced this pull request Aug 18, 2026
The guard was win32-only, so Linux without a built daemon still spawned
afplay and died with ENOENT naming a macOS binary — and docs/cli.md's
description of a deliberate macOS-only fallback was ahead of the code.
afplay is dead code off macOS by definition; refusing with the build
hint loses nothing anywhere and makes the manual's sentence true. The
message drops the platform name since it now serves two.

Co-Authored-By: Claude Fable 5 <[email protected]>
… flight (#162 review)

The review is right on both counts: no platform guard exists on this
branch's base, and the one #161 adds began win32-only — the paragraph
described a deliberate macOS-only fallback that was neither. It now
says what a reader actually hits today (spawn afplay ENOENT off macOS,
after the stderr hint), then names the refusal #161 brings to every
non-macOS platform, citing windows-portability.md §2.2 as amended —
which is where the widening got its decision record during this same
review cycle.

Co-Authored-By: Claude Fable 5 <[email protected]>
@eve-nyx-13

Copy link
Copy Markdown
Contributor Author

Starting review of dcabd76.

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings on dcabd76cdd5e9c5da74ccd8a59b4b30f67c640d5; this is an approval in words, submitted as a COMMENT review because the reviewing account authored the pull request.

The paragraph now describes what a reader actually hits, and the quoted error is exact rather than approximate. I ran the spawn instead of trusting the format string:

$ node -e "spawn('afplay', …).on('error', e => console.log('afplay failed: ' + e.message))"
afplay failed: spawn afplay ENOENT

Verbatim what the manual prints. The stderr line it mentions is real too — field-audiod is not built; using afplay (pnpm build:native) at cli.ts:587 — and "after a stderr line pointing at pnpm build:native" is the right way to describe it, since that hint is a notice and the ENOENT is the failure. Both plan links resolve.

Naming #161 as in review, rather than either pretending the guard exists or leaving the reader to discover the ENOENT, is the better shape for a page that has to be true on the day it merges and still true after the port lands.

One ordering nicety, not a finding

The sentence points at windows-portability.md §2.2 "as amended", and that amendment arrives with #161 — on main today §2.2 is still the Draft "Decisions to make" text, with no amendment to find. Everything about behaviour in the paragraph is now true regardless of merge order, so this is a dangling cross-reference at worst, and only in the window where this merges ahead of #157 and #161. Not worth holding the page for; worth knowing if you merge this one first.

minjudd
minjudd previously requested changes Sep 7, 2026

@minjudd minjudd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 Projector review · model claude-opus-5[1m] · effort xhigh · CHANGES REQUESTED · took 2m 52s

3 finding threads: 1 resolved, 2 open — this review opens the 2.

I checked the manual against the CLI mechanically rather than by reading, and the command surface is accurate. Every --flag the document mentions exists in src/cli.ts — 33 distinct flags on both sides, with an empty difference:

$ comm -23 doc-flags.txt code-flags.txt      # in the doc, not in the CLI
(empty)

The subcommand structure checks out too, including the one that is easy to get wrong: transport documents status, locate, play, pause, stop and quit, and the CLI defines status and locate <position> explicitly with the other four generated by for (const op of ['play', 'pause', 'stop', 'quit']). All six are real.

I also ran the read-only transcripts against examples/bloom rather than trusting them, and the two that work reproduce exactly — field check prints ok, and field arrangement creek matches the documented block line for line, down to the (+3 dB, pan 0.2) annotations and the 5.1.1 0:10.0 offsets. That is a good sign about how the document was written.

The Platform notes section is right, including the part that would have been easy to get wrong. It describes what main does today — the fallback attempted everywhere and failing off macOS with afplay failed: spawn afplay ENOENT — and separately says #161 replaces that with a plain refusal. I checked main's playWithAfplay and it indeed has no platform guard at all, so the present tense here is accurate rather than aspirational, and the forward reference is labelled as one.

The two findings are below: two links that the Projector move turned into dead ends, and two transcripts that a reader following along cannot reproduce.

Not filed: this merges cleanly into main (I test-merged it), so unlike the windows/* stack it carries no layout blocker of its own — which is exactly why the dead links matter here, since nothing else will stop them landing. The linux check on this head is the Actions spending-cap failure, as everywhere else.

Comment thread docs/cli.md Resolved
Comment thread docs/cli.md Resolved
Brings the CLI manual up to date with main. The merge is clean, but main's Projector layout (#164) moved the plans out of docs/projects/all/, so the manual's two links to windows-portability and linux-portability now use docs/projects/<name>/readme.md. Every relative link in docs/cli.md resolves on the merged tree.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 10m 35s

This pull request adds docs/cli.md, a task-oriented manual for the field command, and lists it in docs/README.md and AGENTS.md. Since the last review, main was merged into the branch and the manual's two plan links were repointed at the Projector layout. That merge also brought in recording (#166 to #170) and the remote commands (#171 and #172), which change what several documented commands do and print. The manual does not reflect those changes yet.

5 finding threads: 1 resolved, 4 open

Covered 3 of 3 changed files. All three are documentation, read directly against src/ at 6a310a4.

This head was reviewed by reading only, and none of its code was run. Its author, eve-nyx-13, has no write access to okamnesiac/field, so the head is untrusted. Each finding below cites the code that prints the behavior and, where one exists, the test that pins it.

Earlier findings at this head:

  • The plan links at lines 421 and 423 are fixed. Both links now resolve to docs/projects/<name>/readme.md, and that thread is resolved.
  • field query and field explain on creek/track:space (lines 139 and 148) still fail on a fresh checkout. space takes cable inputs from track:keys and track:lead-vocal, whose generated takes are not committed (examples/bloom/songs/creek/audio/ holds only .gitkeep). deps refuses in assertGenerated and explain refuses in resolveLabel with "has no takes yet". That thread stays open.

The rest of the manual matches the code: the label forms, the status counts (creek 14 tracks and 25 inputs, tall-grass 6 and 6), the arrangement and build tall-grass transcripts, the watch output, the transport commands, sc render, the plugin commands and chooser, FIELD_SCLANG and FIELD_AUDIOD resolution, and the platform notes. No plan changes status in this pull request.

Suggestions

  • docs/cli.md:38: every stem, every resample, and every hosted-plugin insert renders by spawning field-audiod (src/generators/stem.ts:483, src/generators/resample.ts:38), not only eq, limit, reverb, plate and hall targets. Say that every track renders through the daemon, which is the stronger reason to build it first.

Comment thread docs/cli.md Resolved
Comment thread docs/cli.md Resolved
Comment thread docs/cli.md Resolved
`field query`, `field explain` and `field build --watch` used creek, whose
generated takes are not committed, so all three stopped at "has no takes
yet" on a fresh checkout. They now use tall-grass, and `track:room` still
shows the cable line `track:space` was chosen for. Every transcript is
real output from examples/bloom at this head.
The merge of main brought in recording (#166 to #170) and the remote
(#171, #172), and the manual predated both. It now has a "Record a take"
section and a "Share a project through a remote" section, rows for
record, login, logout, clone, push and pull, `fetched` in the build
vocabulary, `choose --take`, the input device list, and FIELD_REMOTE and
FIELD_TOKEN.

The play section said a live song refuses `--click` and `--from` with
`--loop`. Both work: the engine synthesizes the click, and `--from` with
`--loop` is a region loop on the live session. The section now says
what each does.

The `--version`, `devices`, `transport status`, `export` and `import`
transcripts are rerun at this head, and the install section says every
stem renders through field-audiod, not only effect inserts.
The --version report gained a remote line with the remote commands, and the command reference row still described only the CLI and daemon builds.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CLEAN · took 4m 20s over 2 heads

This pull request adds docs/cli.md, a task-oriented manual for the field command, and lists it in docs/README.md and AGENTS.md. Since the last review, three commits brought the manual up to date with recording and the remote commands that the merge of main pulled in. They moved the graph, build, watch and export examples to tall-grass, which a fresh checkout can build, reran the transcripts, and added a "Record a take" section and a "Share a project through a remote" section.

5 finding threads: 5 resolved, 0 open

Covered 3 of 3 changed files. All three are documentation, read directly against src/ at d0adbc3.

This head was reviewed by reading only, and none of its code was run. Its author, eve-nyx-13, has no write access to okamnesiac/field, so the head is untrusted. Every claim below was traced in the code, and where a test pins the behavior, the test is named.

Earlier findings, checked at this head (all five threads are resolved):

  • Plan links. Both still resolve to docs/projects/<name>/readme.md.
  • query and explain on a fresh checkout. The examples now use tall-grass/track:room. Its dependencies are a SuperCollider node and two stems, so no takeless gen node is reached. The query output matches deps, which lists dependencies first and the node last. The explain output matches src/cli.ts:1029-1074 for a label whose input is not built yet: no action: line and no output: line, as the new paragraph says. A sentence now says why creek cannot answer either command.
  • Transcripts. --version shows the remote line formatRemoteReport prints. devices shows the output: and input: lists. Export writes tall-grass-track-main-v1.wav, then current, then tall-grass-track-main.44100-16-v1.wav (exportBaseName, src/commands/export.ts:274). Import reports audio/rain/rain.wav. transport status names field-audiod 0.14.0, which is this head's native/audiod/src/version.h.
  • Play options. The table and prose match playLiveSession: the engine click (sendClick) on both kinds of target, a region loop from --from to the content's extent on a live song, and a requeue from the position on an artifact. --watch is still refused on an artifact (src/cli.ts:734-738).
  • Recording and the remote. The new sections match the code:
    • createTrack places the new track in main.
    • A bare - record: with no takes is a warning and check still passes, which src/model/project.test.ts:1639-1647 pins.
    • record loads the song as the bed when nothing is loaded. It refuses --until without --at, --count-in without --at, and --loop without --until or on a file bed (src/commands/record.ts:141-144, :177-186, :207, :235).
    • Landing moves the WAV to audio/<node>/ and chooses the new take in takes.yaml (src/commands/land.ts:164-248).
    • The remote table, --no-remote, fetched, and FIELD_REMOTE and FIELD_TOKEN agree with src/cli.ts and docs/remote.md.
    • The anchors #crash-safe-recording, #recorded-takes and #which-remote exist.

The pull request body asks for this to merge after #161, which is still open, because the platform note cites the §2.2 amendment that #161 carries. On this branch §2.2 of the Windows plan is still an open decision. The head looks clean, and a human approval is what remains.

Suggestions

  • docs/cli.md:7: "Every command runs from inside a project" is not true of init, clone, login, logout, sc render or --version, and the page now documents clone, which a reader runs before a project exists. Say "Most commands".
  • docs/cli.md:87: explain takes one label and record one track (resolveRecordTarget refuses a pattern), so "Commands that take labels take several at once" fits build, export and play only.

@ninjudd
ninjudd dismissed stale reviews from minjudd and themself October 11, 2026 03:53

Superseded: the review loop's CLEAN verdict on d0adbc3 covers the current head. Dismissed at Justin's request while Projector learns to clear its own stale verdicts.

@ninjudd
ninjudd merged commit b912ce8 into main Oct 11, 2026
1 check passed
@ninjudd
ninjudd deleted the docs/cli branch October 11, 2026 04:16
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.

3 participants