repo: add PR body for remove-ai-tracked#1
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds PR_BODY_REMOVE_AI.md, a documentation file containing a draft PR body intended to guide the process of removing tracked .ai/ directory files from the repository index and ensuring .gitignore is updated to prevent re-tracking. It serves as a follow-up to the earlier documentation PR (PR_BODY.md) which referenced the need for a separate PR to remove tracked AI artifacts.
Changes:
- Adds
PR_BODY_REMOVE_AI.mdwith instructions and a maintainer checklist for removing tracked.ai/files viagit rm --cachedand updating.gitignore.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| What this change does | ||
| --------------------- | ||
| - Removes tracked files under `.ai/` (example: `.ai/Database/db.sqlite`) from git index using `git rm --cached` so they remain on local machines but are no longer tracked by the repository. | ||
| - Ensures `.gitignore` contains patterns to exclude common AI/chat assistant directories and session files. |
There was a problem hiding this comment.
The PR description states this PR "removes tracked files under .ai/" and "ensures .gitignore contains patterns to exclude common AI/chat assistant directories," but the only change in this PR is adding the PR_BODY_REMOVE_AI.md documentation file. There are no git rm --cached removals of .ai files and no .gitignore updates included in this diff. The actual remediation described in the PR description (and in this file's content) does not appear to be part of these changes.
| What this change does | ||
| --------------------- | ||
| - Removes tracked files under `.ai/` (example: `.ai/Database/db.sqlite`) from git index using `git rm --cached` so they remain on local machines but are no longer tracked by the repository. | ||
| - Ensures `.gitignore` contains patterns to exclude common AI/chat assistant directories and session files. |
There was a problem hiding this comment.
The file states that .gitignore contains "patterns to exclude common AI/chat assistant directories and session files" that would cover .ai/Database/db.sqlite, but the existing .gitignore only has *.ai (which matches files whose names end in .ai, not the .ai/ directory). The .ai/ directory and files inside it such as .ai/Database/db.sqlite would NOT be ignored by *.ai. A pattern like .ai/ needs to be added to .gitignore for the described behavior to work correctly. This is misleading to any developer following the remediation steps in this file.
| - Ensures `.gitignore` contains patterns to exclude common AI/chat assistant directories and session files. | |
| - Ensures `.gitignore` contains patterns (for example, a `.ai/` entry) to exclude common AI/chat assistant directories and session files, including `.ai/Database/db.sqlite`. |
| git rm --cached .ai/Database/db.sqlite | ||
| git add .gitignore | ||
| git commit -m "repo: remove tracked .ai files and ignore AI artifacts" | ||
| git push origin remove-ai-tracked |
There was a problem hiding this comment.
The remediation code snippet hardcodes git push origin remove-ai-tracked, which is a specific branch name tied to this particular PR workflow. If a developer follows these instructions on any other branch or for a different scenario, they will push to the wrong branch. This should either be replaced with a generic placeholder like <your-branch-name> or with HEAD to push the current branch.
| git push origin remove-ai-tracked | |
| git push origin HEAD |
| Title: Remove tracked local assistant data (.ai) and update .gitignore | ||
|
|
||
| Description | ||
| ----------- | ||
| This follow-up PR removes tracked local assistant/AI artifacts from the repository index and ensures `.gitignore` prevents them from being re-tracked. | ||
|
|
||
| What this change does | ||
| --------------------- | ||
| - Removes tracked files under `.ai/` (example: `.ai/Database/db.sqlite`) from git index using `git rm --cached` so they remain on local machines but are no longer tracked by the repository. | ||
| - Ensures `.gitignore` contains patterns to exclude common AI/chat assistant directories and session files. | ||
|
|
||
| Why this is needed | ||
| ------------------- | ||
| Some local assistant tools store session data or databases in `.ai/` that should not be committed. These files can be large and may be locked by background processes, causing `git pull` and other operations to fail with "unlink failed" errors. | ||
|
|
||
| Steps performed | ||
| --------------- | ||
| 1. Create branch `remove-ai-tracked`. | ||
| 2. Run `git rm --cached` on tracked `.ai` files (does not delete local files). | ||
| 3. Commit `.gitignore` entries if missing. | ||
| 4. Push branch and open PR to merge. | ||
|
|
||
| Local remediation instructions (if you encounter locked files) | ||
| ------------------------------------------------------------- | ||
| - Close any editor or assistant process that may hold the `.ai` files (e.g., local assistant, SQLite viewer). | ||
| - If files are still locked, you can remove them from tracking on another machine or after restarting the process: | ||
|
|
||
| ```powershell | ||
| # On your local machine (safe: this does not delete local files) | ||
| git rm --cached .ai/Database/db.sqlite | ||
| git add .gitignore | ||
| git commit -m "repo: remove tracked .ai files and ignore AI artifacts" | ||
| git push origin remove-ai-tracked | ||
| ``` | ||
|
|
||
| Maintainer checklist | ||
| -------------------- | ||
| - [ ] Review changes on branch `remove-ai-tracked`. | ||
| - [ ] Merge via GitHub UI once verified. | ||
| - [ ] Confirm `git pull` works locally after merge. |
There was a problem hiding this comment.
PR_BODY_REMOVE_AI.md appears to be a draft PR body used as a one-time communication artifact for the remove-ai-tracked branch, rather than permanent repository documentation. Committing it to the repository doesn't add lasting value and adds noise to the repository root alongside PR_BODY.md. If the intent is to persist this as a reference document, it would be more appropriate in a docs/ folder or as a runbook. Otherwise, the PR body itself (the GitHub PR description) is the appropriate place for this content, not a tracked file.
Title: Remove tracked local assistant data (.ai) and update .gitignore
Description
This follow-up PR removes tracked local assistant/AI artifacts from the repository index and ensures
.gitignoreprevents them from being re-tracked.What this change does
.ai/(example:.ai/Database/db.sqlite) from git index usinggit rm --cachedso they remain on local machines but are no longer tracked by the repository..gitignorecontains patterns to exclude common AI/chat assistant directories and session files.Why this is needed
Some local assistant tools store session data or databases in
.ai/that should not be committed. These files can be large and may be locked by background processes, causinggit pulland other operations to fail with "unlink failed" errors.Steps performed
remove-ai-tracked.git rm --cachedon tracked.aifiles (does not delete local files)..gitignoreentries if missing.Local remediation instructions (if you encounter locked files)
.aifiles (e.g., local assistant, SQLite viewer).Maintainer checklist
remove-ai-tracked.git pullworks locally after merge.