Tracking: rename creation hooks pre-start/post-start → pre-create/post-create
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the Phase 1 details in this issue and inspect the existing hook configuration, migration, and CLI parsing code; reuse the mechanical edits on the hooks/rename-start-to-create branch. Update the primary docs in src/cli/mod.rs, regenerate the docs/content/ and skills/worktrunk/reference/ mirrors, and run cargo test --test integration test_docs_are_in_sync. Done means the Phase 1 checklist is complete, including config migration coverage, examples and schema, and a changelog entry explaining the semantic flip.
Written by the indexing model from the issue text.
Description
Summary
Rename the worktree-creation hooks from pre-start/post-start to pre-create/post-create. post-start keeps confusing users ("start of what?", #1571). Hook names are protected interfaces (the wt.toml format and the wt hook CLI), so this ships as a staged deprecation rather than the breaking change already on the hooks/rename-start-to-create branch.
End state: -create canonical everywhere, -start accepted through a silent migration and then a warned one.
The semantic flip (main risk)
pre-create is a new name with no history. post-create is being reclaimed, and its meaning inverts: the old post-create was blocking (the pre-0.32.0 name for pre-start), the new one is background (an alias of post-start). A config still holding a stale post-create would flip from blocking to background silently. This is contained: post-create has been a fatal load error since 0.44.0, so by Phase 1 it will have been a hard error for roughly ten releases. The Phase 1 changelog states the flip plainly.
Plan
Releases land roughly weekly, so phases are paced in months.
- Phase 1 (~June 2026): both names work, no warnings.
-createbecomes the canonical serde field;migrate_content()rewrites-startsilently; docs andwt config updatemove to-create. The dead pre-0.32.0post-createmachinery is removed first. - Phase 2 (~September 2026): add deprecation warnings on config load and on
wt hook pre-start/post-start, both pointing atwt config update. - Phase 3 (deferred): decide whether
-startkeeps migrating indefinitely, becomes a fatal error, or is removed.
Open decisions
- Bundle the
post-createfatal-error removal into Phase 1 (default), or hold it one release longer. - Cross-link #1571 now, and close it once its docs point lands in Phase 1.
- Phase 3 disposition.
History, current state, and Phase 1 implementation detail
History
This is the third naming move, and it partly reverses the second.
| When | Release | Change |
|---|---|---|
| Before 0.32.0 | Two creation hooks: post-create (blocking) and post-start (background). |
|
| 0.32.0 | #1679 | Hooks reorganized into symmetric pre-/post- pairs. post-create renamed to pre-start, kept as a silently-migrated alias. |
| 0.34.0 | #1776 | post-create removed from the docs. |
| 2026-03-17 | #1571 | Issue filed: hook execution order is confusing and post-start is an unclear name. |
| 0.44.0 | #2361 | post-create config key becomes a fatal load error. Clears the silent migration so the name can be reclaimed. |
| 0.45.1 | #2436 | wt hook post-create CLI alias starts printing a deprecation warning. |
| 0.52.0 (now) | The actual rename never shipped. This issue resumes it. |
Current state
- Canonical:
pre-start/post-start, across config keys,HookType, andwt hooksubcommands. post-createconfig key: fatal load error (POST_CREATE_REMOVED_MSG).post-createCLI:wt hook post-createresolves topre-startwith a warning.- Dead machinery from the unfinished 0.32.0 cycle:
HooksConfig::post_createand its folds,Deprecations::post_create,find_post_create_from_doc. pre-create: never existed.
Phase 1 implementation
Prerequisite, same PR: remove the dead post-create machinery so the name is free.
Config:
pre-create/post-createbecome the canonical serde fields; renameHookType::PreStart/PostStarttoPreCreate/PostCreate.migrate_content()rewrites-startto-create, covering top-level keys,[hooks.*],[projects."id"]flattened and[projects."id".hooks], and the string,[table], and[[array-of-tables]]value forms.wt config updateand the startup warning both run offdetect_deprecations(). Add the-startentry there soupdatefinds it, but leaveformat_deprecation_warnings()silent until Phase 2.
CLI:
parse_hook_typeandHOOK_TYPE_NAMESaccept-create;-startstays accepted with no warning.
Docs:
- Rewrite
src/cli/mod.rs(the primary source), regenerate thedocs/content/andskills/worktrunk/reference/mirrors, updateREADME.md, thedev/*.example.tomlfiles, and the JSON schema. Runcargo test --test integration test_docs_are_in_sync. - Per #1571, tighten the definition of when the hook fires.
- The
hooks/rename-start-to-createbranch already has correct mechanical edits to reuse.
Checklist
Phase 1:
- Remove dead
post-createmachinery -
migrate_content()rewrite covering all config shapes - Canonical serde fields and
HookTypevariants renamed -
parse_hook_type/HOOK_TYPE_NAMESaccept-create - Docs, examples, README, JSON schema updated
-
wt config updatemigrates-startwith no startup warning - Changelog entry naming the semantic flip
Phase 2:
-
-startwarning informat_deprecation_warnings() - CLI stderr warning for
wt hook pre-start/post-start
Phase 3:
- Decide keep, fatal, or remove
This was written by Claude Code on behalf of Maximilian Roos
- Dominant language
- Rust
- Stars
- 8.8k
- Forks
- 315
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 204
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from max-sixty/worktrunk
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
max-sixty/worktrunk#4727 · 7 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
max-sixty/worktrunk#4260 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
max-sixty/worktrunk#3847 · 1 comment ·
Maintainers usually reply within 1 day
-
`wt step` confusionOpen
Difficulty 5/5 Over a week Newbie friendliness 28/100
max-sixty/worktrunk#4728 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
max-sixty/worktrunk#4718 · 1 comment ·
Maintainers usually reply within 1 day
All issues in max-sixty/worktrunk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
n0-computer/iroh#4669 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rubys/roundhouse#1950 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
cloudflare/workers-rs#1130 ·
Maintainers usually reply within 11 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
vfarcic/dot-agent-deck#2160 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RustCrypto/utils#1597 ·
Maintainers usually reply within 1 day