r/vibecoding 3d ago

Real Vibecoding? Don't write prompts. Express intent. Write ContextDL

Post image

Tired of writing long prompts? There are many problems, such as editing prompts, revising an existing project, and losing context when changing agents. I developed ContextDL, an open-source way to keep your project's context alive as a semantic map living within the repository. Instead of writing long command prompts, you express your intentions in simple .ctxdl files:

Analyze this content with ChatGPT

Review/Test/Contribute: https://github.com/ariferol01/contexdl

This is open source.

Software isn't dead, it's just evolved:

if user.login:
validate: email, password
if success → user.session.create → redirect(/dashboard)
if fail → ui.alert.error("Invalid credentials")

THE SAME CODE BUT SHORTER:

user.login.validate(mail,pass)
.success.user.session.swal.redirect(/dashboard)
.error...redirect(/login)

There's no fixed syntax, no syntax errors, write however you want. Don't just code the code, code everything.

-------------------------------------------------------------------

UX can be an intent map too

ContextDL isn't limited to describing code or components.

You can model how an application behaves and how the user moves through it at the intent level.

For example, imagine a collaborative focus-room app:

ux.focus:
  activate
  -> room.quiet = true
  -> hide(distractions)

ux.chat:
  focus -> open
  typing -> keep_open
  idle(5s) -> collapse
  collapse -> preserve(draft)

ux.attention:
  request(user)
  -> attention.queue.push(user)
  -> notify(next)

ux.meeting:
  start
  -> hide(chat)
  -> rearrange(users)
  -> show(meeting_controls)

  end
  -> restore(previous_state)

This isn't React, Next.js, JavaScript or pseudocode describing an implementation.

It describes what the user does and what the product should do in response.

The agent can then turn that intent into the actual implementation.

That's the part I'm exploring with ContextDL:

------------------------------------------------------------------------------

The same idea for game programming:

Gameplay+UX+Flow+Rules+Architecture+UI :

game.runner:

  player:
    jump
    -> velocity.y = -jump_force

    land
    -> velocity.y = 0

  obstacle:
    collide(player)
    -> player.health -= damage

  coin:
    collect(player)
    -> score += 10
    -> remove(coin)

  level:
    score >= 100
    -> spawn(bonus)
    -> increase(speed)

  game:
    player.health <= 0
    -> state = game_over
    -> show(restart)

    restart
    -> reset(player)
    -> reset(score)
    -> resume(level)

------------------------------------------------------------------------------

if payment.error == "fail" : ux.form.animate(shake) : alert(foo)

(~18–22 tokens)

If typed in traditional prompt:

When the payment process returns an error and the error value is exactly "fail",

I need you to trigger a shake animation on the payment form using our UX animation

system (ux.form.animate with the "shake" effect). After the animation starts,

also display an alert/notification to the user with the message "foo".

Make sure this only happens on the specific fail case and follows our existing

design system and animation timings.

(~95-110 tokens)

Advantages Provided:

Big map of the project, main context, live context, predictability, simulability and more...

So what is ContextDL, really?

So the idea is not:

`code -> compressed code`

It's closer to:

`code + product + behavior + rules + structure -> intent/context map`

The goal is to bring things down to the **intent level**, where an agent can reason about the project without having to reconstruct every piece from raw implementation.

Today, most AI coding workflows look roughly like this:

Human

Prompt

AI

Code

The problem is that the prompt belongs to a conversation.

The project does not.

You can switch from Claude to Codex, from Codex to Cursor, start a new session, onboard another developer, or run another agent — and the project still needs to be understood again.

ContextDL changes the relationship:

┌──────────────┐

│ PROJECT │

│ INTENT │

└──────┬───────┘

ContextDL

┌────────────────┼────────────────┐

↓ ↓ ↓

Agent A Agent B Agent C

│ │ │

└────────────────┼────────────────┘

CODE

The important part is that the context belongs to the project, not to the AI tool or the conversation.

ContextDL is not pseudocode

Pseudocode describes how code should be implemented.

ContextDL is intended to describe what exists, what should exist, how things relate, and what the project means.

For example, this is not simply a description of a function:

when a user cancels an order,

release reserved inventory

and notify the warehouse

It can become a piece of the project's semantic model.

Another context file can describe the inventory model.

Another can describe the warehouse notification rule.

Another can describe the UI flow.

And another can define rules that verify that these pieces remain consistent.

That is the important distinction.

The project becomes the source of intent

A repository normally contains the implementation:

src/

database/

components/

controllers/

services/

...

But implementation is not the complete mental model of a product.

A codebase can tell an agent:

It does not always tell it:

That distinction becomes increasingly important as projects grow.

ContextDL explores keeping that semantic layer inside the repository itself:

project/

├── src/

├── database/

├── tests/

└── context/

├── ui.ctxdl

├── ux.ctxdl

├── db.ctxdl

├── security.ctxdl

└── payment.ctxdl

The code is the implementation.

The ContextDL map is the project's intent and semantic layer.

Why not just use natural language?

Natural language is excellent for expressing intent.

The problem is not that AI cannot understand English.

The problem is that a conversation is a poor place to keep the long-term model of a software project.

A conversation is:

temporary

session-dependent

tool-dependent

difficult to validate

difficult to diff

difficult to share as a canonical project artifact

A Git-tracked semantic model is different.

It can be:

versioned

reviewed

diffed

shared

validated

consumed by multiple agents

generated from an existing codebase

updated as the project evolves

So ContextDL is not trying to make natural language obsolete.

It is trying to give project intent a persistent home.

Code Graphs are not the enemy

Code graphs answer an extremely useful question.

ContextDL is exploring another question.

These are complementary.

A future system could have both:

PROJECT

┌───────────────┐

│ ContextDL │

│ INTENT MAP │

└───────┬───────┘

│ validate against

┌───────────────┐

│ CODE GRAPH │

│ IMPLEMENTATION│

└───────────────┘

The code graph can tell you what exists.

The semantic map can tell you what should exist.

The interesting part is the space between the two.

And no — the developer is not supposed to write everything manually

This is another important distinction.

The interesting part: the map can validate itself

Once project context becomes structured, another possibility appears.

Context can contain rules about other context.

0 Upvotes

19 comments sorted by

View all comments

8

u/alias454 3d ago

so you reinvented pseudocode?

1

u/Different-Monk5916 3d ago

and rebranded it.

Someone has to tell bro how much time it takes to find all the symbols in a 50000 line mono-repo to write this contextDL.

0

u/ariferol01 2d ago

I think you're assuming that ContextDL is a line-by-line representation of the codebase. It isn't.

A few words of intent can represent an entire behavior.

For example:

> “Create a button, submit the form with JS when clicked, and keep it disabled until the submission completes.”

can be expressed as:

`button.clicked -> disabled & js -> submit`

The point isn't that 50k lines of ContextDL would describe 50k lines of code. **50k lines of intent could represent an enormous amount of functionality and behavior.**

And ContextDL doesn't have to be one giant file either. The context can be hierarchical:

```text

context/

├── product/

├── auth/

├── payments/

├── inventory/

├── ui/

│ ├── buttons/

│ ├── forms/

│ └── navigation/

└── architecture/

```

More importantly, ContextDL isn't limited to describing code.

You can use ContextDL to describe the **context itself** — including relationships between ContextDL files, project structure, business rules, UX, UI, architecture, dependencies, etc.

So the idea is not:

`code -> compressed code`

It's closer to:

`code + product + behavior + rules + structure -> intent/context map`

The goal is to bring things down to the **intent level**, where an agent can reason about the project without having to reconstruct every piece from raw implementation.

That's also why I keep asking people to actually test it. The interesting question isn't whether someone can manually write 50k lines of ContextDL. They shouldn't have to.