Description
Add a partio commit command that wraps git commit to directly embed checkpoint information as a git header in the commit object. This provides a hookless alternative to the current git-hooks-based workflow, giving users explicit control over when checkpoint metadata is attached.
The command should:
- Stage and create the commit (delegating to git or using go-git)
- Detect the active agent session (Claude Code, etc.)
- Prompt the user to confirm linking the session to the commit
- Calculate attribution and create the checkpoint
- Write the checkpoint ID both as a custom git header (
checkpoint <id>) and as a Partio-Checkpoint trailer in the commit message
- Condense the session transcript
This enables users who cannot or prefer not to install git hooks (e.g., in environments with hook managers, CI systems, or shared repositories with hook policies) to still capture checkpoint data with every commit.
Why
The current hook-based approach requires partio enable to install git hooks, which can conflict with other hook managers (Husky, Lefthook, hk) or be stripped by CI environments. A dedicated commit command provides a reliable, explicit alternative that doesn't depend on hook infrastructure. It also gives users clearer visibility into what Partio is doing at commit time.
Acceptance criteria
partio commit -m <message> creates a git commit with checkpoint metadata embedded as a git header
- The command detects the active agent session and prompts the user to link it
- Checkpoint trailer is written both as a git header and as a commit message trailer for backwards compatibility
- The command works without requiring git hooks to be installed (hookless workflow)
- Attribution is calculated and stored in checkpoint metadata during the commit
- Session transcript is condensed after checkpoint creation
- All relevant
git commit flags (e.g., -a, --amend, --allow-empty) are passed through
- Unit tests cover the commit object creation and header embedding
Source
Inspired by entireio/cli PR #924
Description
Add a
partio commitcommand that wrapsgit committo directly embed checkpoint information as a git header in the commit object. This provides a hookless alternative to the current git-hooks-based workflow, giving users explicit control over when checkpoint metadata is attached.The command should:
checkpoint <id>) and as aPartio-Checkpointtrailer in the commit messageThis enables users who cannot or prefer not to install git hooks (e.g., in environments with hook managers, CI systems, or shared repositories with hook policies) to still capture checkpoint data with every commit.
Why
The current hook-based approach requires
partio enableto install git hooks, which can conflict with other hook managers (Husky, Lefthook, hk) or be stripped by CI environments. A dedicated commit command provides a reliable, explicit alternative that doesn't depend on hook infrastructure. It also gives users clearer visibility into what Partio is doing at commit time.Acceptance criteria
partio commit -m <message>creates a git commit with checkpoint metadata embedded as a git headergit commitflags (e.g.,-a,--amend,--allow-empty) are passed throughSource
Inspired by entireio/cli PR #924