diff --git a/CLAUDE.md b/CLAUDE.md index b5e86362..fe044bbc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -100,10 +100,7 @@ When working in this codebase, use these modes: ## Error Recovery -- On CLI command failure (label not found, permission error, file not found, etc.), automatically try alternatives -- Do not wait for user confirmation on recoverable errors — recover immediately -- Only report to user on unrecoverable errors (auth failure, risk of critical data loss, etc.) -- Never break the workflow on error — try alternatives and continue +See shared rules: packages/rules/.ai-rules/rules/core.md (Error Recovery section) ## Communication diff --git a/packages/rules/.ai-rules/rules/core.md b/packages/rules/.ai-rules/rules/core.md index d430d1f7..bc67b063 100644 --- a/packages/rules/.ai-rules/rules/core.md +++ b/packages/rules/.ai-rules/rules/core.md @@ -564,6 +564,21 @@ To preserve this implementation session for future reference: --- +### Error Recovery (ACT mode) + +- On recoverable errors (file not found, command failure, path issues), try alternatives immediately +- Do not wait for user confirmation on recoverable errors — recover immediately +- Only report to user on unrecoverable errors (auth failure, critical data loss risk) +- Never break the workflow on error — try alternatives and continue + +### Path Safety (monorepo) + +- Always verify current directory (pwd) or use absolute paths before git add/commit +- In monorepo subdirectories, use git -C "$REPO_ROOT" flag for git commands +- After using cd, ensure relative paths are not double-applied in subsequent commands + +--- + ### Eval Mode **Important:**