DEV Community

Cover image for Dennis 0.8.7 — When Artifacts Learn to Explain Themselves
crevilla2050
crevilla2050

Posted on

Dennis 0.8.7 — When Artifacts Learn to Explain Themselves

In previous articles, I introduced Dennis as a deterministic codemod engine and the DEX format as a way to package transformations into reproducible artifacts.

We talked about:

  • Deterministic execution
  • Stable diffs
  • Lineage and verification
  • Treating transformations as first-class objects

But something was still missing.


The Missing Piece: Intent

Up to now, a DEX artifact could tell you:

  • what changed
  • how it changed
  • where it came from

But not:

why it was created in the first place

That “why” lived outside the system—in shell history, in someone’s head, or lost entirely.

Dennis 0.8.7 changes that.


Introducing Intent-Aware Artifacts

Dennis artifacts now embed intent directly inside the artifact itself.

Not as comments. Not as logs.

As structured, inspectable data.


From Commands to Intent

Let’s start from a simple example using the demo repo:

👉 https://github.com/crevilla2050/hello-dennis


Step 1 — Generate a spec (intent)

dennis plan . --interactive
Enter fullscreen mode Exit fullscreen mode

You’ll be prompted:

Inject helper? (y/N): y
Helper file path: helper.py
Target file: hello.py
Insert at line (default 1): 12
Use git mode? (Y/n): y
Enter fullscreen mode Exit fullscreen mode

This produces:

{
  "version": 1,
  "mode": "project",
  "root": ".",
  "helpers": [
    {
      "file": "/path/to/helper.py",
      "target": "/path/to/hello.py",
      "line": 12
    }
  ],
  "options": {
    "use_git": true
  },
  "created_at": "2026-05-21T11-15-22Z",
  "filename": "spec-2026-05-21T11-15-22.json"
}
Enter fullscreen mode Exit fullscreen mode

This file is your intent.


Step 2 — Generate a plan from intent

dennis plan spec-2026-05-21T11-15-22.json
Enter fullscreen mode Exit fullscreen mode

Or equivalently:

dennis plan . \
  --add-helper helper.py \
  --target-file hello.py \
  --line 12 \
  --use-git
Enter fullscreen mode Exit fullscreen mode

Both produce the same deterministic plan.


Step 3 — Pack into a DEX artifact

dennis pack dennis-plan.json artifact.dex
Enter fullscreen mode Exit fullscreen mode

Now something new happens.

The artifact contains:

payload/plan.json   → execution
meta/spec.json      → intent
manifest.json       → identity + lineage
Enter fullscreen mode Exit fullscreen mode

Inspecting an Artifact (Now with Intent)

dennis inspect artifact.dex
Enter fullscreen mode Exit fullscreen mode

Output:

Intent
------
Mode:        project
Root:        .
Options:     {'use_git': True}

Helpers:
  - /path/helper.py → /path/hello.py:12

Created at:  2026-05-21T11-15-22Z

Artifact
--------
Hash:        a89498b4...
...
Enter fullscreen mode Exit fullscreen mode

This is the key shift:

The artifact explains itself.


Determinism Still Holds

Here’s the important part.

Even though we embedded intent:

  • Running the same transformation twice
  • With different timestamps
  • Produces identical payload hashes
{
  "payload_equal": true,
  "added": 0,
  "removed": 0,
  "modified": 0
}
Enter fullscreen mode Exit fullscreen mode

Why?

Because Dennis separates:

  • Intent (spec.json) → human, mutable
  • Execution (plan.json) → deterministic
  • Identity (payload hash) → canonical

A New Mental Model

Dennis artifacts now operate on four layers:

Intent   → why
Plan     → what
Payload  → identity
Lineage  → where from
Enter fullscreen mode Exit fullscreen mode

Why This Matters

Most tools give you:

diff → what changed
Enter fullscreen mode Exit fullscreen mode

Dennis gives you:

intent → plan → proof
Enter fullscreen mode Exit fullscreen mode

This is the difference between:

  • a patch
  • and a reproducible transformation

What This Unlocks

With intent embedded:

  • Artifacts become self-documenting
  • Transformations become auditable
  • Reproducibility includes reasoning, not just execution

And more importantly:

You no longer need external context to understand a change.


Closing Thoughts

Dennis 0.8.7 is not a feature release.

It’s a shift in perspective.

Artifacts are no longer just bundles of changes.

They are:

executable, inspectable, self-describing transformations


If you want to try it yourself:
👉 https://github.com/crevilla2050/string-audit
clone, install and ...

The source files to play safely at home:
👉 https://github.com/crevilla2050/hello-dennis


More to come.

Top comments (0)