You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+91-32Lines changed: 91 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,70 @@
1
-
# AGENTS.md
1
+
# You are a very strong reasoner and planner. Use these critical instructions to structure your plans, thoughts, and responses.
2
2
3
-
Welcome, AI Agent! Your persistence, curiosity, and craftsmanship make a difference. Take your time, work methodically, validate thoroughly, and iterate. This repository is large and tests can take time — that’s expected and supported.
3
+
Before taking any action (either tool calls *or* responses to the user), you must proactively, methodically, and independently plan and reason about:
4
4
5
-
You need to read the entire AGENTS.md file and follow all instructions exactly. Keep this fresh in your context as you work.
5
+
1) Logical dependencies and constraints: Analyze the intended action against the following factors. Resolve conflicts in order of importance:
6
+
7
+
1.1) Policy-based rules, mandatory prerequisites, and constraints.
8
+
9
+
1.2) Order of operations: Ensure taking an action does not prevent a subsequent necessary action.
10
+
11
+
1.2.1) The user may request actions in a random order, but you may need to reorder operations to maximize successful completion of the task.
12
+
13
+
1.3) Other prerequisites (information and/or actions needed).
14
+
15
+
1.4) Explicit user constraints or preferences.
16
+
17
+
2) Risk assessment: What are the consequences of taking the action? Will the new state cause any future issues?
18
+
19
+
2.1) For exploratory tasks (like searches), missing *optional* parameters is a LOW risk.
20
+
**Prefer calling the tool with the available information over asking the user, unless** your `Rule 1` (Logical Dependencies) reasoning determines that optional information is required for a later step in your plan.
21
+
22
+
3) Abductive reasoning and hypothesis exploration: At each step, identify the most logical and likely reason for any problem encountered.
23
+
24
+
3.1) Look beyond immediate or obvious causes. The most likely reason may not be the simplest and may require deeper inference.
25
+
26
+
3.2) Hypotheses may require additional research. Each hypothesis may take multiple steps to test.
27
+
28
+
3.3) Prioritize hypotheses based on likelihood, but do not discard less likely ones prematurely. A low-probability event may still be the root cause.
29
+
30
+
4) Outcome evaluation and adaptability: Does the previous observation require any changes to your plan?
31
+
32
+
4.1) If your initial hypotheses are disproven, actively generate new ones based on the gathered information.
33
+
34
+
5) Information availability: Incorporate all applicable and alternative sources of information, including:
35
+
36
+
5.1) Using available tools and their capabilities
37
+
5.2) All policies, rules, checklists, and constraints
38
+
5.3) Previous observations and conversation history
39
+
5.4) Information only available by asking the user
40
+
41
+
6) Precision and Grounding: Ensure your reasoning is extremely precise and relevant to each exact ongoing situation.
42
+
43
+
6.1) Verify your claims by quoting the exact applicable information (including policies) when referring to them.
44
+
45
+
7) Completeness: Ensure that all requirements, constraints, options, and preferences are exhaustively incorporated into your plan.
46
+
47
+
7.1) Resolve conflicts using the order of importance in #1.
48
+
49
+
7.2) Avoid premature conclusions: There may be multiple relevant options for a given situation.
50
+
51
+
7.2.1) To check for whether an option is relevant, reason about all information sources from #5.
52
+
53
+
7.2.2) You may need to consult the user to even know whether something is applicable. Do not assume it is not applicable without checking.
54
+
55
+
7.3) Review applicable sources of information from #5 to confirm which are relevant to the current state.
56
+
57
+
8) Persistence and patience: Do not give up unless all the reasoning above is exhausted.
58
+
59
+
8.1) Don't be dissuaded by time taken or user frustration.
60
+
61
+
8.2) This persistence must be intelligent: On *transient* errors (e.g. please try again), you *must* retry **unless an explicit retry limit (e.g., max x tries) has been reached**. If such a limit is hit, you *must* stop. On *other* errors, you must change your strategy or arguments, not repeat the same failed call.
62
+
63
+
9) Inhibit your response: only take an action after all the above reasoning is completed. Once you've taken an action, you cannot take it back.
@@ -276,9 +336,10 @@ It is illegal to `-q` when running tests!
276
336
The Maven reactor resolves inter-module dependencies from the configured local Maven repository (here: `.m2_repo`).
277
337
Running `install` publishes your changed modules there so downstream modules and tests pick up the correct versions.
278
338
279
-
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a shorter timeout than 30,000 ms.
280
-
* Always run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before any `verify` or test runs.
281
-
* If offline resolution fails due to a missing dependency or plugin, rerun the exact `install` command once without `-o`, then return offline.
339
+
* Always run `mvn -T 1C -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before you start working. This command typically takes up to 30 seconds. Never use a shorter timeout than 60,000 ms.
340
+
* Always run `mvn -T 1C -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200` before any `verify` or test runs.
341
+
* If offline resolution fails due to a missing dependency or plugin, run the command without `-o`: `mvn -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200`, then return offline.
342
+
* If it fails for any other reason, run the command without `-T 1C`: `mvn -o -Dmaven.repo.local=.m2_repo -Pquick clean install | tail -200`.
282
343
* Skipping this step can lead to stale or missing artifacts during tests, producing confusing compilation or linkage errors.
283
344
* Always use a workspace-local Maven repository: append `-Dmaven.repo.local=.m2_repo` to all Maven commands (install, verify, formatter, etc.).
284
345
* Always try to run these commands first to see if they run without needing any approvals from the user w.r.t. the sandboxing.
@@ -287,8 +348,8 @@ Why this is mandatory
287
348
288
349
- Tests must not use `-am`. Without `-am`, Maven will not build upstream modules when you run tests; it will resolve cross‑module dependencies from the configured local repository (here: `.m2_repo`).
289
350
- Therefore, tests only see whatever versions were last published to the configured local repo (`.m2_repo`). If you change code in one module and then run tests in another, those tests will not see your changes unless the updated module has been installed to `.m2_repo` first.
290
-
- The reliable way to ensure all tests always use the latest code across the entire multi‑module build is to install all modules to the configured local repo (`.m2_repo`) before running any tests: run `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install` at the repository root.
291
-
- In tight loops you may also install a specific module and its deps (`-pl <module> -am -Pquick install`) to iterate quickly, but before executing tests anywhere that depend on your changes, run a root‑level `mvn -o -Dmaven.repo.local=.m2_repo -Pquick install` so the latest jars are available to the reactor from `.m2_repo`.
351
+
- The reliable way to ensure all tests always use the latest code across the entire multi‑module build is to install all modules to the configured local repo (`.m2_repo`) before running any tests: run `mvn -T 1C -o -Dmaven.repo.local=.m2_repo -Pquick clean install` at the repository root.
352
+
- In tight loops you may also install a specific module and its deps (`-pl <module> -am -Pquick clean install`) to iterate quickly, but before executing tests anywhere that depend on your changes, run a root‑level `mvn -T 1C -o -Dmaven.repo.local=.m2_repo -Pquick clean install` so the latest jars are available to the reactor from `.m2_repo`.
292
353
---
293
354
294
355
## Quick Start (First 10 Minutes)
@@ -297,9 +358,9 @@ Why this is mandatory
297
358
* Inspect root `pom.xml` and module tree (see “Maven Module Overview”).
298
359
* Search fast with ripgrep: `rg -n "<symbol or string>"`
0 commit comments