> ## Documentation Index
> Fetch the complete documentation index at: https://harisfazillah.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 🔍 Git Commit Resolver Skill

> Automatically resolves invalid or orphaned Git commit IDs referenced in the Agent Brain by searching the Git history for the matching commit message.

## Purpose

The DSOM repository has undergone Git history rewrites (e.g., using `git-filter-repo` for security sanitization). This process permanently alters cryptographic commit IDs (SHA-1 hashes) while leaving commit messages, dates, and authors intact.
As a result, some commit IDs stored in the `.agents/brain/` memory (e.g., in `palace_registry.md` or `HISTORY.md`) may become **invalid or orphaned**.

## When to use this skill

Trigger this skill whenever you attempt to reference, checkout, or view a Git commit ID (e.g., `git show <hash>`) and Git returns an error indicating the commit does not exist or is invalid.

## Execution Steps

### 1. Identify the Context

If a commit hash is invalid, do not assume the work was lost. Find the context of the commit by reading the surrounding text in the brain artifact or ledger to determine the **Commit Subject/Message** or **Date**.

### 2. Search Git Log by Message

Use the `git log` command with the `--grep` flag to search for the original commit message.

```bash theme={null}
git log --grep="<part of the commit message>" --oneline
```

*Example:* If the old hash `abc1234` was for "docs: update gitbook architecture", run:
`git log --grep="update gitbook architecture" --oneline`

### 3. Extract the New Hash

The command will return the *new* valid commit hash associated with that exact same work. Use this new hash for your operations.

### 4. Self-Healing (Optional but Recommended)

If you are actively editing a brain artifact or ledger when you discover a broken hash, proactively update the document to replace the old broken hash with the newly resolved valid hash to heal the Sovereign Memory.

***

*Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-16*
*Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0*


## Related topics

- [🧹 Git History Scrubber Skill](/skills/git-history-scrubber.md)
- [📜 Changelog Automation Skill](/skills/changelog-automation.md)
- [Google Jules & Google Antigravity Collaborative Sync](/skills/jules-antigravity-sync.md)
- [initialize-gitops](/skills/initialize-gitops.md)
- [GitHub Actions Snyk Security Scanner](/skills/github-actions-snyk-scanner.md)
