agentleFS
SeaualSeaual/meta-knowledge-graph/CLAUDE.md

meta-knowledge-graph

CLAUDE.md14 starsChanged 6 months agoMITView on GitHub

This file provides project-level context for Claude Code when working with the Meta Knowledge Graph (MKG) codebase. Reference tree: https://github.com/Seaual/meta-knowledge-graph/tree/codex/release-0.1.1 Meta Knowledge Graph is an LLM-driven academic knowledge graph engine. Researchers upload PDFs, and the system automatically extracts hierarchical concepts (8-level taxonomy) and builds an interactive knowledge graph for research opportunity discovery via AI Agents.

The file

We split this CLAUDE.md into the rules it gives an agent

9 rules. About 0 are common, 1 is distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add Pydantic schemas to backend/schemas.py if needed

    line 53
  2. Very specific:

    Add route handler in backend/routes/ (follow existing router patterns)

    line 54
  3. Very specific:

    Add API client in frontend/src/lib/api/ if frontend consumes it

    line 56
  4. Very specific:

    Update mkg/llm_client.py — add new _call_* method

    line 59
  5. Very specific:

    Add config fields in backend/routes/llm.py if UI config needed

    line 60
  6. Very specific:

    Update mkg/database/schema.py schema definitions

    line 63
  7. Very specific:

    Add migration logic in mkg/database/migrations.py or mkg/database/compat.py

    line 64
  8. Very specific:

    Update repositories in mkg/repositories/ as needed

    line 65
  9. Distinctive:

    No built-in auth yet; Docker deploys should use reverse proxy + Basic Auth

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Claude Code — Project Context

This file provides project-level context for Claude Code when working with the Meta Knowledge Graph (MKG) codebase. Reference tree: https://github.com/Seaual/meta-knowledge-graph/tree/codex/release-0.1.1

Project Overview

Meta Knowledge Graph is an LLM-driven academic knowledge graph engine. Researchers upload PDFs, and the system automatically extracts hierarchical concepts (8-level taxonomy) and builds an interactive knowledge graph for research opportunity discovery via AI Agents.

Architecture

frontend/          React 18 + TypeScript + Vite + TailwindCSS + D3.js
backend/           FastAPI + SQLite (WAL mode) + LangGraph agents
mkg/               Core domain library
├── database/           SQLite database package (core, schema, migrations, compat)
├── repositories/       Data access layer (papers, concepts, folders, ...)
├── agent/              LangGraph multi-agent system
│   ├── nodes/          Lead, Research, Citation, Paper QA, Summarize
│   ├── tools.py        Agent tools
│   └── research_graph.py  Async deep research orchestration
├── dedup/              Concept deduplication (synonym, absorption, translation)
├── llm.py              LLMClient + MKGChatModel adapter (native HTTP, OpenAI/Anthropic)
├── resilience.py       Retry wrapper for external calls
├── semantic_scholar.py S2 API client for metadata enhancement
└── concept_extractor.py  Two-stage concept extraction pipeline

Coding Conventions

Python

  • Target Python 3.10+
  • Type annotations required on public APIs
  • ruff for lint/format (line length 120)
  • pyright for type checking (standard mode)
  • First-party imports: backend, mkg
  • Database access goes through mkg/repositories/, not raw SQL in routes

TypeScript / React

  • React 18 with functional components and hooks
  • zustand for state management
  • API clients live in frontend/src/lib/api/
  • Components use clsx + tailwind-merge for class composition
  • prettier + eslint enforced in CI

Common Tasks

Add a new API endpoint

  1. Add Pydantic schemas to backend/schemas.py if needed
  2. Add route handler in backend/routes/ (follow existing router patterns)
  3. Register router in backend/main.py
  4. Add API client in frontend/src/lib/api/ if frontend consumes it

Add a new LLM provider

  1. Update mkg/llm_client.py — add new _call_* method
  2. Add config fields in backend/routes/llm.py if UI config needed

Database schema changes

  1. Update mkg/database/schema.py schema definitions
  2. Add migration logic in mkg/database/migrations.py or mkg/database/compat.py
  3. Update repositories in mkg/repositories/ as needed

Security Notes

  • API Keys are stored locally in SQLite; encryption should be confirmed before server deployment
  • CORS is restricted to known origins in production (see backend/main.py)
  • No built-in auth yet; Docker deploys should use reverse proxy + Basic Auth

GitNexus

This project uses GitNexus for code intelligence. See AGENTS.md for GitNexus-specific tooling rules and impact analysis requirements.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.