A hyper-efficient, language-agnostic format for representing software codebase structure. Give LLMs unparalleled context at a fraction of the token cost.
// user.js (1,247 tokens)
class User {
constructor(name, email, age) {
this.name = name;
this.email = email;
this.age = age;
this.createdAt = new Date();
this.isActive = true;
this.preferences = {
theme: 'light',
notifications: true,
language: 'en'
};
}
validateEmail() {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(this.email);
}
updatePreferences(newPrefs) {
this.preferences = { ...this.preferences, ...newPrefs };
}
deactivate() {
this.isActive = false;
}
getDisplayName() {
return `${this.name} (${this.email})`;
}
}
export default User;// SCN Representation (38 tokens - 97% reduction!)
user.js◮
◉User{name,email,age,createdAt,isActive,preferences}
⚡validateEmail()→bool
⚡updatePreferences(newPrefs)
⚡deactivate()
⚡getDisplayName()→str
⤴UserBridging the "Context Chasm" between massive codebases and LLM token limits
Achieve 90%+ token reduction while preserving all structural context. Perfect for LLM consumption.
Works with any programming language, framework, or paradigm. One notation to rule them all.
Captures APIs, relationships, and architecture patterns that matter most for understanding code.
Designed specifically for LLM consumption with optimal information density and parsing efficiency.
Human-readable symbols with intuitive meaning. Easy to learn, write, and understand.
Built for tooling integration with parsers, generators, and IDE extensions coming soon.
Real-world examples showing the power of symbolic context notation across different programming paradigms
A typical React component with hooks and props
// UserProfile.jsx (2,156 tokens)
import React, { useState, useEffect } from 'react';
import './UserProfile.css';
const UserProfile = ({ userId, onUpdate }) => {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
const [editing, setEditing] = useState(false);
useEffect(() => {
fetchUser(userId);
}, [userId]);
const fetchUser = async (id) => {
try {
setLoading(true);
const response = await fetch(`/api/users/${id}`);
const userData = await response.json();
setUser(userData);
} catch (error) {
console.error('Failed to fetch user:', error);
} finally {
setLoading(false);
}
};
const handleSave = async (updatedData) => {
try {
const response = await fetch(`/api/users/${userId}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updatedData)
});
const savedUser = await response.json();
setUser(savedUser);
setEditing(false);
onUpdate?.(savedUser);
} catch (error) {
console.error('Failed to save user:', error);
}
};
if (loading) return <div>Loading...</div>;
if (!user) return <div>User not found</div>;
return (
<div className="user-profile">
<div className="profile-header">
<img src={user.avatar} alt={user.name} />
<h2>{user.name}</h2>
<p>{user.email}</p>
</div>
{editing ? (
<EditForm user={user} onSave={handleSave} />
) : (
<ProfileView user={user} onEdit={() => setEditing(true)} />
)}
</div>
);
};
export default UserProfile;// SCN Representation (52 tokens - 98% reduction!)
UserProfile.jsx◮
⤵React{useState,useEffect}
⤵./UserProfile.css
⚡UserProfile({userId,onUpdate})→JSX
◦user,loading,editing
⚡fetchUser(id)→Promise
⚡handleSave(updatedData)→Promise
⤴UserProfileSee how SCN compares to other code representation methods
| Feature | Raw Source Code | AST | CST | SCN |
|---|---|---|---|---|
| Token Efficiency | ❌ Very Low | ⚠️ Low | ⚠️ Low | ✅ Extremely High |
| Human Readable | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
| Language Agnostic | ❌ No | ⚠️ Partial | ⚠️ Partial | ✅ Yes |
| Structural Context | ✅ Full | ✅ Full | ✅ Full | ✅ Optimized |
| API Surface | ⚠️ Mixed | ⚠️ Implicit | ⚠️ Implicit | ✅ Explicit |
| LLM Optimized | ❌ No | ❌ No | ❌ No | ✅ Purpose Built |
| File Relationships | ❌ Scattered | ❌ Missing | ❌ Missing | ✅ Explicit |
Join the revolution in AI-assisted development. Start using SCN today and give your LLMs the context they deserve.
npm install @scn-lang/parser scn-parse ./src --output codebase.scn Include the .scn file in your prompts Complete specification and examples
Join discussions and contribute
Parsers, generators, and integrations