This PC is the primary development environment. GitHub is usually a sync, publish, or backup target.
Do not clone, delete, move, reset, or overwrite local repositories unless the user explicitly asks for that action.
Before deciding where to work, find and read the local Canonical Repository Index.md in the user's knowledge-base repository, then open the matching file under repositories/ when it exists.
Use that index and its repositories/ cards as the source of truth for repository candidates, duplicate copies, temporary workspaces, static-site routing, related repositories, and uncertain cases. Do not keep a separate hard-coded list of preferred project paths in this file.
If the index is missing or inaccessible, search local repositories first and report that the canonical index could not be checked.
When a task appears to involve an existing project or GitHub repository:
- Check the current directory and whether it is a Git repository.
- Check
git remote -vand normalize the GitHub owner/repo name. - Find and read
Canonical Repository Index.mdfrom the local knowledge-base. - Open the matching repository card under
repositories/if one exists, then compare any normal candidate with the current workspace. - If they differ, report both paths and ask whether to continue in the current workspace or switch to the canonical candidate.
- Treat
D:\Codex\workspaces\and date-basedDocuments\Codex\folders as temporary workspaces unless the index says they are the only known copy or the user chooses them. - Use
git cloneonly as the last resort, after local search and user confirmation.
Before making meaningful edits:
- Read the nearest
AGENTS.md. - Read
README*and relevantdocs/. - Check
git status --shortand preserve existing user changes. - For duplicate repositories, inspect the index and recent local changes before choosing.
- For uncertain rows in the index, report uncertainty instead of guessing.
For static sites, GitHub Pages, portals, documentation sites, and web tools:
- Identify the actual public folder before editing: common names include
public/,docs/,dist/,site/,build/,_site/, or a rootindex.html. - Do not assume
docs/is documentation source; it may be the published site root. - Check
package.json,vite.config.*,mkdocs.yml,_config.yml, and README for build or deploy rules. - If the project is plain static HTML, do not introduce a build system unless requested.
- Local repositories are the working source unless the user says otherwise.
- GitHub is normally used for sync, backup, PRs, or public deployment.
- Do not commit or push unless requested or required by explicit project instructions.
- Before pulling, check for local modifications. If conflicts are possible, stop and report.
- Never clean up duplicate copies automatically. List cleanup candidates and ask separately.
- The knowledge-base stores reusable writing context, Codex skills, shared state, and the canonical repository index.
- Obsidian vault repositories may contain personal source notes and app-generated
.obsidianchanges. Be conservative and avoid bulk rewriting existing notes. - For generated drafts, prefer creating new files rather than overwriting existing notes.
Finish by summarizing:
- Files changed.
- Which repository/workspace was used and why.
- Whether the canonical index was checked.
- Build/test/check commands run and results.
- Any duplicate, stale, dirty, or uncertain repository state that needs human attention.