Skip to content

Add toggle for auto-commit and push on CLAUDE.md updates #18

@severity1

Description

@severity1

Summary

Add a configuration option to automatically commit and push changes when CLAUDE.md files are updated by the memory-updater agent.

Motivation

Currently, when the memory-updater agent updates CLAUDE.md files, the changes remain as local modifications. Users who want these changes committed and pushed to their repository must do so manually. An auto-commit/push toggle would:

  • Reduce manual steps for teams who want CLAUDE.md always in sync with remote
  • Allow opt-in behavior for users who prefer automatic version control
  • Keep the current manual workflow as the default for users who want control

Proposed Solution

Add configuration options in .claude/auto-memory/config.json:

{
  "triggerMode": "default",
  "autoCommit": false,
  "autoPush": false
}
  • autoCommit: When true, automatically commit CLAUDE.md changes after updates
  • autoPush: When true, push commits to remote (only applies if autoCommit is also true)

Implementation Notes

  • Default both options to false to preserve current behavior
  • Commit message format: chore: update CLAUDE.md [auto-memory]
  • Only commit CLAUDE.md files, not other staged changes
  • Handle push failures gracefully (log warning, don't block workflow)

Acceptance Criteria

  • Add autoCommit and autoPush config options
  • Update memory-updater agent to check config and perform git operations
  • Add documentation for new options
  • Add tests for auto-commit/push behavior

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