◮ SCN

◮ SCN

Symbolic Context Notation

A hyper-efficient, language-agnostic format for representing software codebase structure. Give LLMs unparalleled context at a fraction of the token cost.

90%+
Token Reduction
Language Support
v1.0
Stable Spec
// 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
  ⤴User
Token Count:1,247

Why SCN?

Bridging the "Context Chasm" between massive codebases and LLM token limits

Hyper Token Efficiency

Achieve 90%+ token reduction while preserving all structural context. Perfect for LLM consumption.

Language Agnostic

Works with any programming language, framework, or paradigm. One notation to rule them all.

Structural Clarity

Captures APIs, relationships, and architecture patterns that matter most for understanding code.

AI-First Design

Designed specifically for LLM consumption with optimal information density and parsing efficiency.

Developer Friendly

Human-readable symbols with intuitive meaning. Easy to learn, write, and understand.

Ecosystem Ready

Built for tooling integration with parsers, generators, and IDE extensions coming soon.

See SCN in Action

Real-world examples showing the power of symbolic context notation across different programming paradigms

React Component

A typical React component with hooks and props

Before: Raw Code

// 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;

After: SCN

// 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
  ⤴UserProfile
Token reduction: 97%+
Structural context: Preserved

Master Symbol Legend

File & Structure

File separator
Export/public
Import/dependency

Entities

Class/Type
Function/Method
Interface/Protocol

Modifiers

Public
Private
Static

SCN vs Traditional Approaches

See 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

Token Usage Comparison

Raw Source Code
2,341 tokens
AST JSON
1,756 tokens
SCN
41 tokens
98.2% Reduction!
From 2,341 to 41 tokens

Context Preservation

API Surface ✅ 100%
Class Structure ✅ 100%
Dependencies ✅ 100%
Exports ✅ 100%
Type Information ✅ 100%
Perfect Fidelity
All structural context preserved

Ready to Transform Your Codebase?

Join the revolution in AI-assisted development. Start using SCN today and give your LLMs the context they deserve.

Quick Start

1
Install the SCN parser
npm install @scn-lang/parser
2
Generate SCN from your codebase
scn-parse ./src --output codebase.scn
3
Use with your favorite LLM
Include the .scn file in your prompts

Documentation

Complete specification and examples

Community

Join discussions and contribute

Tooling

Parsers, generators, and integrations