myco_molt
Atomically update contract version, changelog section, and wave counter for release.
Instructions
Ship a contract-version bump: update _canon.yaml's contract_version and synced_contract_version fields to the new value, append a stub section to docs/contract_changelog.md with placeholders, and advance waves.current counter. The atomic molt keeps all three version knobs in lockstep and produces a reviewable one-commit diff.
Use this AT RELEASE TIME, not during development. Pair with .scripts/bump_version.py which orchestrates molt alongside the package-version bump in init.py, plugin.json, and CITATION.cff. Do NOT call this mid-session for ad-hoc experiments — the contract_changelog is append-only and reverting a molt requires an explicit down-bump.
Side effects: writes _canon.yaml + docs/contract_changelog.md. R6 write_surface must cover both. Dry-run prints the diff that would be applied. Skip-molt option in bump_version.py exists for cases where the version parity step is separate from the canon stamp.
Returns: { exit_code, new_version, synced_touched, waves_touched, canon_path, changelog_path, canon_preview_head }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contract | Yes | New contract version string, in the form 'v<semver>' (e.g. 'v0.5.23'). Must be strictly greater than the current canon's contract_version per semver comparison. Down-bumps are refused unless --allow-downgrade is passed at the bump_version.py layer (molt itself has no such flag). | |
| dry_run | No | When true, compute the exact canon patch + changelog section that would be applied and return them in the response, without writing. Use to preview before committing the atomic version bump. Default false (writes + returns the same preview so the agent can diff against its pre-bump state). | |
| date | No | Override the date stamp in the contract_changelog.md section header (YYYY-MM-DD format). When null, uses today (UTC). Useful for back-dating a release whose molt was delayed, or for reproducing historical molts exactly. | |
| project_dir | No | Absolute path of the workspace / project whose Myco substrate this call targets. Overrides auto-discovery. When omitted, Myco resolves via MCP roots/list, then MYCO_PROJECT_DIR, then cwd — the substrate_pulse field in every response echoes which source answered. |