This file is the authoritative repository-wide guide for Codex, Claude Code, Cursor, Antigravity, other AI agents, automation, and human contributors. Work from the repository contents and the user's current request. Never assume access to previous chats or private context.
More specific AGENTS.md files may be added inside subdirectories. They may refine local procedures but must not weaken the safety, truthfulness, privacy, or approval requirements in this file.
- The user's current explicit instructions.
- The nearest applicable
AGENTS.mdfile. - Root
AGENTS.md. CONTRIBUTING.mdand local documentation.- Tool defaults and general conventions.
If instructions conflict materially, stop and ask the user before making an irreversible or high-impact change.
- Read this file and the relevant directory
README.mdfiles. - Inspect repository status and existing related files before proposing changes.
- Search by concept, filename, and likely synonyms before creating content.
- State assumptions when requirements are ambiguous; ask only when a choice would materially change the outcome.
- Make the smallest coherent change that fulfills the request.
- Preserve relevant attempts, mistakes, corrections, and personal reasoning.
- Validate technical claims, examples, links, and code in proportion to risk.
- Label validation status precisely.
- Summarize changes, validation, limitations, and risks.
- Put structured study material in
learning/<subject>/. - Put standalone builds in
projects/<project-name>/. - Put exercises in
challenges/<subject>/<challenge-name>/. - Put concise reference notes in
notes/<subject>/. - Put evaluated sources in
resources/<subject>/. - Put dated evidence and reviews in
progress/. - Put reusable starting points in
templates/. - Put superseded or inactive content in
archive/, preserving context.
Use English only. Use lowercase kebab-case for directories and filenames, except conventional root files such as README.md, AGENTS.md, CONTRIBUTING.md, and CHANGELOG.md.
Do not create multiple files that explain the same concept independently. Prefer improving the canonical file and adding cross-links. When moving or superseding material, repair incoming links where practical.
- Never store raw AI or human conversation transcripts directly.
- Extract durable knowledge into self-contained documentation with enough context to stand alone.
- Separate facts, interpretations, personal reasoning, and open questions.
- Preserve failed attempts when they explain a misconception, tradeoff, or correction.
- Do not rewrite history to make the learning path appear cleaner than it was.
- Use dates only when useful; a date is not a substitute for subject classification.
- Cite primary or authoritative sources when a claim depends on external material.
- Never invent or embellish citations.
This repository must document my real learning journey, but it must not require me to write a complete explanation every time.
I may provide learning material in several forms:
- A complete explanation in my own words
- Short or incomplete notes
- A list of topics
- A screenshot
- A course slide
- A document
- A video, article, chapter, lesson, or source
- Code I wrote
- An exercise attempt
- A brief statement such as “I learned these concepts today”
- A mixture of Arabic and English
- Informal language, fragmented sentences, or voice-transcribed text
The agent must adapt its workflow to the amount and quality of information I provide.
The repository must distinguish between:
- What I explicitly said or demonstrated
- What the agent inferred from my material
- What came from an external source
- What the agent added as an academic explanation
- What has not yet been confirmed as part of my understanding
The agent must never present AI-generated or source-derived material as if I personally explained, understood, or mastered it.
The goal is to preserve my intellectual contribution while also reducing unnecessary documentation effort.
The agent must identify the most appropriate input mode before processing the entry.
Use this mode when I provide a substantial explanation in my own words.
The agent should:
- Preserve my meaning and reasoning
- Translate my explanation into clear English
- Assess accuracy
- Identify misconceptions and gaps
- Create a separate academic explanation
- Preserve useful examples, uncertainty, and mistakes
- Avoid replacing my explanation with generic textbook content
Use this mode when I provide short, incomplete, fragmented, or informal notes.
The agent should:
- Reconstruct only what can reasonably be derived from my words
- Preserve uncertainty
- Ask a small number of focused questions only when the missing information materially affects accuracy
- Prefer two to five concise questions
- Avoid broad interviews or unnecessary questioning
- Use my answers to produce the faithful English version
- Clearly label any interpretation or inference
The agent must not pretend that incomplete notes represent a complete understanding.
Use this mode when I provide a source such as:
- Video
- Screenshot
- Lecture slide
- Document
- Article
- Course chapter
- Website
- Code example
- Assignment material
The agent should:
- Analyze the source
- Extract the main topics
- Identify the concepts that were likely presented
- Separate source content from my confirmed understanding
- Ask a few focused questions when necessary
- Produce a structured learning entry
- Clearly mark which material came from the source
- Avoid claiming I understood every topic merely because it appeared in the source
The agent may create a provisional learning entry when my understanding has not yet been confirmed.
Use labels such as:
Source ContentMy Confirmed UnderstandingAgent InferenceNeeds Confirmation
Use this mode when I am tired, busy, or only want to record a small learning event.
Examples:
- “I learned about Java operators today.”
- “We studied arrays.”
- “I understood the difference between commit and push.”
- “Add these three concepts to my journey.”
- “I watched this lesson; record the important parts.”
The agent should not force me to write a complete explanation.
Instead, it should:
- Record the topic
- Extract or infer the minimum safe context
- Ask no questions when the entry can be accurately documented without them
- Ask only essential questions when needed
- Create a concise entry rather than an artificially long document
- Mark the depth of understanding honestly
- Add a future-review or practice item when appropriate
Small learning events should remain small. Do not inflate simple concepts into large academic chapters.
When enough personal input exists, substantial learning entries should contain the following layers.
Preserve my original wording when it has educational value.
This section may contain Arabic, mixed language, informal language, mistakes, or incomplete phrasing.
Do not preserve unnecessary repetition, private information, or irrelevant conversation.
Create a clear English reconstruction of what I personally expressed.
Requirements:
- Preserve my meaning
- Preserve my level of understanding
- Preserve uncertainty
- Preserve useful mistakes or misconceptions
- Correct language without falsely improving the technical depth
- Do not introduce ideas I did not express
- Do not make me appear more advanced than the evidence supports
Separate the assessment into:
- Correct points
- Inaccuracies or misconceptions
- Missing concepts
- Unclear or unconfirmed points
Create a separate technically accurate explanation in formal academic English.
This section may:
- Correct technical errors
- Add important context
- Explain terminology
- Show examples
- Connect the topic to related concepts
- Explain limitations and common mistakes
This section must not be presented as my original explanation.
When the entry is based mainly on a source and not on my own explanation, use a structure such as:
# Topic
## Learning Context
## Source Summary
## Concepts Presented
## My Confirmed Understanding
## Unconfirmed or Inferred Understanding
## Academic Explanation
## Examples
## Practice or Review Questions
## SourcesIf I have not confirmed my understanding, do not create a misleading My Understanding — Faithful English Version.
Instead, use:
## My Confirmed Understanding
and include only what I explicitly demonstrated or confirmed.
The agent should ask questions only when they improve the accuracy or educational value of the entry.
Questions must be:
- Focused
- Limited in number
- Directly related to the topic
- Designed to test understanding rather than collect unnecessary detail
Prefer questions such as:
- How would you explain this concept in one sentence?
- What problem does it solve?
- Can you give one example?
- What part is still unclear?
- How is it different from a related concept?
Do not ask questions when:
- The learning event is simple
- The provided material is already sufficient
- I explicitly ask for a quick entry
- The questions would add more effort than educational value
- The entry can be marked honestly as partial or provisional
The agent may automatically complete structure, grammar, formatting, examples, terminology, and academic context.
The agent may also:
- Summarize a source
- Extract topic names
- Organize fragmented notes
- Add definitions
- Add common mistakes
- Add practice questions
- Add connections to earlier repository content
- Add source references
- Suggest a review task
However, the agent must not automatically invent:
- My personal interpretation
- My level of confidence
- My examples
- My conclusions
- My mistakes
- My experience
- My mastery
- My completion of exercises
- My agreement with the source
Anything not directly supported by my input must be labeled as source-derived, inferred, suggested, or unconfirmed.
Each learning entry may include a learning-status label.
Recommended values:
Exposed— I encountered the topicIntroduced— I understand the basic definitionDeveloping— I can explain parts of it but still have gapsPracticed— I applied it in an exercise or exampleApplied— I used it in a projectReviewed— I revisited and corrected the topicVerified— I demonstrated accurate understanding through explanation or practice
Do not assign Applied, Reviewed, or Verified without evidence.
The length and depth of the repository entry must match the significance of the learning event.
Examples:
- A simple command may require only a short note.
- A language concept may require a structured learning entry.
- A completed exercise may require the problem, attempt, correction, and explanation.
- A major project may require full project documentation.
- A video covering many unrelated topics may require multiple entries or a course-note summary.
Do not create long, repetitive, or generic content merely to make the repository appear larger.
My input may be written in Arabic, English, or a mixture of both.
The repository documentation should normally be written in English.
The agent should:
- Translate my words faithfully
- Preserve technical terminology accurately
- Retain Arabic terminology in parentheses only when educationally useful
- Avoid literal translations that distort meaning
- Keep the faithful translation separate from the academic rewrite
For every learning submission:
- Read the relevant repository instructions
- Identify the input mode
- Inspect related existing files
- Determine whether to create or update content
- Separate personal input, source content, inference, and academic additions
- Ask only essential questions
- Create a proportional learning entry
- Validate technical claims and code
- Update progress records only when justified
- Provide the required review summary
- Do not commit or push without explicit approval
Input:
“I learned that a Java variable has a type and stores a value. I think its type can change later.”
Expected behavior:
- Preserve the explanation
- Translate it faithfully
- Mark the claim about changing the type as incorrect
- Explain static typing academically
Input:
“Today I learned Java arithmetic operators.”
Expected behavior:
- Create a concise entry
- Cover the operators actually mentioned or present in the supplied material
- Do not claim full mastery
- Add a small review question if useful
Input:
“Add what I learned from this screenshot.”
Expected behavior:
- Analyze the screenshot
- Extract the visible concepts
- Mark them as source content
- Ask one or two confirmation questions only if needed
- Avoid claiming that all visible content was understood
Input:
“I watched this lesson. Extract the important topics and add what I learned.”
Expected behavior:
- Analyze the lesson or available transcript
- Create a source summary
- Extract major concepts
- Ask focused questions when confirmation is necessary
- Separate source coverage from confirmed personal understanding
Input:
“I am tired. We learned arrays today. Just record it properly.”
Expected behavior:
- Create a concise provisional entry
- Record the topic and learning context
- Mark the status as
ExposedorIntroduced - Avoid forcing a full explanation
- Add an optional future review task
Before modifying files, explain the intended classification and file plan when the change is substantial.
After modifying files, provide:
- Objective
- Input mode used
- Files added
- Files modified
- Personal content preserved
- Source-derived content added
- Agent inferences
- Academic additions
- Validation performed
- Unconfirmed points
- Proposed commit message
Do not stage, commit, or push until I explicitly approve.
After processing any learning entry, always give me a short and simple summary first.
The summary should explain:
- What I learned
- Whether my understanding was correct
- What file was created or updated
- Whether anything still needs clarification
- Whether the changes are ready for approval
Keep this summary concise and easy to read.
Use this format:
## Simple Summary
- Topic: [topic]
- Your understanding: Correct / Mostly correct / Partially correct / Needs correction
- Repository action: Created [file] / Updated [file]
- Important correction: [one short sentence, or “None”]
- Needs clarification: [yes/no and short reason]
- Status: Ready for review / Waiting for your answerAfter the simple summary, provide the full technical review required by AGENTS.md.
Do not commit or push without my explicit approval.
For code or technical instructions:
- Record prerequisites, versions, platform assumptions, and commands needed to reproduce results.
- Run the narrowest relevant checks when execution is safe and available.
- Do not claim that code works because it looks correct.
- Distinguish
Tested,Partially tested, andUntestedresults. - Record exact failed checks when useful; do not conceal failures.
- If verification is unavailable, explain why and identify the remaining check.
- Never fabricate benchmark numbers, output, progress, completion, tests, or achievements.
Never add credentials, tokens, private keys, session data, .env values, private conversations, personal identifiers not intentionally made public, or confidential material. Use obvious placeholders such as YOUR_API_KEY in examples. Check proposed changes for secrets before any commit request.
Do not introduce destructive commands, hidden telemetry, unsafe downloads, or unexplained privilege escalation. Treat copied code and dependencies as untrusted until reviewed.
Without the user's explicit approval, do not:
- commit, amend, tag, push, force-push, merge, rebase, deploy, publish, or open/merge a pull request;
- delete substantial content or rewrite repository history;
- send data to external services;
- add secrets or private information.
Read-only inspection and local file edits requested by the user are allowed. Keep changes reviewable and reversible.
Before any Git command or GitHub action, present this report and wait for explicit approval if the action can change local history, the index, branches, tags, remotes, or remote state:
- Objective
- Files added
- Files modified
- Files deleted
- Important decisions
- Validation performed
- Known limitations
- Risks
- Proposed commit message
For a read-only Git inspection requested as part of diagnosis, provide the report before the command when practical; if the inventory is not yet knowable, state that the command is read-only and provide the complete report before any state-changing Git action.
Approval applies only to the described action and scope. A commit approval is not automatically push, merge, deploy, or deletion approval.
A task is complete only when:
- requested files are present in the correct location;
- related content was checked for duplication;
- documentation is understandable without chat history;
- technical claims and code have an honest validation status;
- links and structure were checked;
- no secret or private data was introduced;
- changes, limitations, and risks are reported accurately.