Summary
harvest --prompt-only is documented as "print the prompt contract for the session and exit", but it
refuses to print anything unless both --transcript and --diff are also supplied. The contract
is the thing a session needs before it has produced a transcript, so requiring one to obtain it
inverts the order of use.
Version
commitlore 0.2.1
Reproduction
In any repository with commits:
$ commitlore harvest --prompt-only
commitlore: harvest skipped — no --transcript, and there is no session to read one from
$ echo $?
0
$ commitlore harvest --prompt-only --diff some.diff
commitlore: harvest skipped — no --transcript, and there is no session to read one from
$ commitlore harvest --prompt-only --transcript some.txt
commitlore: harvest skipped — no --diff and nothing staged
$ commitlore harvest --prompt-only --transcript some.txt --diff some.diff
# CommitLore harvest
...the full contract...
Expected
--prompt-only prints the contract and exits, with no other input required. Its stated purpose is to
hand a session the rules it must follow, which is knowable without any transcript or diff.
Actual
The contract is reachable only by supplying a transcript and a diff, so an agent that wants to know
the rules first has to fabricate both. Fabricating a transcript to read the rules is exactly what
rule 2 of that contract, "Do not infer", tells the agent not to do.
Impact
An agent following the documented flow (read the contract, then harvest) cannot start. The workaround
is to pass a throwaway transcript, which trains the wrong habit and risks a fabricated record.
Note on exit status
All four invocations exit 0, including the two that produced no contract. A caller cannot distinguish
"contract printed" from "refused" by status alone; it has to parse stdout.
Summary
harvest --prompt-onlyis documented as "print the prompt contract for the session and exit", but itrefuses to print anything unless both
--transcriptand--diffare also supplied. The contractis the thing a session needs before it has produced a transcript, so requiring one to obtain it
inverts the order of use.
Version
commitlore 0.2.1
Reproduction
In any repository with commits:
Expected
--prompt-onlyprints the contract and exits, with no other input required. Its stated purpose is tohand a session the rules it must follow, which is knowable without any transcript or diff.
Actual
The contract is reachable only by supplying a transcript and a diff, so an agent that wants to know
the rules first has to fabricate both. Fabricating a transcript to read the rules is exactly what
rule 2 of that contract, "Do not infer", tells the agent not to do.
Impact
An agent following the documented flow (read the contract, then harvest) cannot start. The workaround
is to pass a throwaway transcript, which trains the wrong habit and risks a fabricated record.
Note on exit status
All four invocations exit 0, including the two that produced no contract. A caller cannot distinguish
"contract printed" from "refused" by status alone; it has to parse stdout.