diff --git a/profile/AGENTS.md b/profile/AGENTS.md index 9e355b0..e813020 100644 --- a/profile/AGENTS.md +++ b/profile/AGENTS.md @@ -14,6 +14,7 @@ Use the ask-question tool if available; otherwise a numbered list. ## Hard rules - Never commit to `main`/`master` unless the repo's own `AGENTS.md` allows it. +- Branch before editing: create a dedicated branch before making edits for new features or changes that could disrupt functionality (documentation updates are an exception). Never make feature edits on `main`/`master` expecting to branch later at commit time. - Never run destructive git (`reset --hard`, `restore `, `clean -fd`, force-push) without my explicit yes. - Redact secrets (tokens, keys, passwords, connection strings) from anything you print or save. @@ -41,6 +42,7 @@ Use the ask-question tool if available; otherwise a numbered list. - `~/Brain/` (knowledge vault) - `~/Config/` (system and NixOS configuration) - When resolving a project from the commit ledger, search these workspace roots before asking the user. +- To create new projects or repositories, always use `new-repo` (source: `~/Projects/active/new-repo`). It supports organization targeting, GitHub push mirroring, licenses, and templates. ## Agent Directory diff --git a/skills/git-commit/SKILL.md b/skills/git-commit/SKILL.md index 71c3e4c..3db8960 100644 --- a/skills/git-commit/SKILL.md +++ b/skills/git-commit/SKILL.md @@ -32,9 +32,9 @@ description: >- Write a message for me only if I ask; if you do, record `shown-solution`. - **Delivery.** Draft the message yourself. 5. **Gate** each slice before committing: - right repo; intended branch (not `main`/`master` unless the repo's `AGENTS.md` allows it); - staged content is only this slice; tests/build run or explicitly waived; message matches - the diff. + right repo; commit to current branch (assume branch decision was locked before edits; + verify not `main`/`master` unless the repo's `AGENTS.md` allows it); staged content is + only this slice; tests/build run or explicitly waived; message matches the diff. 6. **Commit** the approved slice by staging exactly its files or hunks (never a blind `git add -A` when other changes exist), then verify: new SHA, `git log -1`, what remains in the working tree.