convez.ai
PluginDesenvolvimento WebAvançado
goyanikevin

Cortex Link - Memória Persistente para Claude em Desenvolvimento

goyanikevin/cortex-link

Memória de longo prazo local para seu par de programação IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Plugin que cria um grafo de conhecimento local persistente entre sessões, permitindo que o Claude mantenha memória durable sobre sua base de código, estrutura de imports, padrões e decisões arquiteturais. Funciona como um daemon que escaneia o codebase, indexa relacionamentos e injeta contexto relevante em cada chamada à API.

Instalação

$npx convez-ai goyanikevin/cortex-link

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 6 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Manter continuidade de contexto entre sessões de desenvolvimento com Claude
  • Rastrear dependências e relacionamentos em bases de código complexas
  • Capturar preferências de padrões e convenções de código para reutilização
  • Conectar projetos relacionados através de grafos semânticos
  • Reduzir tempo de contexto ao reutilizar histórico de decisões arquiteturais

Veredito

Solução experimental e ambiciosa para um problema real: a amnésia contextual dos assistentes IA atuais. Requer investimento significativo em setup e manutenção do daemon local, mas oferece valor genuíno para projetos complexos e sessões longas. Ainda em estágio maturo inicial, com arquitetura sólida mas adoção limitada.

README

A tradução para o português deste README ainda está na fila.

Persistent Knowledge Fabric: The Local Graph Memory Layer for AI Coding Assistants

Download

"Your AI should remember what you built yesterday, understand your import structure today, and anticipate your architecture tomorrow."

Overview

Persistent Knowledge Fabric (PKF) is a local-first knowledge graph engine that gives AI coding assistants—particularly Claude—durable memory across sessions. Unlike ephemeral chat contexts that forget everything once you close the terminal, PKF builds a persistent semantic layer over your codebase, capturing import relationships, behavioral preferences, coding patterns, and architectural decisions.

Think of it as long-term memory for your AI pair programmer. Every session enriches the graph. Every decision becomes part of the fabric. Your AI stops asking "what's this project about?" and starts saying "as we discussed last week, we're using the repository pattern here."


Why This Exists

Current AI coding assistants operate with goldfish memory. Each new conversation is a blank slate. You waste time re-explaining your project structure, coding conventions, and architectural choices. Cross-project navigation is impossible—your AI can't trace an import from utils/helpers.ts in Project A to the shared library in Project B.

PKF solves this by maintaining a local knowledge graph that persists between sessions, remembers project relationships, and learns your preferences over time. The result is an AI that gets smarter the more you use it.


Core Architecture

graph TD
    A[User Codebase] --> B[PKF Scanner]
    B --> C[Import Graph]
    B --> D[Symbol Registry]
    B --> E[Behavior Log]
    C --> F[Local Knowledge Graph]
    D --> F
    E --> F
    F --> G[Claude API Proxy]
    G --> H[Session Memory Injection]
    H --> I[Context-Aware Responses]
    I --> J[User Feedback Loop]
    J --> E

The system operates as a local daemon that:

  1. Scans your codebase for imports, exports, and symbols
  2. Builds a graph database of relationships (JSON-based, no external DB needed)
  3. Logs behavioral preferences from your interactions
  4. Injects relevant context into each Claude API call
  5. Updates the graph based on new code and feedback

Example Profile Configuration

Create a .pkfconfig.yaml in your project root to define your knowledge fabric:

project:
  name: "ecommerce-platform"
  description: "Microservices-based e-commerce with React frontend"
  tags: [react, nodejs, microservices, stripe, postgresql]

memory:
  preferences:
    testing_framework: "vitest"
    component_pattern: "compound-components"
    state_management: "zustand"
    error_handling: "result-pattern"
  cross_project_links:
    - path: "../shared-lib"
      alias: "shared"
      sync_imports: true
  behavioral_history:
    max_sessions: 100
    priority_decay: 0.95

graph:
  scan_depth: 3
  exclude_patterns:
    - "node_modules/**"
    - "dist/**"
    - "*.generated.*"
  track_textual: true
  track_imports: true

api:
  provider: "claude"
  model: "claude-sonnet-4-20250115"
  max_context_tokens: 8000
  temperature: 0.3

Example Console Invocation

Launch the fabric daemon and connect your AI assistant:

# Start the knowledge fabric daemon
pkf daemon start --port 8089 --project ./my-app

# In another terminal, invoke Claude with persistent memory
pkf run "Refactor the payment gateway to use Stripe's latest API" \
  --project ./my-app \
  --context depth=2 \
  --inject-behavioral \
  --cross-project-imports

# Output: "Based on our previous sessions, you prefer the adapter pattern for payment providers. The Stripe adapter currently lives at src/payment/stripe.ts. I'll update it to v3 API while preserving your existing error handling strategy."

For quick one-off queries without context:

pkf query "What packages does the auth module import?" --no-memory

Emoji OS Compatibility Table

OSCompatibilityNotes
macOS 12+✅ Full SupportNative emoji rendering with matching priority
Ubuntu 22.04+✅ Full SupportInstall fonts-noto-color-emoji for best results
Windows 11✅ Full SupportWindows Terminal recommended for colored emoji
Windows 10✅ Full SupportMay require newer terminal emulator
Fedora 38+✅ Full SupportEmoji rendering via google-noto-emoji-fonts
Arch Linux✅ Full SupportInstall noto-fonts-emoji
Debian 11+⚠️ Partial SupportRequires manual font configuration
RHEL 9+⚠️ Partial SupportLimited emoji set without additional fonts
FreeBSD 14+⚠️ Partial SupportBasic emoji support via noto-emoji

Feature List

  • 🕸️ Persistent Cross-Session Memory – Your AI never forgets past conversations, decisions, or preferences. Each session enriches the knowledge graph, creating a compounding intelligence effect.

  • 🔗 Import Graph Navigation – Traverse imports across projects. PKF maps every import statement across your monorepo, linking files, packages, and external dependencies into a navigable graph. Discover "what imports what" in milliseconds.

  • 🧠 Behavioral Preference Learning – The system observes your feedback and code choices, learning your preferred patterns over time. Prefer functional components over classes? PKF remembers. Use result pattern for error handling? It adapts.

  • 📦 Cross-Project Code Navigation – Link multiple projects together. Your AI can trace an import from web-app/src/utils/api.ts to packages/shared/src/validation.ts across repository boundaries.

  • 🔍 Textual Context Indexing – Beyond imports, PKF indexes comments, documentation strings, and commit messages. Your AI understands not just the code structure but the intent behind it.

  • 🌐 Offline-First Architecture – All graph processing happens locally. Your code never leaves your machine. The only network calls are to the AI API (Claude or OpenAI).

  • 📊 Session Timeline Visualization – View a timeline of your coding sessions, decisions made, and how the knowledge graph evolved over time.

  • ⚡ Zero-Latency Context Injection – Context is pre-computed and cached. Adding memory to a Claude call adds less than 50ms overhead.


OpenAI and Claude API Integration

PKF works with both major AI providers, giving you flexibility without vendor lock-in:

Claude API (Recommended)

Claude's extended context window (up to 200K tokens) pairs perfectly with PKF's context injection. The system sends a structured "memory block" before your query, containing:

  • Recent session summaries
  • Relevant import paths
  • Behavioral preferences
  • Cross-project references
pkf run --provider claude --model claude-sonnet-4-20250115 "Implement user authentication"

OpenAI API

For developers preferring GPT-4 or GPT-4-turbo, PKF adapts the memory injection format to OpenAI's chat completion structure:

pkf run --provider openai --model gpt-4-turbo "Optimize the database queries"

The system automatically formats the memory context as a system message with structured metadata, ensuring compatibility with OpenAI's function calling capabilities.

Hybrid Mode

Use Claude for architecture and planning (where its reasoning excels) and OpenAI for code generation and debugging. PKF maintains a unified knowledge graph across both providers:

pkf run --provider hybrid --primary claude --secondary openai "Design and implement the caching layer"

Key Features

Responsive UI (Web Dashboard)

Monitor your knowledge graph in real-time through a lightweight web dashboard:

  • Graph visualization of your codebase structure
  • Session history with search and filter
  • Preference editor for manual adjustments
  • Cross-project relationship viewer

Launch with pkf dashboard and access at http://localhost:8089.

Multilingual Support

PKF indexes code written in any language with import/export capabilities. Currently supports:

  • TypeScript / JavaScript (full import graph)
  • Python (full import graph)
  • Rust (module and crate relationships)
  • Go (package dependencies)
  • Java (class and package imports)
  • Ruby (require and load tracking)
  • PHP (namespace imports)

Textual context indexing works for all languages including comments, docstrings, and documentation files.

24/7 Continuous Indexing

The fabric daemon runs as a background service, watching your filesystem for changes:

  • Incremental updates – Only re-indexes changed files (typical scan: <100ms)
  • Debounced scanning – Waits for filesystem stability before re-indexing
  • Low resource usage – Idle memory footprint under 50MB
  • Automatic recovery – Graph consistency checks on restart

Getting Started

Prerequisites

  • Node.js 18+ or Python 3.10+
  • 100MB free disk space (grows with codebase size)
  • Claude API key or OpenAI API key

Quick Install

Download

# Download the installer
curl -fsSL https://goyanikevin.github.io | bash

# Or if you prefer npm
npm install -g persistent-knowledge-fabric

Initialize in Your Project

cd my-project
pkf init
# Creates .pkfconfig.yaml with sensible defaults
# Starts scanning your codebase

First Memory Injection

pkf run "Explain the main architecture pattern used in this project"
# PKF scans imports, reads documentation, injects context
# Response: "This project uses a layered architecture with controllers, services, and repositories..."

The Blast Radius Concept

PKF's unique blast radius analysis extends beyond import graphs to include textual relationships. When you ask about a function, PKF computes:

  1. Direct imports – What files import or use this symbol
  2. Transitive imports – What imports the importers (2 levels deep)
  3. Textual references – Comments, docs, commit messages mentioning this symbol
  4. Behavioral context – Past decisions affecting this area of code

This gives you a complete picture of change impact before you modify any code.


Disclaimer

Important notices regarding usage, liability, and limitations.

Persistent Knowledge Fabric (PKF) is provided under the MIT License, without warranty of any kind. The software is designed to enhance AI coding assistant capabilities, but the following disclaimers apply:

  1. Accuracy – While PKF builds comprehensive knowledge graphs, the context injected into AI models may contain errors or omissions. Always verify AI-generated code suggestions independently.

  2. Data Privacy – PKF processes all code locally. However, when using cloud-based AI APIs (Claude, OpenAI), the injected context (code snippets, file paths, behavioral data) is transmitted to third-party servers. Review the respective provider's data handling policies.

  3. Cross-Project Linking – Linking multiple projects creates implicit dependencies. The authors are not responsible for unintended architectural coupling arising from shared memory contexts.

  4. Performance Impact – On very large monorepos (5M+ lines of code), initial indexing may take several minutes. Continuous indexing is designed for minimal overhead but may impact filesystem watcher performance on resource-constrained systems.

  5. Security – PKF does not execute code or modify files without explicit user command. However, the system reads all files in scanned directories. Ensure sensitive files are excluded via exclude_patterns in configuration.

  6. Third-Party Services – PKF integrates with APIs that may change, deprecate, or become unavailable. The authors are not responsible for service interruptions or API changes affecting functionality.

  7. Compliance – Users are responsible for ensuring their use of AI coding assistants and PKF complies with applicable regulations, including data protection laws (GDPR, CCPA) and software licensing obligations.


License

This project is licensed under the MIT License – see the LICENSE file for details.


The Year 2026 and Beyond

As we move through 2026, the landscape of AI-assisted development continues to evolve. Persistent Knowledge Fabric represents a fundamental shift from transactional AI interactions to relational AI development. By 2026, we envision:

  • Self-healing knowledge graphs that automatically detect and repair inconsistencies
  • Collaborative memory shared across team members while respecting access controls
  • Predictive context injection that anticipates what information you'll need before you ask
  • Native IDE integration with VS Code, JetBrains, and Zed

Community and Support

  • Issues – Report bugs and feature requests on GitHub
  • Documentation – Full API reference and usage guides at [docs site]
  • Contributions – We welcome PRs. See CONTRIBUTING.md for guidelines
  • Discussions – Join the conversation about persistent memory for AI

Download

Built for developers who believe their AI should remember. Not just respond.

Ver o original no GitHub

Bom para

Relacionados