@@ -60,6 +60,154 @@ For multi-step tasks, state a brief plan:
...
@@ -60,6 +60,154 @@ For multi-step tasks, state a brief plan:
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
## 5. Codebase Discovery via Codegraph
**Always check `.codegraph/codegraph.db` first** before grep-searching or reading large files. This local SQLite database indexes classes, methods, calls, and relationships. Querying it saves up to 95% of input tokens.
To search for a class or function definition, run a quick query:
```bash
rtk python -c"import sqlite3; conn = sqlite3.connect('.codegraph/codegraph.db'); print(conn.execute(\"SELECT name, file_path, start_line, end_line FROM nodes WHERE name='AIAgent'\").fetchall())"
```
---
---
**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use.
**Important**: Even in command chains with `&&`, use `rtk`: