The Language Where Code, Data, and Logic Coexist
.jcross (pronounced "jay-cross") is a revolutionary programming language developed as part of the Verantyx project. Unlike traditional languages that separate code from data, .jcross unifies them into a single, coherent structure.
Think of it as JSON meets Python, meets a database โ but designed from the ground up for AI memory systems and symbolic reasoning.
In .jcross, your data IS your code, and your code IS your data. A .jcross file can be executed as a program, read as a database, or analyzed as a knowledge graph โ all at the same time.
Traditional AI systems face a fundamental problem:
This separation creates friction. When you want to reason about data, you need parsers. When you want to store code, you need serializers. When you want to combine them, you need complex architectures.
.jcross eliminates this friction by making code and data first-class citizens of the same syntax.
Every .jcross file is simultaneously:
Unlike binary formats or dense JSON, .jcross files are meant to be read, understood, and modified by humans. The syntax resembles natural language constructs.
.jcross is built around the 6-axis Cross Structure โ a spatial organization of data that mirrors how humans think about information: past/future, input/output, context/action.
.jcross files are directly interpreted. Changes take effect immediately. No build step. No transpilation. Just write and run.
Imagine a database that can execute functions, or a program that stores its own state inline. That's .jcross. It's Lisp's "code-as-data" principle, evolved for the AI era.
At the heart of .jcross is the Cross Structure โ a 6-dimensional spatial organization of information. Think of it as a coordinate system for knowledge.
| Axis | Direction | Meaning | Typical Use |
|---|---|---|---|
UP |
โ Upward | Input / Questions | User inputs, queries, requests |
DOWN |
โ Downward | Output / Answers | AI responses, results, solutions |
LEFT |
โ Past | Temporal / Historical | Timestamps, chronological data |
RIGHT |
โ Future | Actions / Plans | Tool calls, operations, side effects |
FRONT |
โฌ Current | Active Context | Ongoing conversations, current state |
BACK |
โฌ Archive | Metadata / History | Raw logs, metadata, backups |
Traditional databases organize data in tables (2D) or trees (hierarchical). The Cross Structure uses six orthogonal dimensions because human knowledge naturally spans multiple perspectives:
The 6-axis structure mirrors how your brain organizes memories: you recall what (UP/DOWN), when (LEFT/RIGHT), and context (FRONT/BACK) simultaneously. .jcross makes this natural cognitive structure programmable.
Every .jcross file starts with a CROSS declaration:
"""
My First .jcross Program
A simple example to demonstrate syntax
"""
CROSS my_program {
// Your code goes here
}
.jcross supports two comment styles:
// Single-line comment
/*
Multi-line comment
Useful for documentation
*/
Within a CROSS block, you define axes using the AXIS keyword:
CROSS example {
AXIS UP {
messages: []
count: 0
}
AXIS DOWN {
responses: []
}
}
| Keyword | Purpose | Example |
|---|---|---|
CROSS |
Defines a Cross Structure | CROSS my_data { ... } |
AXIS |
Defines one of the 6 axes | AXIS UP { ... } |
PATTERN |
Defines a pattern-matching rule | PATTERN detect(text) { ... } |
FUNCTION |
Defines a function | FUNCTION process(input) { ... } |
MATCH |
Pattern matching expression | MATCH value { ... } |
IF / ELSE |
Conditional branching | IF score > 0.5 { ... } |
RETURN |
Returns a value | RETURN result |
count: 42
score: 0.85
temperature: -5
name: "Verantyx"
message: 'Hello, World!'
multiline: """
This is a
multi-line string
"""
is_active: true
has_error: false
optional_value: null
numbers: [1, 2, 3, 4, 5]
names: ["Alice", "Bob", "Charlie"]
mixed: [42, "text", true, null]
user: {
name: "kofdai",
age: 22,
location: "Kyoto",
skills: ["AI", "Python", "AGI Research"]
}
conversation: {
id: "conv_001",
messages: [
{ role: "user", content: "Hello" },
{ role: "assistant", content: "Hi there!" }
],
metadata: {
created: "2026-03-12",
language: "en"
}
}
FUNCTION example() {
// Assign variables
x = 10
y = 20
result = x + y
// Reassign
x = x * 2
RETURN result
}
FUNCTION check_score(score) {
IF score >= 0.8 {
RETURN "excellent"
}
ELSE IF score >= 0.5 {
RETURN "good"
}
ELSE {
RETURN "needs improvement"
}
}
One of .jcross's most powerful features is pattern matching with MATCH:
PATTERN classify_text(text) {
MATCH text {
CONTAINS ["error", "fail"] -> "error_report"
CONTAINS ["success", "complete"] -> "success_message"
STARTS_WITH "Question:" -> "user_query"
DEFAULT -> "unknown"
}
}
.jcross uses functional iteration instead of traditional loops:
FUNCTION process_all(items) {
// Process each item
results = items.MAP(item -> process_item(item))
// Filter results
valid = results.FILTER(r -> r.score > 0.5)
// Reduce to summary
total = valid.REDUCE((acc, r) -> acc + r.value, 0)
RETURN total
}
| Operator | Description | Example |
|---|---|---|
CONTAINS |
Check if text contains keywords | CONTAINS ["AI", "AGI"] |
REGEX_MATCH |
Regular expression matching | REGEX_MATCH(r"\\d+") |
ANY_IN |
Check if any element matches | ANY_IN(text, keywords) |
SPLIT |
Split string by delimiter | SPLIT(text, ",") |
JOIN |
Join array elements | JOIN(parts, " ") |
LENGTH |
Get length of collection | LENGTH(array) |
APPEND |
Add to array | array.APPEND(item) |
FUNCTION calculate_score(text, structure_type) {
pieces = detect_pieces(text, structure_type)
score = LENGTH(pieces) / REQUIRED_PIECES
RETURN score
}
FUNCTION โ Procedural logic with explicit returns
PATTERN โ Declarative matching with implicit returns
// FUNCTION: Explicit procedural logic
FUNCTION process_data(input) {
step1 = transform(input)
step2 = validate(step1)
RETURN step2
}
// PATTERN: Declarative matching
PATTERN detect_type(text) {
MATCH text {
CONTAINS ["error"] -> "error"
CONTAINS ["info"] -> "info"
DEFAULT -> "unknown"
}
}
FUNCTION main() {
result = calculate_score("sample text", "definition")
classification = detect_type("error occurred")
RETURN {
score: result,
type: classification
}
}
Functions can directly access axis data:
CROSS memory {
AXIS UP {
messages: []
}
FUNCTION add_message(msg) {
UP.messages.APPEND(msg)
RETURN LENGTH(UP.messages)
}
FUNCTION get_latest() {
IF LENGTH(UP.messages) > 0 {
RETURN UP.messages[-1]
}
RETURN null
}
}
Break down complex logic into smaller, reusable helper functions:
FUNCTION calculate_score(pieces) {
score = 0
// Call helper functions
score = score + check_required_pieces(pieces)
score = score + check_optional_pieces(pieces)
RETURN score / 100.0
}
FUNCTION check_required_pieces(pieces) {
points = 0
required = ["subject", "explanation"]
FOR piece IN required {
IF piece IN pieces {
points = points + 40
}
}
RETURN points
}
FUNCTION check_optional_pieces(pieces) {
points = 0
optional = ["examples", "details"]
FOR piece IN optional {
IF piece IN pieces {
points = points + 10
}
}
RETURN points
}
.jcross supports recursion for algorithms like factorial, fibonacci, and tree traversal:
FUNCTION factorial(n) {
IF n <= 1 {
RETURN 1
}
RETURN n * factorial(n - 1)
}
FUNCTION fibonacci(n) {
IF n <= 1 {
RETURN n
}
RETURN fibonacci(n - 1) + fibonacci(n - 2)
}
One of .jcross's revolutionary features: the file itself is the database. No need for separate .json or .db files.
"""
User Preferences Storage
Automatically persists changes
"""
CROSS user_prefs {
AXIS UP {
username: "kofdai"
theme: "dark"
language: "en"
}
AXIS LEFT {
created: "2026-03-12"
last_modified: null
}
FUNCTION update_theme(new_theme) {
UP.theme = new_theme
LEFT.last_modified = NOW()
// Auto-save to this file
SAVE_TO_FILE(SELF.file_path)
RETURN UP.theme
}
}
When you call update_theme("light"), the .jcross file rewrites itself
with the updated data. The next time you load it, the changes persist.
CROSS conversation_memory {
AXIS UP {
user_inputs: []
total_messages: 0
}
AXIS DOWN {
ai_responses: []
}
AXIS LEFT {
timestamps: []
}
FUNCTION log_exchange(user_input, ai_response) {
timestamp = NOW()
// Store in axes
UP.user_inputs.APPEND(user_input)
UP.total_messages = UP.total_messages + 1
DOWN.ai_responses.APPEND(ai_response)
LEFT.timestamps.APPEND(timestamp)
// Auto-persist
SAVE_TO_FILE(SELF.file_path)
RETURN {
total: UP.total_messages,
latest: user_input
}
}
}
Traditional apps: Code (app.py) + Data (db.json)
.jcross apps: Code + Data (app.jcross)
One file. One source of truth. Code and data evolve together.
"""
Response Completion Detector
Detects when a text response is complete using puzzle reasoning
"""
CROSS response_detector {
AXIS structure_patterns {
UP: definition {
required: [subject, is_statement, explanation]
optional: [examples, technical_details]
}
DOWN: explanation {
required: [introduction, main_points]
optional: [conclusion]
}
}
PATTERN detect_structure_type(text) {
MATCH text {
CONTAINS ["ใจใฏ", "ใซใฏ", "ใฏใ"] -> "definition"
CONTAINS ["ๆฏ่ผ", "compared to"] -> "comparison"
DEFAULT -> "explanation"
}
}
FUNCTION is_complete(text) {
// Detect structure type
struct_type = detect_structure_type(text)
// Calculate completion score
pieces = detect_pieces(text, struct_type)
pattern = structure_patterns[struct_type]
required = SET(pattern.required)
score = LENGTH(pieces & required) / LENGTH(required)
// Complete if score >= 80%
IF score >= 0.8 {
RETURN true
}
RETURN false
}
}
"""
Todo List Manager
Organizes tasks using 6-axis Cross structure
"""
CROSS todo_manager {
// UP: Tasks to do
AXIS UP {
pending_tasks: []
total_added: 0
}
// DOWN: Completed tasks
AXIS DOWN {
completed_tasks: []
total_completed: 0
}
// LEFT: Time tracking
AXIS LEFT {
task_created_times: {}
task_completed_times: {}
}
// RIGHT: Actions taken
AXIS RIGHT {
action_log: []
}
// FRONT: Current focus
AXIS FRONT {
active_task: null
current_priority: "medium"
}
// BACK: Metadata
AXIS BACK {
user_id: ""
settings: {
auto_save: true,
remind: false
}
}
FUNCTION add_task(description, priority) {
task_id = UP.total_added + 1
timestamp = NOW()
task = {
id: task_id,
description: description,
priority: priority,
created: timestamp
}
// Store in UP axis
UP.pending_tasks.APPEND(task)
UP.total_added = UP.total_added + 1
// Track creation time
LEFT.task_created_times[task_id] = timestamp
// Log action
RIGHT.action_log.APPEND({
action: "add_task",
task_id: task_id,
timestamp: timestamp
})
SELF.save()
RETURN task_id
}
FUNCTION complete_task(task_id) {
// Find task in pending
FOR i, task IN UP.pending_tasks {
IF task.id == task_id {
// Move to completed
timestamp = NOW()
task.completed = timestamp
DOWN.completed_tasks.APPEND(task)
DOWN.total_completed = DOWN.total_completed + 1
UP.pending_tasks.REMOVE(i)
// Track completion time
LEFT.task_completed_times[task_id] = timestamp
// Log action
RIGHT.action_log.APPEND({
action: "complete_task",
task_id: task_id,
timestamp: timestamp
})
SELF.save()
RETURN true
}
}
RETURN false
}
FUNCTION get_pending_by_priority(priority) {
filtered = []
FOR task IN UP.pending_tasks {
IF task.priority == priority {
filtered.APPEND(task)
}
}
RETURN filtered
}
FUNCTION get_statistics() {
total_time = 0
count = 0
FOR task_id, completed_time IN LEFT.task_completed_times {
IF task_id IN LEFT.task_created_times {
created_time = LEFT.task_created_times[task_id]
duration = completed_time - created_time
total_time = total_time + duration
count = count + 1
}
}
average_time = 0
IF count > 0 {
average_time = total_time / count
}
RETURN {
total_added: UP.total_added,
total_completed: DOWN.total_completed,
pending: LENGTH(UP.pending_tasks),
average_completion_time: average_time
}
}
}
"""
Learning Progress Tracker
Tracks concept mastery using Cross structure
"""
CROSS learning_system {
// UP: Concepts to learn
AXIS UP {
concepts_to_learn: [
"variables", "functions", "loops",
"classes", "async", "patterns"
]
total_concepts: 6
}
// DOWN: Mastered concepts
AXIS DOWN {
mastered_concepts: []
mastery_scores: {}
}
// LEFT: Learning timeline
AXIS LEFT {
learning_sessions: []
time_spent: {}
}
// RIGHT: Practice exercises completed
AXIS RIGHT {
exercises_completed: []
exercises_passed: 0
exercises_failed: 0
}
// FRONT: Current learning state
AXIS FRONT {
current_concept: null
current_difficulty: "beginner"
focus_area: ""
}
// BACK: User profile
AXIS BACK {
user_id: ""
learning_style: "visual"
preferred_pace: "moderate"
}
FUNCTION start_learning(concept) {
timestamp = NOW()
FRONT.current_concept = concept
LEFT.learning_sessions.APPEND({
concept: concept,
started: timestamp,
status: "in_progress"
})
SELF.save()
RETURN true
}
FUNCTION complete_exercise(concept, passed) {
timestamp = NOW()
RIGHT.exercises_completed.APPEND({
concept: concept,
passed: passed,
timestamp: timestamp
})
IF passed {
RIGHT.exercises_passed = RIGHT.exercises_passed + 1
// Update mastery score
IF concept NOT IN DOWN.mastery_scores {
DOWN.mastery_scores[concept] = 0
}
DOWN.mastery_scores[concept] = DOWN.mastery_scores[concept] + 10
// Check if mastered (score >= 80)
IF DOWN.mastery_scores[concept] >= 80 {
IF concept NOT IN DOWN.mastered_concepts {
DOWN.mastered_concepts.APPEND(concept)
UP.concepts_to_learn.REMOVE(concept)
}
}
}
ELSE {
RIGHT.exercises_failed = RIGHT.exercises_failed + 1
}
SELF.save()
RETURN DOWN.mastery_scores[concept]
}
FUNCTION get_progress() {
total = UP.total_concepts
mastered = LENGTH(DOWN.mastered_concepts)
remaining = LENGTH(UP.concepts_to_learn)
progress_percent = (mastered / total) * 100
RETURN {
total_concepts: total,
mastered: mastered,
remaining: remaining,
progress_percent: progress_percent,
current_concept: FRONT.current_concept,
exercises_passed: RIGHT.exercises_passed,
exercises_failed: RIGHT.exercises_failed
}
}
FUNCTION recommend_next_concept() {
// Find concept with lowest mastery score
lowest_score = 100
recommended = null
FOR concept IN UP.concepts_to_learn {
score = 0
IF concept IN DOWN.mastery_scores {
score = DOWN.mastery_scores[concept]
}
IF score < lowest_score {
lowest_score = score
recommended = concept
}
}
RETURN {
concept: recommended,
current_score: lowest_score,
reason: "This concept needs the most practice"
}
}
}
Use clear, descriptive names for all Cross structures, axes, and functions:
CROSS cm { ... }
AXIS A { ui: [] }
FUNCTION log(t) { ... }
CROSS conversation_memory { ... }
AXIS UP { user_inputs: [] }
FUNCTION log_user_input(text) { ... }
Rule: Put data where it logically belongs.
CROSS chat_system {
AXIS UP {
user_messages: [] // Users provide input โ UP
}
AXIS DOWN {
ai_responses: [] // AI provides output โ DOWN
}
AXIS LEFT {
timestamps: [] // Time is historical โ LEFT
}
AXIS RIGHT {
actions_taken: [] // Actions are future-oriented โ RIGHT
}
}
CROSS chat_system {
AXIS UP {
timestamps: [] // Time is not "upward"
}
AXIS DOWN {
user_messages: [] // Users don't provide "downward" input
}
}
Distinguish between pure functions and functions with side effects:
FUNCTION calculate_score(pieces) {
score = 0
FOR piece IN pieces {
score = score + 10
}
RETURN score
}
// Clearly named side-effect function
FUNCTION save_score_to_down(score) {
DOWN.last_score = score
SELF.save()
RETURN true
}
FUNCTION calculate_score(pieces) {
score = 0
FOR piece IN pieces {
score = score + 10
}
// Surprise! This function also saves
DOWN.last_score = score
SELF.save()
RETURN score
}
Always handle errors explicitly and return meaningful error messages:
FUNCTION get_task(task_id) {
FOR task IN UP.pending_tasks {
IF task.id == task_id {
RETURN task
}
}
// Explicit error return
RETURN {
error: true,
message: "Task not found",
task_id: task_id
}
}
// Caller checks for errors
FUNCTION complete_task(task_id) {
task = get_task(task_id)
IF task.error {
RETURN task // Propagate error
}
// Process task...
}
Always include docstrings at the file level and for complex functions:
"""
Conversation Memory System
This .jcross file stores all conversation data and provides
functions to log inputs, responses, and query history.
Axes:
UP: User inputs
DOWN: AI responses
LEFT: Timestamps
RIGHT: Actions taken
FRONT: Current conversation thread
BACK: Session metadata
"""
CROSS conversation_memory {
AXIS UP {
user_inputs: []
}
/**
* Log a user input to the conversation history
*
* @param user_input: String - The user's message
* @return: Object with total_inputs and total_responses counts
*/
FUNCTION log_user_input(user_input) {
// Implementation...
}
}
Break complex logic into small, focused functions:
FUNCTION add_task(description) {
task = create_task_object(description)
store_task(task)
log_action("add_task", task.id)
RETURN task.id
}
FUNCTION create_task_object(description) {
RETURN {
id: UP.total_added + 1,
description: description,
created: NOW()
}
}
FUNCTION store_task(task) {
UP.pending_tasks.APPEND(task)
UP.total_added = UP.total_added + 1
}
FUNCTION add_task(description) {
// 50 lines of logic all in one function...
}
Use PATTERN instead of nested IF statements:
PATTERN classify(text) {
MATCH text {
CONTAINS ["error"] -> "error"
CONTAINS ["warning"] -> "warning"
DEFAULT -> "info"
}
}
Don't call SAVE_TO_FILE on every minor change. Batch updates
or save only on significant operations to avoid I/O overhead.
.jcross files can modify their own structure during runtime:
CROSS self_improving {
AXIS UP {
learning_data: []
}
AXIS DOWN {
learned_patterns: []
}
FUNCTION learn_pattern(data) {
// Analyze data
pattern = analyze(data)
// Store learned pattern
DOWN.learned_patterns.APPEND(pattern)
// Modify own behavior based on learning
IF LENGTH(DOWN.learned_patterns) > 10 {
SELF.add_function("detect_" + pattern.name, pattern.logic)
}
SELF.save()
RETURN pattern
}
}
Multiple .jcross files can interact and share data:
// File: user_profile.jcross
CROSS user_profile {
AXIS UP {
preferences: {
language: "en",
theme: "dark"
}
}
FUNCTION get_preference(key) {
RETURN UP.preferences[key]
}
}
// File: chat_system.jcross
CROSS chat_system {
AXIS BACK {
user_profile_path: "user_profile.jcross"
}
FUNCTION get_user_language() {
// Load other .jcross file
profile = LOAD_CROSS(BACK.user_profile_path)
language = profile.run("get_preference", key="language")
RETURN language
}
}
Create and use patterns dynamically at runtime:
CROSS dynamic_classifier {
AXIS DOWN {
learned_patterns: {}
}
FUNCTION add_pattern(name, keywords) {
// Dynamically create a new pattern
DOWN.learned_patterns[name] = keywords
SELF.save()
}
PATTERN classify_dynamic(text) {
// Use dynamically created patterns
FOR pattern_name, keywords IN DOWN.learned_patterns {
IF CONTAINS(text, keywords) {
RETURN pattern_name
}
}
DEFAULT -> "unknown"
}
}
Cross structures can contain other Cross structures, creating recursive hierarchies:
CROSS outer {
AXIS UP {
// Nested Cross structure
inner_system: CROSS {
AXIS UP {
data: []
}
FUNCTION process() {
RETURN "inner"
}
}
}
FUNCTION use_inner() {
result = UP.inner_system.process()
RETURN result
}
}
Generate .jcross code from .jcross code:
CROSS code_generator {
FUNCTION generate_todo_function(field_name) {
code = """
FUNCTION add_to_""" + field_name + """(item) {
UP.""" + field_name + """.APPEND(item)
SELF.save()
RETURN LENGTH(UP.""" + field_name + """)
}
"""
// Write new function to file
SELF.add_function_from_string(code)
SELF.save()
RETURN code
}
}
Detect patterns and behaviors based on temporal data:
CROSS time_aware {
AXIS LEFT {
event_timestamps: []
}
FUNCTION detect_pattern_over_time() {
now = NOW()
recent_events = []
// Get events from last hour
FOR timestamp IN LEFT.event_timestamps {
IF now - timestamp < 3600 {
recent_events.APPEND(timestamp)
}
}
// Detect frequency pattern
IF LENGTH(recent_events) > 10 {
RETURN "high_frequency"
}
ELSE IF LENGTH(recent_events) > 5 {
RETURN "medium_frequency"
}
ELSE {
RETURN "low_frequency"
}
}
}
Query across multiple axes simultaneously:
FUNCTION get_user_activity(user_id) {
// Query UP (inputs) and DOWN (responses) together
user_inputs = UP.messages.FILTER(m -> m.user_id == user_id)
related_responses = DOWN.responses.FILTER(r -> r.request_id IN user_inputs.MAP(i -> i.id))
// Join with LEFT (timestamps)
timeline = ZIP(user_inputs, related_responses, LEFT.timestamps)
RETURN timeline
}
Handle real-time data streams:
CROSS stream_processor {
AXIS FRONT {
buffer: []
processing: false
}
FUNCTION on_data_chunk(chunk) {
FRONT.buffer.APPEND(chunk)
// Process when buffer is full
IF LENGTH(FRONT.buffer) >= 100 {
process_batch(FRONT.buffer)
FRONT.buffer = []
}
}
FUNCTION process_batch(chunks) {
// Batch processing logic
results = chunks.MAP(c -> analyze(c))
DOWN.results.EXTEND(results)
SAVE_TO_FILE(SELF.file_path)
}
}
These advanced techniques unlock .jcross's full potential. Explore the Verantyx-CLI source code to see real-world implementations in production.