Publish a provisional ChangeSet
publish_changesetRecord a finished unit of implementation for an intent so it can be verified and accepted. Use after committing changes and before running verification.
Instructions
Record a finished unit of implementation for your intent so it can be verified and accepted. Use it once the change is committed in your worktree, after check_conflicts and before run_verification. Foremerge snapshots the worktree (defaulting to your registered one), resolves the candidate commit and its diff base, and stores a fingerprint that verification and acceptance are later checked against. files and symbols are inferred only from uncommitted changes, so list them yourself for committed work. The ChangeSet starts PROVISIONAL and the intent becomes PROVISIONAL. Publishing again while the previous ChangeSet is PROVISIONAL or VALIDATED creates a new one, marks the old one SUPERSEDED, and resets verification. Only the intent's owner may publish, while the intent is CLAIMED, IN_PROGRESS, PROVISIONAL or VALIDATED. Git itself is not modified. Returns the ChangeSet, including its chg_ id, fingerprint, and open_conflicts on the intent at that moment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Changed file paths. Left empty, they are inferred from uncommitted changes only, so list them for committed work. | |
| tests | No | Tests you ran yourself. Recorded as history only; acceptance relies on run_verification, not on this list. | |
| git_ref | No | Candidate commit. Omit it: it defaults to the worktree's HEAD, and acceptance rejects any other commit with STALE_CHANGESET. | |
| summary | Yes | What the change does, in one or two sentences. | |
| symbols | No | Code symbols added or changed. Left empty, they are inferred from uncommitted changes only, so list them for committed work. | |
| agent_id | Yes | Your agent id (agt_...). Must own the intent. | |
| base_ref | No | True diff base when known (for example the fork point of this agent branch); defaults to the candidate commit's first parent. | |
| worktree | No | Path of the Git worktree holding the change. Defaults to your registered worktree, then the server's working directory. Must belong to your registered repository. | |
| contracts | No | Named interfaces or agreements this change affects, for example payment-provider. | |
| decisions | No | Design decisions a reviewer or later agent should know about. | |
| intent_id | Yes | The intent (int_...) this implementation fulfils. | |
| provenance | No | Optional JSON object of your own context, such as a prompt or task reference. Foremerge adds Git provenance under provenance.git. | |
| dependencies | No | Intent ids (int_...) this change builds on, and the dependency list acceptance enforces. accept_changeset refuses with UNSATISFIED_DEPENDENCY unless each is ACCEPTED or COMMITTED and its accepted commit is in this change's Git history. Intent ids only: not package or library names. |