{
  "markdown": "**English** | [中文版](README_CN.md)\n\n# ASSA Evolution (Autonomous Self-Sovereign Agent)\n\n[![ASSA Version](https://img.shields.io/badge/ASSA-v3.5--WEAVER-blueviolet?style=for-the-badge)](https://github.com/google-gemini/gemini-cli)\n[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-Compatible-blue?style=for-the-badge)](https://github.com/google-gemini/gemini-cli)\n[![License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)\n\nASSA is a powerful enhancement plugin designed specifically for [Gemini CLI](https://github.com/google-gemini/gemini-cli). Its core mission is simple: **Enable AI to remember the mistakes you've made together and never repeat them in the next project.**\n\nNormally, when using AI for programming, we often encounter repetitive errors or need to re-teach our coding habits in every new session. ASSA silently records, distills, and shares experiences in the background, transforming a \"forgetful\" executor into a development partner that gets better the more you use it.\n\n---\n\n## 🚀 How It Works\n\nASSA works by intercepting and analyzing every conversation, tool call, and code commit. It utilizes a **\"Three-Tier Evolution Architecture\"** driven by specialized sub-agents:\n\n```mermaid\nflowchart TD\n    %% Define Styles\n    classDef userNode fill:#FF9E9E,stroke:#333,stroke-width:2px,color:#000,font-weight:bold\n    classDef geminiNode fill:#AEC6CF,stroke:#333,stroke-width:2px,color:#000,font-weight:bold\n    classDef assaNode fill:#B4E197,stroke:#333,stroke-width:2px,color:#000,font-weight:bold\n    classDef memoryNode fill:#FDFD96,stroke:#333,stroke-width:2px,color:#000,stroke-dasharray: 5 5\n    classDef globalNode fill:#85C1E9,stroke:#333,stroke-width:2px,color:#000\n\n    %% Nodes\n    User((\"🧑‍💻 Developer<br/>(You)\")):::userNode\n    Gemini[\"🤖 Gemini CLI<br/>(Main Agent)\"]:::geminiNode\n    Hook_Before{\"⚙️ BeforeAgent Hook<br/>(Context Injection)\"}:::assaNode\n    Hook_After{\"⚙️ AfterTool Hook<br/>(Signal Capture)\"}:::assaNode\n    \n    Mem_L1[(\"📝 L1 Transient Memory<br/>(Raw Signals/Ledger)\")]:::memoryNode\n    Mem_L2[(\"📂 L2 Local Patterns<br/>(Project-specific)\")]:::memoryNode\n    \n    subgraph L3 [\"🌐 L3 Global Wisdom (The Weaver Library)\"]\n        direction TB\n        G0[\"G0 Core Mandates\"]\n        G1[\"G1 Foundation Standards\"]\n        G2[\"G2 Domain Knowledge\"]\n        G3[\"G3 Tech Fragments\"]\n    end\n    class L3 globalNode\n\n    Sub_Distill[\"🕵️ Distiller Subagent\"]\n    Sub_Promote[\"🕵️ Promoter Subagent\"]\n\n    %% Flow: Normal Conversation\n    User -- \"1. Question / Directive\" --> Hook_Before\n    Hook_Before -- \"2. Inject Rules\" --> Gemini\n    Mem_L2 -.-> Hook_Before\n    L3 -.-> Hook_Before\n\n    Gemini -- \"3. Tool Call / Response\" --> User\n    Gemini -- \"4. Intercept Output\" --> Hook_After\n    \n    %% Flow: Evolution Chain\n    Hook_After -- \"5. Record\" --> Mem_L1\n    Mem_L1 -- \"6. Distill\" --> Sub_Distill\n    Sub_Distill -- \"7. Local Pattern\" --> Mem_L2\n    Mem_L2 -- \"8. Promote\" --> Sub_Promote\n    Sub_Promote -- \"9. Global Rule\" --> L3\n```\n\n### 🌐 Active Global Knowledge Graph\n\nBelow is the live structure of the L3 Global Wisdom library, automatically maintained by the **Weaver (V3.5)** engine. It visualizes the hierarchical dependencies between engineering standards (G1), domain knowledge (G2), and utility fragments (G3).\n\n```mermaid\ngraph TD\n  subgraph G1 [\"G1: Foundation (Core Standards)\"]\n    G1_EMPIRICAL_TRUTH{{\"<b>G1-EMPIRICAL-TRUTH</b><br/>Empirical Truth & Reliable Execution\"}}\n    G1_INSTRUCTION_INTEGRITY{{\"<b>G1-INSTRUCTION-INTEGRITY</b><br/>Instruction Integrity & Reflex Sovereignty\"}}\n    P_20260319_ARCH_GOVERNANCE{{\"<b>P-20260319-ARCH-GOVERNANCE</b><br/>Architectural Governance & Deep Auditing\"}}\n    P_20260319_DUAL_AXIS{{\"<b>P-20260319-DUAL-AXIS</b><br/>Dual-Axis Architectural Perspective\"}}\n  end\n  subgraph G2 [\"G2: Domain (Specialized Knowledge)\"]\n    P_20260318_PROMT(\"<b>P-20260318-PROMT</b><br/>Global Knowledge Curation (ASSA Promoter)\")\n    P_20260318_WEAVR_V3.5(\"<b>P-20260318-WEAVR-V3.5</b><br/>The Weaver Architecture (V3.5)\")\n    P_20260319_CONT_DISTILL(\"<b>P-20260319-CONT-DISTILL</b><br/>Continuous Distillation Protocol\")\n    P_20260319_INDEX_FIRST(\"<b>P-20260319-INDEX-FIRST</b><br/>Index-First Context Optimization Strategy\")\n    P_20260319_PHYSICAL_METADATA(\"<b>P-20260319-PHYSICAL-METADATA</b><br/>Physical Coordinate Injection (ASSA_METADATA)\")\n    P_20260319_SURGICAL_EDIT(\"<b>P-20260319-SURGICAL-EDIT</b><br/>Surgical Mutation & Deep Reading Protocol\")\n    P_20260319_VISUAL_QA(\"<b>P-20260319-VISUAL-QA</b><br/>Honest Visual Verification (Fidelity Audit)\")\n  end\n  subgraph G3 [\"G3: Fragment (Snippets & Tools)\"]\n    P_SKILL_CANDIDATE_REAL[\"<b>P-SKILL-CANDIDATE-REAL</b><br/>P-SKILL-CANDIDATE-REAL\"]\n    P_UNIVERSAL_NODEJS_MIDDLEWARE[\"<b>P-UNIVERSAL-NODEJS-MIDDLEWARE</b><br/>P-UNIVERSAL-NODEJS-MIDDLEWARE\"]\n    P_20260315_NODE_JS_MID[\"<b>P-20260315-NODE-JS-MID</b><br/>P-20260315-NODE-JS-MID\"]\n    U_20260315_IMMUTABILITY[\"<b>U-20260315-IMMUTABILITY</b><br/>U-20260315-IMMUTABILITY\"]\n    P_20260317_TS_INTF[\"<b>P-20260317-TS-INTF</b><br/>P-20260317-TS-INTF\"]\n  end\n  P_20260319_DUAL_AXIS --> P_20260319_ARCH_GOVERNANCE\n  P_20260319_PHYSICAL_METADATA --> P_20260319_CONT_DISTILL\n  P_20260318_WEAVR_V3.5 --> P_20260319_INDEX_FIRST\n  P_20260319_SURGICAL_EDIT --> P_20260319_VISUAL_QA\n\n  %% Styling\n  classDef style_G1 fill:#1a5fb4,stroke:#333,stroke-width:2px,color:#fff,font-family:Arial;\n  class G1_EMPIRICAL_TRUTH,G1_INSTRUCTION_INTEGRITY,P_20260319_ARCH_GOVERNANCE,P_20260319_DUAL_AXIS style_G1;\n  classDef style_G2 fill:#26a269,stroke:#333,stroke-width:2px,color:#fff,font-family:Arial;\n  class P_20260318_PROMT,P_20260318_WEAVR_V3.5,P_20260319_CONT_DISTILL,P_20260319_INDEX_FIRST,P_20260319_PHYSICAL_METADATA,P_20260319_SURGICAL_EDIT,P_20260319_VISUAL_QA style_G2;\n  classDef style_G3 fill:#9a9996,stroke:#333,stroke-width:2px,color:#fff,font-family:Arial;\n  class P_SKILL_CANDIDATE_REAL,P_UNIVERSAL_NODEJS_MIDDLEWARE,P_20260315_NODE_JS_MID,U_20260315_IMMUTABILITY,P_20260317_TS_INTF style_G3;\n```\n\n### Key Architectural Pillars:\n- **The Weaver (V3.5 Automated Indexing)**: Transitioned from manual JSON maintenance to a fully automated, file-driven system. Markdown is now the **Single Source of Truth**; the `rebuildGraph.js` engine automatically generates high-performance JSON indexes (`graph.json`, `index.json`) with strict ID-collision and broken-link detection.\n- **Skeleton-First Resolution**: To prevent context window saturation in long sessions, V3.5 implements \"Skeleton Loading.\" It loads full content only for active \"Seed\" nodes, while injecting only the ID, rationale, and file path (the Skeleton) for dependencies, reducing token overhead by up to 90%.\n- **Evolutionary Tiers (L1-L3)**:\n    - **L1 (Transient Memory)**: Raw tool outputs and semantic signals captured by the `AfterTool` hook.\n    - **L2 (Local Patterns)**: Distilled project-specific conventions stored in `.memory/patterns.md`.\n    - **L3 (Global Wisdom)**: Promoted cross-project knowledge organized into the **G-Series Hierarchy**:\n        - **G0 (Core Mandates)**: Hardcoded safety and system integrity rules.\n        - **G1 (Foundational Standards)**: Universal engineering principles (e.g., Instruction Integrity).\n        - **G2 (Domain Knowledge)**: Specialized rules (e.g., Weaver Architecture, Promotion Protocol).\n        - **G3 (Tech Fragments)**: Fine-grained snippets and specific tool knowledge.\n- **Deep Empirical Research Protocol**: When internal training data is insufficient, ASSA is mandated to clone official repositories or fetch raw source code to verify API signatures, ensuring 100% reliability for modern frameworks.\n\n---\n\n## 🌟 Core Capabilities\n\n### 1. Hierarchical Memory & Context Router\nASSA doesn't bloat the AI's context with everything. It organizes memory like a human brain:\n- **Domain-Specific Patterns (G2)**: Project-specific coding standards and conventions derived from the L2 evolution cycle.\n- **Global Engineering Standards (G1)**: High-confidence architectural principles and foundation standards stored in the L3 global library.\n- **Context Router**: Automatically matches and loads relevant \"wisdom blocks\" based on your Current Working Directory (CWD), ensuring the AI is always in the optimal state for the task.\n\n### 2. Smart Reflex & Semantic Emotion Sensing\nASSA is equipped with a highly sensitive semantic emotion sensor:\n- **Recognizes Praise**: When you say \"Perfect\", \"Good job\", or \"Exactly\", it triggers an immediate reflex to record the successful path.\n- **Reflective Evolution**: If the AI succeeds after a failed attempt, it automatically compares the \"Failure vs. Success\" diff to distill \"pitfall avoidance\" patterns.\n- **Internal Memory Judgment**: The agent autonomously evaluates its own breakthroughs even without explicit praise.\n- **Traceability (Source Citation)**: Whenever a rule is applied, the agent is mandated to briefly cite its Rule ID (e.g., [Rule: G1_CORE]) to maintain the evolution chain.\n\n### 3. Subagent-Driven & Zero Friction\nAll time-consuming analysis (distillation, synchronization, index updates) is handled by isolated background sub-agents (Distiller / Syncer). The main interface remains lightning-fast.\n\n### 4. Technical Integrity (SOTA Standards)\n- **Deep Sourcing Protocol**: Prioritizes raw source code and official documentation over outdated training data for third-party frameworks.\n- **Legal Consistency**: Automatically cross-checks LICENSE files with documentation to ensure project compliance.\n\n---\n\n## 🎭 Typical Evolution Case: Learning from Correction\n\nThe real magic of ASSA is turning your **\"feedback\"** and **\"corrections\"** into permanent **\"productivity\"**. Here is a real interaction log from this session:\n\n```text\n> Please check this mermaid diagram yourself using VLM. Many \\n characters are not rendered correctly. Please audit carefully.\n\n✦ I'll examine the Mermaid source in README.md and use the replace tool to fix the \\n characters, likely by replacing them with <br/> for correct\n  rendering.\n\n╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ✓  ReadFile README.md                                                                                                                            │\n│                                                                                                                                                  │\n│ Read lines 20-60 of 114 from README.md                                                                                                           │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n✦ I'll fix the Mermaid rendering by replacing all literal \\n with <br/> in the node labels, ensuring they're correctly interpreted as line breaks.\n\n╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ✓  Edit README.md:     %% Nodes... =>     %% Nodes...                                                                                            │\n│                                                                                                                                                  │\n│ 27 - User((\"🧑‍💻 开发者\\n(你)\")):::userNode                                                                                                        │\n│ 28 - Gemini[\"🤖 Gemini CLI\\n(主程序)\"]:::geminiNode                                                                                              │\n│ 27 + User((\"🧑‍💻 开发者<br/>(你)\")):::userNode                                                                                                     │\n│ 28 + Gemini[\"🤖 Gemini CLI<br/>(主程序)\"]:::geminiNode                                                                                           │\n│ ...                                                                                                                                              │\n│ ✓  submit_memory_signal (assa-mcp MCP Server) {\"breakthrough\":\"Mermaid diagram nodes in README.md should use '<br/>' instead of '\\\\n' for line … │\n│                                                                                                                                                  │\n│ Signal appended to ledger as PENDING (id: mcp-1773820749980)                                                                                     │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n✦ Apologies for the oversight. In Mermaid node labels, \\n is often not parsed correctly; <br/> should be used instead.\n\n> **Great, please commit this.**\n\n╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ✓  Shell git commit -m \"docs: update README with V3.5+ features, fix Mermaid diagrams, and add real-world evolution case\" && git status          │\n│                                                                                                                                                  │\n│ [master 3d3e286] docs: update README with V3.5+ features, fix Mermaid diagrams, and add real-world evolution case                        │\n│ 3 files changed, 117 insertions(+), 62 deletions(-)                                                                                             │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\n✦ I'll dispatch the ASSA Distiller subagent because the recent commit includes a significant update to hooks/afterToolHook.js...\n\n╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ✓  Generalist Agent Delegating to agent 'generalist' (Distiller Persona)                                                                         │\n│                                                                                                                                                  │\n│ Result: I have completed the [ASSA Distiller] mission... Added P-20260318-LINEA and P-20260318-FAILR to patterns.md.                             │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n**[Outcome]**: Through this single interaction, ASSA automatically distilled the \"Mermaid Forced Line-break Standard\" and \"Linear Interception Logic\". In any future project, it will follow these rules by default without being re-taught.\n\n### Case 2: Significance Evaluation (Judgment Layer)\n\nASSA is smart enough to avoid \"distillation noise\". When you make trivial changes (like translating documentation), it autonomously decides to skip the heavy analysis:\n\n```text\n> Localization to English completed. Commit the changes.\n\n╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ✓  Shell git add README.md README_CN.md && git commit -m \"docs: localize README to English...\"                                                   │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\n✦ I'll skip the distillation for this commit since it only involves documentation localization and doesn't introduce any architectural or logic changes.\n```\n\n**[Why this matters]**: This prevents the \"Global Wisdom\" library from being polluted by project-specific chores, keeping the AI's long-term memory high-signal and cost-efficient.\n\n---\n\n## 📦 Installation\n\nRun the following command in your terminal:\n\n```bash\ngemini extensions install https://github.com/Biogod2020/ASSA.git\n```\n\n---\n\n## ⌨️ How to Use\n\n**Just use it as you normally would.**\n\nASSA is designed to be \"invisible\". Focus on your code and directives; it will evolve automatically when you `git commit` or provide positive feedback (e.g., \"Good job\").\n\nTo manually trigger wisdom promotion:\n> \"/assa promote\" or \"Help me promote mature L2 patterns to the global library.\"\n\n---\n\n## 🤝 Contributing\nPRs are welcome! For development standards, see our [Workflow](conductor/workflow.md).\n\n---\n\n## ⚖️ License\nMIT License. See `LICENSE` for details.\n\n---\n*Developed with ❤️ by the ASSA Architect.*\n",
  "bytes": 16683,
  "sha": "b0ddea472788ae670757e529d221a03aa6697404390345de2b4d8d6056d31b1b",
  "repo_slug": "biogod2020/assa",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_biogod2020_assa_b395cd29/readme"
}