RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/cline/cline

AGENTS.md

sdk/AGENTS.md

Development reference for the Cline SDK workspace.

AGENTS.md

Quality

89/100

Scores the file, not the repository.

Length

676 words

11 headings · 5 code blocks

Repository

66k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
cline/cline/sdk/AGENTS.mdRawGitHub
1---
2description: Development reference for the Cline SDK workspace.
3globs: "*.ts,*.tsx,*.js,*.jsx,*.json,*.md"
4alwaysApply: true
5---
6 
7# Cline SDK — Development Reference
8 
9Quick-reference for active development. For onboarding, workspace setup, publishing, and detailed workflow see [CONTRIBUTING.md](./CONTRIBUTING.md). For architecture and runtime flows see [ARCHITECTURE.md](./ARCHITECTURE.md). For API details see [DOC.md](./DOC.md).
10 
11## Repository Scope
12 
13This file applies to the SDK workspace rooted at this directory (`sdk/`). In this repo, "root" means the SDK workspace root unless explicitly stated otherwise. Ignore the legacy repository root for SDK development except for Git operations or repo-wide searches that are explicitly needed.
14 
15Run SDK commands from `sdk/`, not from the legacy repository root. Do not run direct root-level commands such as `bun test sdk/...`; they bypass the SDK workspace setup and can fail to resolve `workspace:*` packages correctly.
16 
17## Package Boundaries
18 
19### Published SDK Packages
20 
21- `@cline/shared`: shared contracts, schemas, path helpers, hook engine, extension registry, low-level utilities
22- `@cline/llms`: provider settings/config, model catalogs, provider manifests, gateway contracts, handler creation
23- `@cline/agents`: stateless agent loop, tool orchestration, hook/extension runtime, event streaming
24- `@cline/core`: stateful orchestration, session lifecycle, storage, config watching, plugin loading, default tools, telemetry. Exposes `@cline/core/hub` for discovery, the detached daemon entry, WebSocket clients, and session/UI client adapters, plus `@cline/core/hub/daemon-entry` for launching the shared daemon
25 
26### Dependency Direction
27 
28```mermaid
29flowchart TD
30 shared["@cline/shared"] --> llms["@cline/llms"] & agents["@cline/agents"] & core["@cline/core"]
31 llms --> agents & core
32 agents --> core
33 core --> apps["CLI / VS Code / Code App"]
34```
35 
36Rules:
37- `shared` stays low-level and reusable
38- `agents` stays stateless — no session/storage/config concerns
39- `core` owns stateful orchestration, including the shared-hub daemon, server, and client adapters under `src/hub/`
40 
41## Change Routing
42 
43Route changes to the package that owns the concern:
44 
45- model/provider schemas or handler behavior: `@cline/llms`
46- stateless loop, tool orchestration, streaming, hook/extension runtime: `@cline/agents`
47- session lifecycle, storage, config watching, default tools, plugin loading, telemetry, hub runtime services, hub discovery, hub daemon spawn, and session-oriented client helpers (`HubSessionClient`, `HubUIClient`, `connectToHub`): `@cline/core` (hub pieces live under `src/hub/`)
48- remote-config schemas, managed instruction materialization, blob upload metadata, and OpenTelemetry config normalization: `@cline/shared/src/remote-config`
49- host-specific UX or shell behavior: app package
50 
51## Verifying Changes
52 
53Before testing in a fresh worktree, install SDK dependencies from the SDK workspace root:
54 
55```sh
56cd sdk
57bun install --frozen-lockfile
58```
59 
60SDK package exports resolve sibling packages through compiled `dist/` files. If `dist/` is missing, build the SDK packages before running package tests:
61 
62```sh
63bun run build:sdk
64```
65 
66SDK-root commands for cross-package confidence:
67 
68```sh
69bun run types # typecheck all packages
70bun run test # run all tests
71bun run check # lint + build + typecheck + check-publish
72```
73 
74For focused verification, prefer workspace package scripts from the SDK root:
75 
76```sh
77bun -F @cline/shared test
78bun -F @cline/llms test
79bun -F @cline/agents test
80bun -F @cline/core test:unit
81bun -F @cline/cli test:unit
82```
83 
84If a focused test command fails with a missing `@cline/*` export or missing `dist/` file, build the relevant dependency package or run `bun run build:sdk`, then rerun the same test command. Treat that as a workspace setup issue, not as evidence of a source-code bug.
85 
86If you touch hub/bootstrap/session flows, please update `ARCHITECTURE.md`.
87 
88## Practical Guidance
89 
90### Keep Boundaries Clean
91 
92- Don't move stateful logic down into `agents`
93- For `@cline/llms` provider/model routing rules, follow [packages/llms/AGENTS.md](./packages/llms/AGENTS.md).
94- Don't put app-specific behavior into `core` unless it is truly shared host behavior
95- Keep remote-config primitives generic in `shared`; host-facing session integration belongs in `core`
96 
97### Refactor Standard
98 
99- Prefer direct architectural cleanup over compatibility shims
100- Move code to the layer that owns the concern and update all call sites
101- If a helper just projects watcher state, keep it with the config layer instead of creating thin runtime wrappers
102 
103## Documentation Responsibilities
104 
105- `README.md`: visitor-facing overview. Update when the repo story or package inventory changes.
106- `CONTRIBUTING.md`: onboarding, workflow, publishing. Update when contributor setup or release process changes.
107- `AGENTS.md` (this file): development reference. Update when package boundaries, dependency rules, or change routing changes.
108- `ARCHITECTURE.md`: design, boundaries, runtime flows. Update when system design or architectural constraints change.
109- `DOC.md`: API and behavior reference. Update when exported surfaces, lifecycle semantics, or runtime behavior changes.
110 

Commands it names

  • bun install --frozen-lockfile
  • bun run build:sdk
  • bun run types
  • bun run test
  • bun run check
  • bun -F @cline/shared test
  • bun -F @cline/llms test
  • bun -F @cline/agents test
  • bun -F @cline/core test:unit
  • bun -F @cline/cli test:unit
  • bun test sdk/...

Sections

  • Cline SDK — Development Reference
  • Repository Scope
  • Package Boundaries
  • Published SDK Packages
  • Dependency Direction
  • Change Routing
  • Verifying Changes
  • Practical Guidance
  • Keep Boundaries Clean
  • Refactor Standard
  • Documentation Responsibilities

What it covers

setupbuildtestcode-stylearchitecturedependenciesdeploymentmonorepodocs

Stack — with the evidence

typescript

(1.00)

node

(1.00)

vitest

(1.00)

bun

(0.85)

react

(0.70)

nextjs

(0.70)

tailwind

(0.70)

vite

(0.70)

eslint

(0.70)

vercel

(0.70)

desktop-app

(0.70)

javascript

(0.60)

biome

(0.60)

github-actions

(0.60)

Glob targeting

  • *.ts
  • *.tsx
  • *.js
  • *.jsx
  • *.json
  • *.md

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
cline
Language
—
License
—
Archived
no

All configs in this repo

Also in cline/cline

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
cline/cline.clinerules/bun-and-node.md · 66kCline rulestypescriptnode+12setuptestmonorepodo-not74/1003 days ago
cline/cline.clinerules/cline-overview.md · 66kCline rulestypescriptnode+12archtypesapi54/1003 days ago
cline/cline.clinerules/debug-harness.md · 66kCline rulestypescriptnode+12buildtesttesting-strategysecurity+185/1003 days ago
cline/cline.clinerules/general.md · 66kCline rulestypescriptnode+12setupbuildstylearch+286/1003 days ago
cline/cline.clinerules/network.md · 66kCline rulestypescriptnode+12styletesting-strategydependencies54/1003 days ago
cline/cline.clinerules/protobuf-development.md · 66kCline rulestypescriptnode+12buildstylearchapi+174/1003 days ago
cline/cline.clinerules/sdk-migration.md · 66kCline rulestypescriptnode+12style59/1003 days ago
cline/cline.clinerules/storage.md · 66kCline rulestypescriptnode+12stylearchdatabasedo-not65/1003 days ago
cline/cline.github/copilot-instructions.md · 66kCopilot instructionstypescriptnode+12buildteststyleapi+175/1003 days ago
cline/clineAGENTS.md · 66kAGENTS.mdtypescriptnode+13buildtestlint-formatstyle+283/1003 days ago
cline/clinesdk/packages/llms/AGENTS.md · 66kAGENTS.mdtypescriptnode+12no sections45/1003 days ago
Diff against .clinerules/bun-and-node.md Diff against .clinerules/cline-overview.md Diff against .clinerules/debug-harness.md Diff against .clinerules/general.md Diff against .clinerules/network.md Diff against .clinerules/protobuf-development.md Diff against .clinerules/sdk-migration.md Diff against .clinerules/storage.md Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against sdk/packages/llms/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack