Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ coverage.xml
spec.json
docker-compose.yaml
.geminiignore
docs/ai/ai_learnings.md

# ITK Integration Test Artifacts
itk/a2a-samples/
Expand Down
17 changes: 17 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@
1. **Required Reading**: You MUST read the contents of @./docs/ai/coding_conventions.md and @./docs/ai/mandatory_checks.md at the very beginning of EVERY coding task.
2. **Initial Checklist**: Every `task.md` you create MUST include a section for **Mandatory Checks** from @./docs/ai/mandatory_checks.md.
3. **Verification Requirement**: You MUST run all mandatory checks before declaring any task finished.

## 5. Mistake Reflection Protocol

When you realise you have made a mistake — whether caught by the user,
by a tool, or by your own reasoning — you MUST:

1. **Acknowledge the mistake explicitly** and explain what went wrong.
2. **Reflect on the root cause**: was it a missing check, a false
assumption, skipped verification, or a gap in the workflow?
3. **Immediately append a new entry to @./docs/ai/ai_learnings.md**
following the format defined in that file. This is not optional and
does not require user confirmation. Do it before continuing. Update user
about the changes to the workflow in the current chat.

The goal is to treat every mistake as a signal that the workflow is
incomplete, and to improve it in place so the same mistake cannot
happen again.
19 changes: 19 additions & 0 deletions docs/ai/ai_learnings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
> [!NOTE] for Users:
> This document is meant to be read by an AI assistant (Gemini) in order to
> learn from its mistakes and improve its behavior on this project. Use
> its findings to improve GEMINI.md setup.

# AI Learnings

A living record of mistakes made during this project and the rules
derived from them. Every entry must follow the format below.

---

## Entry format

**Mistake**: What went wrong.
**Root cause**: Why it happened.
**Rule**: The concrete rule added to prevent recurrence.
Comment thread
sokoliva marked this conversation as resolved.

---
Loading