code-graph-llm 2.1.0 → 2.1.2

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.
Files changed (2) hide show
  1. package/README.md +50 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # CODE-GRAPH (v2.0.0)
1
+ # CODE-GRAPH (v2.1.2)
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
 
5
- ## 🚀 New in v2.0: Self-Learning Memory
6
- - **Reflection System:** Agents can now persist "Lessons Learned" via `code-graph reflect`.
7
- - **Operational Protocol:** Standardized `AGENT_RULES.md` ensures agents follow strict "Reflect-Act-Verify" cycles.
8
- - **Architectural Weight:** Project maps now include dependency counts (↑N ↓M) and CORE entry-point markers.
9
- - **Production Refactor:** Class-based service architecture with full `fs/promises` async support.
5
+ ## 🚀 New in v2.1: Intelligent Reflection & Hard-Soft Enforcement
6
+ - **Project Initializer:** Automated bootstrapping with `code-graph init`.
7
+ - **Intelligent Reflection:** Deduplication and categorization in `PROJECT_REFLECTIONS.md`.
8
+ - **Commit Advisories:** Soft-nudge git hooks to remind agents of missing reflections.
9
+ - **Production-Ready Core:** Refactored Service-based architecture with full async support.
10
10
 
11
11
  ## Features
12
12
  - **Structural Knowledge Graph:** Captures `imports`, `requires`, `extends`, and `implements`.
@@ -68,6 +68,50 @@ The `llm-code-graph.md` file provides a high-level map and structural graph for
68
68
  ### 3. Example System Prompt
69
69
  > "Before acting, read `llm-code-graph.md`. Follow the protocol in `AGENT_RULES.md`. If you encounter a bug or an environment quirk, use the `code-graph reflect` tool to record the lesson in `PROJECT_REFLECTIONS.md`."
70
70
 
71
+ ## 🤖 Agent-Specific Integration
72
+
73
+ Maximize efficiency by pointing your agent directly to the `llm-code-graph.md` and `AGENT_RULES.md` files.
74
+
75
+ ### Roo Code (Cline)
76
+ Add this to your `.clinerules` file:
77
+ ```markdown
78
+ Before starting any task:
79
+ 1. Read `llm-code-graph.md` for project structure.
80
+ 2. Read `AGENT_RULES.md` for operational protocol.
81
+ 3. Read `PROJECT_REFLECTIONS.md` for past lessons.
82
+ ```
83
+
84
+ ### Cursor / Windsurf
85
+ Add to `.cursorrules` or `.windsurfrules`:
86
+ ```text
87
+ Always reference `llm-code-graph.md` to understand the codebase architecture before performing edits. Strictly follow the "Reflection Cycle" in `AGENT_RULES.md`.
88
+ ```
89
+
90
+ ### GitHub Copilot
91
+ Add to `.github/copilot-instructions.md`:
92
+ ```markdown
93
+ When answering questions about this codebase, prioritize the mapping data in `llm-code-graph.md`. If a task fails or a mistake is corrected, suggest a reflection entry for `PROJECT_REFLECTIONS.md`.
94
+ ```
95
+
96
+ ### Gemini CLI
97
+ Create a `GEMINI.md` file (if not already using `AGENT_RULES.md`):
98
+ ```markdown
99
+ - Always read `llm-code-graph.md` as the primary source of truth.
100
+ - Use the `run_shell_command` tool to execute `code-graph reflect` after fixing non-obvious bugs.
101
+ ```
102
+
103
+ ### OpenCode / OpenDevin / Aider
104
+ In your project instructions or session startup:
105
+ > "Read `llm-code-graph.md` for a high-level overview. If you discover a project-specific quirk, record it using `code-graph reflect <CAT> <LESSON>`."
106
+
107
+ ### Codex / GPT-Engineer / AutoGPT
108
+ Add to your project prompt or `prompts.md`:
109
+ > "Use `llm-code-graph.md` to navigate the file structure. Strictly adhere to the reflection cycle in `AGENT_RULES.md` to ensure project memory is maintained across iterations."
110
+
111
+ ### Generic Agent (System Prompt)
112
+ 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` before exploring files. If you learn something new about the environment (e.g., shell quirks, library oddities), persist that knowledge using the `code-graph reflect` tool."
114
+
71
115
  ## How it works
72
116
  1. **File Scanning:** Recursively walks the directory, ignoring patterns in `.gitignore`.
73
117
  2. **Context Extraction:** Scans for classes, functions, and variables while ignoring matches in comments.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-graph-llm",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Compact, language-agnostic codebase mapper for LLM token efficiency.",
5
5
  "main": "index.js",
6
6
  "bin": {