Skip to content

harvest --prompt-only refuses to print the contract without a transcript and a diff #229

Description

@MongLong0214

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions