Skip to content

feat: import memories from git commit history #3

@natedemoss

Description

@natedemoss

Problem

Projects with long git histories have a wealth of decisions and gotchas buried in commit messages, PR descriptions, and merge commits — none of which TeamMind currently captures.

Proposed solution

A teammind git-import command that scans the repo'''s git log and extracts memories from commit messages that match signal language:

teammind git-import              # scan last 200 commits
teammind git-import --limit 500  # scan further back

Implementation

  • Use git log --pretty=format:"%H %s %b" to pull commit messages + bodies
  • Run the existing scoreAndTag() function from src/extract.ts against each message
  • Save anything above the score threshold as a memory tagged with decision or gotcha
  • Set created_by to the git commit author
  • Skip commits already imported (store processed commit hashes)
  • Dedup against existing memories using the existing cosine similarity check

Notes

This gives new team members instant historical context without needing to replay every session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions