Skip to content

Commit dc9303e

Browse files
committed
docs: professional-tone rewrite, IA cleanup, signature fixes
- Rewrite prose across all docs pages into a neutral, professional technical-documentation tone; remove anthropomorphizing/agent-guessing framing and marketing phrasing. - Fix Java method declarations to use fully-qualified parameter types (e.g. addOption(org.apache.commons.cli.Option), parse(org.apache.commons.cli.Options, java.lang.String[])). - Remove the reachability section from Core concepts and Common tasks (kept as an application-level capability in cocoa). - Replace the broken Mermaid diagram on "What is CLDK?" and expand the language-coverage table. - Merge the "Guides" and "Build with CLDK" sidebar groups. - Remove the "Build with CLDK" overview and "COCO MCP Toolbox" pages and strip all inbound links. - Replace em-dashes with parentheses/colon/comma and normalize en-dashes.
1 parent f1e5661 commit dc9303e

29 files changed

Lines changed: 347 additions & 612 deletions

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,22 @@
2525
</a>
2626
</p>
2727

28-
Codellm-Devkit (CLDK) is a multilingual program analysis framework that bridges the gap between traditional static analysis tools and Large Language Models (LLMs) specialized for code (CodeLLMs). Codellm-Devkit allows developers to streamline the process of transforming raw code into actionable insights by providing a unified interface for integrating outputs from various analysis tools and preparing them for effective use by CodeLLMs.
28+
Codellm-Devkit (CLDK) is a multilingual program analysis framework for CodeLLM workflows. It turns source code into structured program facts such as symbols, method bodies, call graphs, and data-model objects that an LLM pipeline can query.
2929

30-
Codellm-Devkit simplifies the complex process of analyzing codebases that span multiple programming languages, making it easier to extract meaningful insights and drive LLM-based code analysis. `CLDK` achieves this through an open-source Python library that abstracts the intricacies of program analysis and LLM interactions. With this library, developer can streamline the process of transforming raw code into actionable insights by providing a unified interface for integrating outputs from various analysis tools and preparing them for effective use by CodeLLMs.
30+
CLDK is an open-source Python library over language-specific analysis backends. The user calls one API; the backend handles parsing, symbol resolution, and graph construction for the selected language.
3131

32-
**The purpose of Codellm-Devkit is to enable the development and experimentation of robust analysis pipelines that harness the power of both traditional program analysis tools and CodeLLMs.**
33-
By providing a consistent and extensible framework, Codellm-Devkit aims to reduce the friction associated with multi-language code analysis and ensure compatibility across different analysis tools and LLM platforms.
32+
**The purpose of Codellm-Devkit is to help build analysis pipelines that combine program-analysis results with CodeLLMs.**
33+
It gives those pipelines a consistent shape across languages and analysis tools.
3434

35-
Codellm-Devkit is designed to integrate seamlessly with a variety of popular analysis tools, such as WALA, Tree-sitter, LLVM, and CodeQL, each implemented in different languages. Codellm-Devkit acts as a crucial intermediary layer, enabling efficient and consistent communication between these tools and the CodeLLMs.
35+
CLDK integrates with tools such as WALA, Tree-sitter, LLVM, and CodeQL. It normalizes their outputs into typed models that downstream code can consume.
3636

37-
Codellm-Devkit is constantly evolving to include new tools and frameworks, ensuring it remains a versatile solution for code analysis and LLM integration.
37+
CLDK is an ongoing IBM Research project.
3838

3939
Codellm-Devkit is:
4040

41-
- **Unified**: Provides a single framework for integrating multiple analysis tools and CodeLLMs, regardless of the programming languages involved.
42-
- **Extensible**: Designed to support new analysis tools and LLM platforms, making it adaptable to the evolving landscape of code analysis.
43-
- **Streamlined**: Simplifies the process of transforming raw code into structured, LLM-ready inputs, reducing the overhead typically associated with multi-language analysis.
44-
45-
Codellm-Devkit is an ongoing project, developed at IBM Research.
41+
- **Unified**: one API over language-specific analysis backends.
42+
- **Extensible**: new backends can add languages or analysis tools.
43+
- **Structured**: code becomes typed models, call graphs, and other queryable artifacts.
4644

4745
## Contact
4846

@@ -68,7 +66,7 @@ For any questions, feedback, or suggestions, please contact the authors:
6866

6967
## Architectural and Design Overview
7068

71-
Below is a very high-level overview of the architectural of CLDK:
69+
Below is a high-level view of CLDK's architecture:
7270

7371

7472
```mermaid
@@ -96,17 +94,17 @@ User <--> A[CLDK]
9694
X[‡ Yet to be implemented]
9795
```
9896

99-
The user interacts by invoking the CLDK API. The CLDK API is responsible for handling the user requests and delegating them to the appropriate language-specific modules.
97+
The user invokes the CLDK API. CLDK delegates the request to the language-specific module.
10098

101-
Each language comprises of two key components: data models and backends.
99+
Each language has two main components: data models and backends.
102100

103-
1. **Data Models:** These are high level abstractions that represent the various language constructs and componentes in a structured format using pydantic. This confers a high degree of flexibility and extensibility to the models as well as allowing for easy accees of various data components via a simple dot notation. In addition, the data models are designed to be easily serializable and deserializable, making it easy to store and retrieve data from various sources.
101+
1. **Data Models:** Pydantic models for language constructs such as files, classes, methods, fields, and call edges. They support attribute access and serialization.
104102

105-
2. **Analysis Backends:** These are the components that are responsible for interfacing with the various program analysis tools. The core backends are Treesitter, Javaparse, WALA, LLVM, and CodeQL. The backends are responsible for handling the user requests and delegating them to the appropriate analysis tools. The analysis tools perfrom the requisite analysis and return the results to the user. The user merely calls one of several high-level API functions such as `get_method_body`, `get_method_signature`, `get_call_graph`, etc. and the backend takes care of the rest.
103+
2. **Analysis Backends:** Components that call program-analysis tools such as Treesitter, Javaparser, WALA, LLVM, and CodeQL. The user calls high-level methods such as `get_method_body`, `get_method_signature`, or `get_call_graph`; the backend runs the required analysis and returns the result.
106104

107-
Some langugages may have multiple backends. For example, Java has WALA, Javaparser, Treesitter, and CodeQL backends. The user has freedom to choose the backend that best suits their needs.
105+
Some languages may have multiple backends. For example, Java uses WALA, Javaparser, Treesitter, and CodeQL-backed analysis.
108106

109-
We are currently working on implementing the retrieval and prompting components. The retrieval component will be responsible for retrieving the relevant code snippets from the codebase for RAG usecases. The prompting component will be responsible for generating the prompts for the CodeLLMs using popular prompting frameworks such as `PDL`, `Guidance`, or `LMQL`.
107+
Retrieval and prompting components are still in progress. Retrieval will pull relevant code snippets for RAG use cases. Prompting will generate CodeLLM prompts with frameworks such as `PDL`, `Guidance`, or `LMQL`.
110108

111109
## Quick Start: Example Walkthrough
112110

astro.config.mjs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,11 @@ export default defineConfig({
154154
items: [
155155
{ label: "Core concepts", slug: "guides/concepts", attrs: { "data-cldk-icon": "learning-16" } },
156156
{ label: "Common tasks", slug: "guides/common-tasks", attrs: { "data-cldk-icon": "workflow-16" } },
157-
],
158-
},
159-
{
160-
label: "Build with CLDK",
161-
items: [
162-
{ label: "Overview", slug: "build", attrs: { "data-cldk-icon": "manual-16" } },
163157
{
164158
label: "Code Context Agent",
165159
slug: "cocoa",
166160
attrs: { "data-cldk-icon": "chat-16" },
167161
},
168-
{
169-
label: "COCO MCP Toolbox",
170-
slug: "cocoa-mcp",
171-
attrs: { "data-cldk-icon": "globe-network-16" },
172-
},
173162
],
174163
},
175164
{

src/components/HomeCards.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ type Card = {
2020
const cards: Card[] = [
2121
{
2222
title: "Examples",
23-
description: "Worked Python and Java snippets, straight from the test suite.",
23+
description: "Runnable Python and Java snippets pulled from SDK tests.",
2424
href: "/examples/",
2525
icon: "workflow",
2626
},
2727
{
2828
title: "cocoa",
29-
description: "Build a Code Context Agent plugin that drives CLDK from a coding agent's Bash tool.",
29+
description: "Claude Code plugin for callers, reachability, and change impact.",
3030
href: "/cocoa/",
3131
icon: "chat",
3232
},
3333
{
3434
title: "API reference",
35-
description: "The CLDK factory and the per-language analysis facades.",
35+
description: "The CLDK factory, language APIs, and typed models.",
3636
href: "/reference/python-api/",
3737
icon: "manual",
3838
},

src/content/docs/backends.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
title: The codeanalyzer backends
3-
description: "CLDK is a thin Python frontend over a family of standalone language analyzers: the codeanalyzer-* backends. Here's how that split works and where each one lives."
3+
description: "CLDK is a Python frontend over standalone per-language analyzers, the codeanalyzer-* backends. This page describes the frontend/backend split and where each backend lives."
44
---
55

66
import { Badge, CardGrid, LinkCard, Aside } from "@astrojs/starlight/components";
77

8-
The Python SDK you call is deliberately thin. The heavy lifting (parsing source, resolving symbols, building call graphs) happens in a family of **standalone language analyzers**, one per language, collectively the `codeanalyzer-*` backends. Each one emits the same shape of typed JSON, and the SDK facade deserializes it into the models you query.
8+
Source parsing, symbol resolution, and call-graph construction are performed by **standalone language analyzers**, one per language, collectively the `codeanalyzer-*` backends. Each backend emits typed JSON, and the SDK deserializes it into queryable models.
99

1010
```mermaid
1111
flowchart LR
12-
SDK["CLDK Python SDK<br/>(analysis facade)"] -->|invokes| CAJ["codeanalyzer-java<br/>(JVM · WALA)"]
12+
SDK["CLDK Python SDK<br/>(analysis API)"] -->|invokes| CAJ["codeanalyzer-java<br/>(JVM · WALA)"]
1313
SDK -->|invokes| CAP["codeanalyzer-python<br/>(Jedi · CodeQL)"]
14-
SDK -.->|coming soon| CAT["codeanalyzer-ts<br/>(TS compiler)"]
14+
SDK -->|invokes| CAT["codeanalyzer-ts<br/>(TS compiler)"]
1515
CAJ -->|canonical JSON| SDK
1616
CAP -->|canonical JSON| SDK
17-
CAT -.->|canonical JSON| SDK
17+
CAT -->|canonical JSON| SDK
1818
```
1919

20-
This separation is what lets one `analysis` API span languages: the facade never parses code itself, it shells out to the right backend, then maps the backend's JSON onto typed models (`JApplication`, `PyModule`, ). Add a backend that speaks the canonical JSON and the SDK can analyze a new language with almost no new frontend logic: see [Add a language backend](/contributing/add-language-backend/).
20+
This separation lets a single `analysis` API span languages. The SDK does not parse code itself; it invokes the appropriate backend, then maps the backend JSON onto typed models (`JApplication`, `PyModule`, and others). A backend that emits the canonical JSON makes its language available to the SDK with only binding work required. See [Add a language backend](/contributing/add-language-backend/).
2121

22-
<Aside type="note" title="You usually don't run these directly">
23-
The SDK manages the backend for you: auto-downloading the Java JAR, provisioning the Python analyzer in a virtualenv. These pages are for when you want to understand (or contribute to) what's happening underneath.
22+
<Aside type="note" title="Backends are managed by the SDK">
23+
The SDK manages the backend automatically: it downloads the Java JAR and provisions the Python analyzer in a virtualenv. These pages document the backend layer for readers who want to understand or contribute to it.
2424
</Aside>
2525

2626
This is the **backend** layer. For the SDKs that consume it, see the [SDKs overview](/reference/sdks/).
@@ -31,13 +31,13 @@ This is the **backend** layer. For the SDKs that consume it, see the [SDKs overv
3131

3232
## Backends (analyzers)
3333

34-
The `codeanalyzer-*` tools that parse a language and serialize the canonical symbol-table and call-graph schema every frontend reads.
34+
The `codeanalyzer-*` tools parse a language and serialize the canonical symbol-table and call-graph schema that every frontend reads.
3535

3636
| Language | Analyzer | Maturity |
3737
| --- | --- | --- |
3838
| **Java** | [codeanalyzer-java](/backends/codeanalyzer-java/) | <Badge text="Mature" variant="success" /> |
3939
| **Python** | [codeanalyzer-python](/backends/codeanalyzer-python/) | <Badge text="Mature" variant="success" /> |
40-
| **TypeScript** | [codeanalyzer-ts](/backends/codeanalyzer-ts/) | <Badge text="Medium" variant="tip" /> |
40+
| **TypeScript** | [codeanalyzer-ts](/backends/codeanalyzer-ts/) | <Badge text="Mature" variant="success" /> |
4141
| **JavaScript** | via [codeanalyzer-ts](/backends/codeanalyzer-ts/) | <Badge text="Medium" variant="tip" /> |
4242
| **Go** | Not started | <Badge text="Help wanted" variant="danger" /> <Badge text="Stub" variant="default" /> |
4343
| **Rust** | Not started | <Badge text="Help wanted" variant="danger" /> <Badge text="Stub" variant="default" /> |
@@ -48,8 +48,8 @@ The `codeanalyzer-*` tools that parse a language and serialize the canonical sym
4848
## Built backends
4949

5050
<CardGrid>
51-
<LinkCard title="codeanalyzer-python" description="Jedi-based semantic analysis with optional CodeQL call-graph augmentation; ships the canonical Py* schema." href="/backends/codeanalyzer-python/" />
52-
<LinkCard title="codeanalyzer-java" description="The deepest backend: WALA + Javaparser, producing symbol tables, call graphs, hierarchy, and CRUD analysis." href="/backends/codeanalyzer-java/" />
53-
<LinkCard title="codeanalyzer-ts" description="The TypeScript analyzer: the backend exists today; Python SDK support is on the way." href="/backends/codeanalyzer-ts/" />
54-
<LinkCard title="Add a backend" description="Help wanted. Go, Rust, C, C++, and C# are unbuilt. A backend that speaks the canonical JSON lights the language up across every SDK." href="/contributing/add-language-backend/" />
51+
<LinkCard title="codeanalyzer-python" description="Jedi-based semantic analysis with optional CodeQL call-graph augmentation; emits the canonical Py* schema." href="/backends/codeanalyzer-python/" />
52+
<LinkCard title="codeanalyzer-java" description="WALA and Javaparser; produces symbol tables, call graphs, type hierarchy, and CRUD analysis." href="/backends/codeanalyzer-java/" />
53+
<LinkCard title="codeanalyzer-ts" description="Stable. The TypeScript/TSX analyzer, emitting the canonical symbol-table and call-graph schema." href="/backends/codeanalyzer-ts/" />
54+
<LinkCard title="Add a backend" description="Help wanted. Go, Rust, C, C++, and C# are not yet built. A backend that emits the canonical JSON makes that language available to every SDK." href="/contributing/add-language-backend/" />
5555
</CardGrid>

0 commit comments

Comments
 (0)