<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Klas</title>
    <description>The latest articles on DEV Community by Daniel Klas (@dkfuh).</description>
    <link>https://dev.to/dkfuh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3850921%2F119da5d9-552f-4e6b-ba19-24a645db6104.jpeg</url>
      <title>DEV Community: Daniel Klas</title>
      <link>https://dev.to/dkfuh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dkfuh"/>
    <language>en</language>
    <item>
      <title>Why I Built a Description Language for Business Logic</title>
      <dc:creator>Daniel Klas</dc:creator>
      <pubDate>Mon, 30 Mar 2026 07:58:17 +0000</pubDate>
      <link>https://dev.to/dkfuh/why-i-built-a-description-language-for-business-logic-3g43</link>
      <guid>https://dev.to/dkfuh/why-i-built-a-description-language-for-business-logic-3g43</guid>
      <description>&lt;h1&gt;
  
  
  Why I Built a Description Language for Business Logic
&lt;/h1&gt;

&lt;p&gt;Most companies don't fail because of bad strategy.&lt;/p&gt;

&lt;p&gt;They fail because their operational logic is invisible.&lt;/p&gt;

&lt;p&gt;It lives in Slack threads, onboarding notes, CRM fields, spreadsheets, automation tools — and in the heads of people who eventually leave. Nobody planned it that way. It just happened, one workaround at a time.&lt;/p&gt;

&lt;p&gt;I'm a master carpenter and kitchen studio owner in Germany. I'm also — apparently — someone who builds programming language tooling in his spare time.&lt;/p&gt;

&lt;p&gt;This is the story of why I built OrgScript.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem I kept running into
&lt;/h2&gt;

&lt;p&gt;Running a small business means your processes are everywhere and nowhere at the same time.&lt;/p&gt;

&lt;p&gt;A lead comes in. Someone knows what to do with it. But that knowledge isn't written down anywhere reliable. It's in the last WhatsApp message someone sent, or in the mental model of the person who's been doing it for three years.&lt;/p&gt;

&lt;p&gt;When I started automating things — CRM workflows, lead qualification, order processing — I kept hitting the same wall: I couldn't describe &lt;em&gt;what the business actually does&lt;/em&gt; in a way that was precise enough for software but still readable by a non-developer.&lt;/p&gt;

&lt;p&gt;BPMN is too heavy. You need specialized tools just to open the file.&lt;/p&gt;

&lt;p&gt;YAML and JSON are machine-readable but unpleasant to write and impossible to hand to a business owner.&lt;/p&gt;

&lt;p&gt;Natural language documents are readable but too vague for anything automated. &lt;/p&gt;

&lt;p&gt;And AI? It's great at pattern matching, but if you ask it to interpret a process that lives in four different documents and three people's heads, it guesses. Often wrong.&lt;/p&gt;

&lt;p&gt;I wanted something that sat between natural language and executable code. Something you could put in Git, review in a pull request, run a linter on — and still hand to someone without a software background.&lt;/p&gt;

&lt;p&gt;So I built it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What OrgScript looks like
&lt;/h2&gt;

&lt;p&gt;Here's the lead qualification process from my own kitchen business, written in OrgScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;process CraftBusinessLeadToOrder

  when lead.created

  if lead.source = "referral" then
    assign lead.priority = "high"
    assign lead.sales_path = "premium"
    notify sales with "Handle referral lead first"

  else if lead.source = "aroundhome" then
    assign lead.priority = "low"
    assign lead.sales_path = "standard"

  if lead.project_type != "kitchen" and lead.project_type != "interior" then
    transition lead.status to "disqualified"
    notify sales with "Outside target project type"
    stop

  if lead.estimated_value &amp;lt; 10000 then
    transition lead.status to "disqualified"
    notify sales with "Below minimum project value"
    stop

  transition lead.status to "qualified"
  assign lead.owner = "sales"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A non-programmer can read this. A parser can interpret it deterministically. An AI can analyze it without guessing at intent.&lt;/p&gt;

&lt;p&gt;That's the goal.&lt;/p&gt;




&lt;h2&gt;
  
  
  The core principle
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Describe work. Don't implement software.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OrgScript is not a programming language. There are no loops, no functions, no arbitrary expressions. It's a description language for operational logic — specifically for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;process&lt;/code&gt; — step-by-step workflows with triggers, decisions, and actions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;stateflow&lt;/code&gt; — legal states and allowed transitions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rule&lt;/code&gt; — constraints that must always hold&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;role&lt;/code&gt; — permission boundaries&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;policy&lt;/code&gt; — time-based or context-based behavior&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;event&lt;/code&gt; — named triggers with reactions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;metric&lt;/code&gt; — tracked business measures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The syntax is intentionally non-Turing-complete. If you find yourself wanting to add a loop, that's a signal the logic belongs in implementation code, not in OrgScript.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the tooling does
&lt;/h2&gt;

&lt;p&gt;OrgScript ships with a CLI that covers the full lifecycle of a &lt;code&gt;.orgs&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Validate structure and semantics&lt;/span&gt;
orgscript validate ./examples/lead-qualification.orgs

&lt;span class="c"&gt;# Lint for common authoring mistakes&lt;/span&gt;
orgscript lint ./examples/lead-qualification.orgs

&lt;span class="c"&gt;# Check validate + lint + format in one pass&lt;/span&gt;
orgscript check ./examples/lead-qualification.orgs

&lt;span class="c"&gt;# Export to Mermaid diagram&lt;/span&gt;
orgscript &lt;span class="nb"&gt;export &lt;/span&gt;mermaid ./examples/lead-qualification.orgs

&lt;span class="c"&gt;# Export to Markdown summary&lt;/span&gt;
orgscript &lt;span class="nb"&gt;export &lt;/span&gt;markdown ./examples/lead-qualification.orgs

&lt;span class="c"&gt;# Export structured JSON for AI/tooling consumption&lt;/span&gt;
orgscript &lt;span class="nb"&gt;export &lt;/span&gt;context ./examples/lead-qualification.orgs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;export context&lt;/code&gt; command is particularly useful for AI pipelines — it produces a structured JSON payload that includes the canonical model, annotation metadata, and explicit flags like &lt;code&gt;commentsIncluded: false&lt;/code&gt; so downstream consumers know exactly what they're working with.&lt;/p&gt;




&lt;h2&gt;
  
  
  Comments and annotations
&lt;/h2&gt;

&lt;p&gt;OrgScript supports two documentation layers that stay cleanly separated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# This is a human-only comment. It never appears in exports or AI context.
@owner "sales_ops"
@status "active"
process LeadQualification

  when lead.created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;#&lt;/code&gt; comments are for people. They're excluded from every machine-facing output by design.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@key "value"&lt;/code&gt; annotations are allowlisted structured metadata. They appear in &lt;code&gt;export context&lt;/code&gt; output and can optionally be rendered in Markdown and HTML exports with &lt;code&gt;--with-annotations&lt;/code&gt;. The current allowlist is &lt;code&gt;@note&lt;/code&gt;, &lt;code&gt;@owner&lt;/code&gt;, &lt;code&gt;@todo&lt;/code&gt;, &lt;code&gt;@source&lt;/code&gt;, &lt;code&gt;@status&lt;/code&gt;, and &lt;code&gt;@review&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This separation is deliberate: AI systems should never have to decide whether a comment is authoritative business logic or a developer note. In OrgScript, comments are never authoritative.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where it stands
&lt;/h2&gt;

&lt;p&gt;OrgScript v0.9.x is the first distribution-ready state. The toolchain includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lexer, parser, AST&lt;/li&gt;
&lt;li&gt;Semantic validation&lt;/li&gt;
&lt;li&gt;Linter with configurable rules&lt;/li&gt;
&lt;li&gt;Formatter (idempotent, canonical)&lt;/li&gt;
&lt;li&gt;CLI with JSON output and exit codes&lt;/li&gt;
&lt;li&gt;Exports: JSON, Markdown, Mermaid, HTML, AI context&lt;/li&gt;
&lt;li&gt;CI via GitHub Actions&lt;/li&gt;
&lt;li&gt;VS Code extension with syntax highlighting and snippets&lt;/li&gt;
&lt;li&gt;Available on npm as &lt;code&gt;@dkfuh/orgscript&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @dkfuh/orgscript
orgscript check ./your-process.orgs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What I'm trying to figure out
&lt;/h2&gt;

&lt;p&gt;OrgScript exists to answer one question:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How do you describe how an organization actually works — in a way that humans and machines understand the same thing?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I think this matters more as AI becomes part of operational workflows. If the business logic that AI is supposed to act on lives in scattered documents and people's heads, the AI will guess. Sometimes correctly. Often not.&lt;/p&gt;

&lt;p&gt;A shared, text-first, version-controlled description layer changes that.&lt;/p&gt;

&lt;p&gt;I'm curious whether this resonates with others who've hit the same wall — in operations, in automation, in AI integration, or just in trying to document how a business actually works.&lt;/p&gt;

&lt;p&gt;The repo is at &lt;a href="https://github.com/DKFuH/OrgScript" rel="noopener noreferrer"&gt;github.com/DKFuH/OrgScript&lt;/a&gt;. Feedback welcome, especially on the language design and real-world use cases I haven't thought of.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;OrgScript is open source under Apache-2.0.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>programming</category>
      <category>businesslogic</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
