code-graph-llm 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_RULES.md +1 -1
- package/README.md +8 -7
- package/package.json +1 -1
package/AGENT_RULES.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AGENT OPERATIONAL PROTOCOL (STRICT)
|
|
2
2
|
> This protocol is MANDATORY for all LLM agents. Failure to update memory is a failure of the task.
|
|
3
3
|
## 🧠 THE REFLECTION CYCLE
|
|
4
|
-
Every execution
|
|
4
|
+
Every execution MUST follow this cycle:
|
|
5
5
|
1. **PRE-TASK:** Read \`PROJECT_REFLECTIONS.md\` to identify existing pitfalls.
|
|
6
6
|
2. **EXECUTION:** Monitor for "Learned Moments" (failures, unexpected behaviors, or non-obvious fixes).
|
|
7
7
|
3. **POST-TASK:** If a significant lesson was learned, run \`code-graph reflect <CAT> <LESSON>\`.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# CODE-GRAPH (v2.1.
|
|
1
|
+
# CODE-GRAPH (v2.1.3)
|
|
2
2
|
|
|
3
3
|
A language-agnostic, ultra-compact codebase mapper and **agent memory system** designed specifically for LLM agents. It optimizes context and token usage while enabling agents to learn from their own mistakes across sessions.
|
|
4
4
|
|
|
@@ -79,38 +79,39 @@ Before starting any task:
|
|
|
79
79
|
1. Read `llm-code-graph.md` for project structure.
|
|
80
80
|
2. Read `AGENT_RULES.md` for operational protocol.
|
|
81
81
|
3. Read `PROJECT_REFLECTIONS.md` for past lessons.
|
|
82
|
+
4. **MANDATORY:** After any fix or learning event, you MUST update `PROJECT_REFLECTIONS.md` using `code-graph reflect`.
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
### Cursor / Windsurf
|
|
85
86
|
Add to `.cursorrules` or `.windsurfrules`:
|
|
86
87
|
```text
|
|
87
|
-
Always reference `llm-code-graph.md`
|
|
88
|
+
Always reference `llm-code-graph.md` before editing. You are REQUIRED to follow the "Reflection Cycle" in `AGENT_RULES.md`. If a task involves a non-obvious fix or an environment quirk, you MUST record it in `PROJECT_REFLECTIONS.md` immediately.
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
### GitHub Copilot
|
|
91
92
|
Add to `.github/copilot-instructions.md`:
|
|
92
93
|
```markdown
|
|
93
|
-
When answering questions about this codebase, prioritize the mapping data in `llm-code-graph.md`.
|
|
94
|
+
When answering questions about this codebase, prioritize the mapping data in `llm-code-graph.md`. You MUST suggest or perform a reflection entry for `PROJECT_REFLECTIONS.md` after every bug fix or identified pitfall.
|
|
94
95
|
```
|
|
95
96
|
|
|
96
97
|
### Gemini CLI
|
|
97
98
|
Create a `GEMINI.md` file (if not already using `AGENT_RULES.md`):
|
|
98
99
|
```markdown
|
|
99
100
|
- Always read `llm-code-graph.md` as the primary source of truth.
|
|
100
|
-
- Use
|
|
101
|
+
- **CRITICAL:** Use `run_shell_command` to execute `code-graph reflect` after any bug fix or discovered quirk. Memory persistence is a mandatory part of every task completion.
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
### OpenCode / OpenDevin / Aider
|
|
104
105
|
In your project instructions or session startup:
|
|
105
|
-
> "Read `llm-code-graph.md` for a high-level overview.
|
|
106
|
+
> "Read `llm-code-graph.md` for a high-level overview. You are FORCED to record any project-specific quirk or non-obvious lesson using `code-graph reflect <CAT> <LESSON>` before finishing a task."
|
|
106
107
|
|
|
107
108
|
### Codex / GPT-Engineer / AutoGPT
|
|
108
109
|
Add to your project prompt or `prompts.md`:
|
|
109
|
-
> "Use `llm-code-graph.md` to navigate
|
|
110
|
+
> "Use `llm-code-graph.md` to navigate. Strictly adhere to the reflection cycle in `AGENT_RULES.md`. You MUST persist project memory by updating `PROJECT_REFLECTIONS.md` on every failure or learned moment."
|
|
110
111
|
|
|
111
112
|
### Generic Agent (System Prompt)
|
|
112
113
|
For any other agent, add this to your system instructions:
|
|
113
|
-
> "This project uses `code-graph-llm` for context management. Always consult `llm-code-graph.md
|
|
114
|
+
> "This project uses `code-graph-llm` for context management. Always consult `llm-code-graph.md`. You ARE REQUIRED to persist new knowledge about the environment or logic using the `code-graph reflect` tool. Failure to update memory is a failure of the task."
|
|
114
115
|
|
|
115
116
|
## How it works
|
|
116
117
|
1. **File Scanning:** Recursively walks the directory, ignoring patterns in `.gitignore`.
|