Ref-001: CADSL (Cognitive Artifact DSL) Language Specification

Type

Reference Documentation - Language Specification

Bounded Context

Cognitive Extension

Purpose

Defines the Cognitive Artifact Domain-Specific Language (CADSL), a declarative language for defining and constructing dynamic, interactive cognitive artifacts within SEA-Forge™. CADSL enables AI agents to generate and recommend artifacts in real-time to support knowledge work.


1. Introduction

The Cognitive Artifact DSL (CADSL) is a declarative language designed to be both human-readable and machine-interpretable. It provides a vocabulary of symbolic elements that can be combined to create cognitive artifacts ranging from simple checklists to complex interactive diagrams.

Design Goals

  1. AI-Generative: Artifacts can be dynamically created by AI agents based on conversational context
  2. Human-Editable: Users can modify artifacts through natural interactions
  3. Platform-Agnostic: Rendering is separate from definition (CADSL → Renderer)
  4. Semantically Rich: Elements carry meaning beyond visual presentation

2. Core Principles

2.1. Modularity and Composability

Artifacts are composed of a small set of fundamental, reusable elements. Complex artifacts emerge from simple combinations.

Example:

1
2
3
4
5
Section:
  children:
    - Heading
    - UnorderedList
    - Button

2.2. Declarative Syntax

The DSL defines what an artifact is, not how to render it. This separates the artifact’s structure and content from its visual presentation.

Benefit:


2.3. Dynamic and Interactive

Artifacts are not static. They can be:

State Management:


2.4. Context-Aware

The generation and content of artifacts are informed by:


3. MECE Element Taxonomy

The CADSL is composed of a MECE (Mutually Exclusive and Collectively Exhaustive) set of symbolic elements organized into 10 categories:

3.1. Content Elements

Textual Content:

Element Purpose Example Use
TextField Single-line text input Name, title, short answer
TextArea Multi-line text input Description, notes, long-form content
Label Descriptive text for elements Form field labels
Heading Main title or section heading Artifact title
Subheading Secondary title Section headers
Paragraph Block of text content Explanatory text, instructions

Visual Content:

Element Purpose Example Use
Image Picture or illustration Screenshots, diagrams, photos
Icon Symbolic representation Status icons, action indicators
Diagram Visual representation of concepts Flowcharts, UML diagrams
Chart Data visualization Bar charts, pie charts, graphs

3.2. Structural Elements

Containers:

Element Purpose Example Use
Section Divides content into parts Logical grouping of related elements
Panel Separate area within workspace Sidebar, info panel
Frame Isolated view or context Embedded content, iframe-like
Tab Navigable content area Multi-view artifacts
Canvas Area for creating/organizing Freeform workspace, whiteboard

Lists and Grids:

Element Purpose Example Use
OrderedList Sequenced items Steps, ranked priorities
UnorderedList Non-sequenced items Feature lists, bullet points
Table Structured data representation Data grids, comparison tables

3.3. Interactive Elements

Input Controls:

Element Purpose Example Use
Button Clickable action Submit, Save, Next
Checkbox Binary option Task completion, feature toggles
RadioButton Mutually exclusive selection Single-choice questions
Dropdown Selectable options from list Category selection, filters
Slider Adjustable value within range Priority levels, percentages
Toggle On/off state Enable/disable features
SelectionGroup Grouped selectable items Multi-select checkboxes

Interactive Regions:

Element Purpose Example Use
DragAndDropArea Region for moving items Kanban boards, prioritization
ClickableRegion Area responding to clicks Hotspots, image maps
ItemSelector Tool for choosing items Date picker, color picker

3.4. Relational Elements

Connectors:

Element Purpose Example Use
Line Indicates relationship or flow Connecting concepts
Arrow Indicates directionality Process flows, dependencies

Links:

Element Purpose Example Use
Hyperlink Reference to external/internal resource URLs, cross-references
Reference Citation or pointer to content Footnotes, bibliography

3.5. Organizational Elements

Hierarchy Indicators:

Element Purpose Example Use
Indentation Shows parent-child relationships Nested lists, tree structures
Nesting Elements within elements Hierarchical data

Grouping Mechanisms:

Element Purpose Example Use
Folder Organizes files or content File explorers, content organization
GroupBox Visually groups items Related controls, logical sections

3.6. Annotation Elements

Notes and Comments:

Element Purpose Example Use
StickyNote Small text note attached to content Reminders, quick thoughts
CommentBubble Annotation linked to specific part Feedback, discussions

Highlighting and Marking:

Element Purpose Example Use
Highlight Emphasizes text or areas Important sections
Underline Indicates importance or links Key terms
Flag Indicator for attention or action Follow-up items, urgent tasks

3.7. Temporal Elements

Time Indicators:

Element Purpose Example Use
Timeline Chronological representation of events Project milestones, history
Calendar Dates and scheduling Meeting planner, deadlines
Schedule Planned activities or tasks Daily agenda, sprints
ProgressBar Visualizes completion status Task progress, loading states

3.8. Feedback Elements

Status Indicators:

Element Purpose Example Use
Notification Alert for event or update System messages
Alert Urgent or important message Errors, warnings
Badge Counter or status symbol Unread counts, labels
ProgressIndicator Shows ongoing operation Spinners, loading animations

3.9. Semantic Elements

Tags and Metadata:

Element Purpose Example Use
Tag Descriptive label for searching/grouping Keywords, categories
CategoryLabel Defines content type Content classification
MetadataField Additional information about content Author, date, version
Legend Explanation for symbols or colors Chart legends, diagram keys

3.10. Collaboration Elements

User Indicators:

Element Purpose Example Use
Avatar Visual representation of user User profiles, authorship
PresenceIndicator Shows active participants Real-time collaboration status

Shared Components:

Element Purpose Example Use
SharedEditingArea Collaborative workspace Co-editing documents
UserComment Feedback from other users Discussions, reviews

4. CADSL Syntax

4.1. YAML Representation

CADSL artifacts are typically represented in YAML for human readability:

1
2
3
4
5
6
7
8
9
10
11
artifact: <artifact-type>
metadata:
  id: <unique-id>
  name: <human-readable-name>
  ownerId: <user-id>
  isReadOnly: <boolean>
canvas:
  - type: <ElementType>
    id: <optional-element-id>
    properties:
      <key>: <value>

4.2. JSON Representation

For machine processing and storage, CADSL uses JSON format (see SDS-001 for schemas):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "id": "artifact-123",
  "name": "Project Planner",
  "type": "ProjectPlanner",
  "canvas": [
    {
      "type": "Heading",
      "content": "My Project"
    },
    {
      "type": "Section",
      "children": []
    }
  ]
}

5. Example: Project Planner Artifact

5.1. CADSL Definition (YAML)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
artifact: project-planner
metadata:
  id: prj-001
  name: "Project Plan: Launch New Feature"
  ownerId: user-456
  isReadOnly: false

canvas:
  - type: Heading
    content: "Project Plan: Launch New Feature"

  - type: Section
    id: objectives
    children:
      - type: Subheading
        content: "Objectives"
      - type: UnorderedList
        items:
          - "Increase user engagement by 15%"
          - "Improve feature discovery"

  - type: Section
    id: tasks
    children:
      - type: Subheading
        content: "Tasks"
      - type: OrderedList
        items:
          - type: Checkbox
            id: task-1
            label: "Design new UI mockups"
            checked: false
          - type: Checkbox
            id: task-2
            label: "Develop backend API"
            checked: false
          - type: Checkbox
            id: task-3
            label: "Implement frontend components"
            checked: false

  - type: Section
    id: timeline
    children:
      - type: Subheading
        content: "Timeline"
      - type: Calendar
        events:
          - date: "2025-11-15"
            label: "Design complete"
          - date: "2025-12-01"
            label: "Development complete"

5.2. Rendered Output (Conceptual)

The CADSL Runtime & Renderer (TypeScript/Node.js service) would interpret this definition and generate:

Web UI (Remix):

PDF Export:

Voice Interface:


6. AI Agent Integration

6.1. Context-Aware Generation

AI agents analyze conversational context to generate appropriate artifacts:

Example Conversation:

1
2
3
4
5
6
7
8
User: "I need to plan the Q1 product launch"

AI Agent:
1. Extracts intent: Project planning
2. Queries Knowledge Graph for similar projects
3. Generates CADSL for ProjectPlanner artifact
4. Populates with context-aware defaults
5. Presents to user for refinement

6.2. Dynamic Modification

AI agents can modify artifacts in real-time:

1
2
3
4
5
6
7
User: "Add a task for user testing"

AI Agent:
1. Locates "tasks" section in CADSL
2. Inserts new Checkbox element
3. Updates artifact state
4. Triggers re-render

6.3. Recommendation Algorithm

The Recommendation Algorithm Service uses:

Output: Recommended artifact type + pre-populated content


7. Rendering Pipeline

7.1. CADSL → Frontend Components

1
2
3
4
5
6
7
8
9
CADSL Definition (YAML/JSON)
    ↓
CADSL Runtime Parser
    ↓
Abstract Artifact Model
    ↓
Remix Component Mapper
    ↓
React Components (Interactive UI)

7.2. Renderer Implementation

Technology Stack:

Key Services (from ARCH-001):


8. Extensibility

8.1. Custom Element Types

Teams can extend CADSL with domain-specific elements:

1
2
3
4
5
6
7
8
9
customElements:
  - type: KanbanBoard
    extends: Canvas
    properties:
      columns:
        - "To Do"
        - "In Progress"
        - "Done"
      cards: DragAndDropArea

8.2. Template Library

Pre-built artifact templates for common use cases:


9. Validation and Quality

9.1. Schema Validation

All CADSL definitions must validate against JSON Schemas (see SDS-001):


9.2. Semantic Validation

Beyond syntax, artifacts are validated for:


10. SEA-Forge™ Implementation Roadmap

Phase 1: Core Elements

Implement the 20 most-used elements:

Phase 2: Interactive Elements

Phase 3: Collaboration

Phase 4: Advanced Rendering



12. References


Status: This represents the CADSL language specification. Implementation in SEA-Forge™ should follow this design with adaptations for the 5-pillar architecture.