dectl — Persistent Memory for AI Coding Agents

Dev Environment Control

dectl is an open-source developer life OS that provides persistent memory via SQLite, executable YAML workflows, SDD spec generator, and structured project context for any AI coding environment — Claude, Gemini, ChatGPT, Ollama, or a human in terminal. No proprietary API, no telemetry, one 6.1MB binary.

dectl — quick start
$ dectl project init --standard
→ Detecting stack...
→ Found: Rust, TypeScript, Python
✓ Project initialized in .dec/
$ dectl memory add "Decision: use SQLite for local storage"
✓ Memory saved (id: 42)
$ curl -fsSL https://raw.githubusercontent.com/jhonesis/dectl/main/scripts/install.sh | bash
  • 106development rules
  • 36+commands
  • 7modules
  • 6.1MBsingle binary

Open any project. No explanations needed.

dectl captures your project's architecture, stack, decisions, and context in a structured .dec/ directory with config, isa, state, workflows, prompts, knowledge, and decisions. When you return months later, any AI model understands the project instantly — no explanations, no long setup, no lost context across sessions.

The anchor moment: Open a legacy project you haven't touched in months, run dectl project init --standard, and the model already understands the project's architecture. No explanations. No setup.

dectl terminal showing project init and memory commands executing in sequence

How does dectl work?

dectl has three actors: .dec/ provides structured project context, the dectl binary executes workflows and manages SQLite memory, and any AI model (Claude, Gemini, ChatGPT, Ollama) reads the context and generates code. They communicate through files and shell commands — no proprietary API required.

.dec/

Context

Structured project knowledge in Markdown + YAML + TOML + JSON. Readable by any model without installation.

dectl

Executor

Rust binary that manages memory SQLite, runs workflows, manipulates files. One static binary, zero runtime deps.

Model

Thinker

Any AI — Claude, Gemini, Qwen, Phi, Ollama, or a human in terminal. Completely interchangeable.

No APIs  •  No telemetry  •  One binary.

What features does dectl offer?

dectl offers ten capabilities in one 6.1MB MIT-licensed binary: persistent SQLite memory with FTS5 search, executable YAML workflows, auto-detected project context, session management, a 4-agent pipeline, SDD spec generation, 106 profiled development rules with review gate, health diagnostics, data portability, and model-agnostic support across 5+ AI providers.

Persistent Memory

dectl uses SQLite with WAL mode and FTS5 full-text search for persistent memory storage. Add, search, show, edit, and retrieve context across sessions. Tag-based organization with field query language (type:research tags:rust from:2026-01-01), soft-delete with restore, and per-project filtering.

Executable Workflows

dectl runs YAML workflows with Handlebars templates, conditionals, configurable timeouts per step, dry-run, and step recovery. Automate your SDD pipeline end-to-end.

SDD Spec Generator

dectl generates SDD artifacts: constitution, spec, requirements, research, and tasks. One command generates full Spec-Driven Development artifacts. Pass any requirements file: dectl spec init --from requirements.md — the agent reads any format (user stories, structured sections, requirement IDs) and generates compliant specs. dectl spec add creates module specs with the built-in spec_writer agent that follows SDD rules automatically.

Auto-detect Stack

Scan any project directory to detect languages, frameworks, and tooling. Fills .dec/ context automatically on init. Watch mode for live file change tracking with diff output.

Session Management

End sessions with automation: git sync, decision capture, config sync, progress tracking, and configurable hooks. No manual bookkeeping.

Agent Pipeline

dectl provides 4 built-in agents: researcher, coder, reviewer, and documenter. Research → Code → Review → Document pipeline. Run single, in parallel, or as a full pipeline with timeout, auto-trust, and --auto mode.

Development Rules

Profiled development rules keep agents sharp: 106 checks across 17 sections activate from your stack with a one-time questionnaire. Each task gets relevant context, and the reviewer blocks only real FAILs while WARNs stay advisory. Flow: dectl project init --standard → dectl spec init → reviewer FAILs concatenated SQL.

Model Agnostic

No model-specific APIs, no vendor lock-in. Works with Claude, Gemini, Qwen, Phi, Ollama — or a human in a plain terminal.

Health Diagnostics

Run dectl doctor to check project health — database integrity, schema version, config syntax, and git availability. Repair issues automatically with --fix and get clear error hints.

Data Portability

Export memories to JSON or JSONL for backup and migration. Import with automatic dedup. Restore soft-deleted entries. Query with field syntax: type:research tags:rust from:2026-01-01.

▸

What commands does dectl support?

dectl ships 36+ commands across 7 modules: Project, Memory, Workflows, Agents, Session, Rules, and System. Highlights include memory search with FTS5, workflow run with dry-run, agent trust for CI, rules context with 106 checks, and spec add with --from. Every command supports --json output.

Project

  • project initInitialize .dec/ structure
  • project infoShow project summary
  • project scanFile tree (respects .gitignore)
  • project contextCompact summary for AI
  • project watchWatch files for changes

Memory

  • memory addSave a memory
  • memory listList memories
  • memory searchSearch with FTS5
  • memory showView a memory
  • memory editEdit in $EDITOR
  • memory queryField query language
  • memory deleteSoft or hard delete
  • memory restoreRestore soft-deleted
  • memory exportExport to JSON/JSONL
  • memory importImport with dedup

Workflows

  • workflow listList available workflows
  • workflow describeShow workflow details
  • workflow runExecute a workflow

Agents

  • agent listList agents
  • agent describeDescribe an agent role
  • agent runExecute an agent
  • agent trustTrust an agent for CI

Session

  • session endEnd session + summarize

System

  • spec init [--from]SDD scaffold + agent input
  • spec add [--from]Add feature/module via agent
  • doctorHealth diagnostics
  • migrateRun schema migrations
  • generate-completionsShell completions
  • versionBinary + schema version

Rules

  • rules listBrowse the 106-rule catalog
  • rules searchFull-text search by keyword
  • rules resolveActive ruleset for your profile
  • rules contextStage-aware slice (2000 tokens)
  • rules profile updateRe-run stack questionnaire
  • rules resyncRegenerate .dec/rules/ files

Six rules, enforced at review time.

FAIL blocks the pipeline (Security, Secrets, Error Handling). WARN advises and passes.

13.1FAIL

Build SQL with user input — use parameterized queries.

- query = "SELECT * FROM users WHERE id = " + user_id + query = "SELECT * FROM users WHERE id = ?" + db.execute(query, [user_id])
18.1FAIL

Hardcoded secret in source — move it to environment variables.

- api_key = "sk-live-abc123" + api_key = os.environ["API_KEY"]
12.5FAIL

Open resource must always close — release it in finally.

- conn = db.connect() - rows = conn.query(sql) + try: + rows = conn.query(sql) + finally: + conn.close()
13.3FAIL

Mutating action on session cookies — add SameSite + anti-CSRF token.

- Set-Cookie: session=abc; Path=/ + Set-Cookie: session=abc; Path=/; SameSite=Strict + verify_csrf(request.token)
11.6WARN

POST creates a resource — prevent duplicate retries.

- POST /orders {"item": "book"} + POST /orders Idempotency-Key: 550e8400 + {"item": "book"}
4.6WARN

Copied business rule — unify it in a single source of truth.

- total = price * 1.21 # Bern - total = price * 1.21 # Zurich + from tax import VAT_RATE + total = price * VAT_RATE

dectl vs. the tools you already know.

Named side-by-side comparison with well-known AI coding assistants.

Comparison: dectl vs Claude Code, Cursor, GitHub Copilot, and Aider
Capability dectl Claude Code Cursor GitHub Copilot Aider
Persistent memory across sessions Local SQLite, searchable, model-agnostic Session-scoped, Claude-only IDE workspace rules, cloud account IDE context, cloud account Session-scoped, local
Works with any AI model Yes — Claude, Gemini, ChatGPT, Ollama, human Claude only Selected models, IDE-only Selected models, IDE-only Selected models, terminal
Local-first, no cloud account required Yes — one 6.1MB binary Cloud account required Cloud account required Cloud account required Yes — terminal-first
Executable YAML workflows with dry-run Yes Slash commands Custom commands and rules Custom agents No
Structured project context format Yes — .dec/ directory No standard format Rules files Instruction files No standard format
License MIT open-source Proprietary Proprietary Proprietary GPL-3.0 open-source

Frequently asked questions.

What is dectl?

dectl is an open-source developer life OS that gives any AI coding environment persistent memory, executable workflows, SDD spec generator, and structured project context. It is model-agnostic, local-first, and ships as a single 6.1MB Rust binary with zero runtime dependencies.

How does dectl work?

dectl has three actors: .dec/ (structured project context in Markdown, YAML, TOML, JSON), dectl binary (Rust executor that manages SQLite memory and runs workflows), and the Model (any AI — Claude, Gemini, ChatGPT, Ollama, or a human). They communicate through files and shell commands with no proprietary API.

What are the main features of dectl?

dectl offers persistent memory with SQLite (FTS5 search, field query language, tag-based), executable YAML workflows with Handlebars templates, conditionals and configurable timeouts, auto-detect stack on project init, session management with configurable hooks, a 4-agent pipeline (research, code, review, document) with parallel execution, SDD spec generator with --from flag (pass any requirements file), spec_writer agent that understands any format, health diagnostics with dectl doctor, data portability with export/import/restore, and is completely model-agnostic with no vendor lock-in.

What commands does dectl support?

dectl has 36+ commands across 7 modules: project (init, info, scan, context, watch), memory (add, list, search, show, edit, query, delete, restore, export, import), workflows (list, describe, run), agents (list, describe, run, trust), session (end), rules (list, search, resolve, context, profile update, resync), and system (doctor, spec init, spec add, migrate, generate-completions, version). Every command supports --json output.

Is dectl free and open-source?

Yes, dectl is free and open-source under the MIT license. It is a single 6.1MB static binary with no external API dependencies, no telemetry, and no vendor lock-in. You can install it via curl or build from source on Linux, macOS, and Windows.

How does dectl enforce code quality?

Every task runs through a review gate. The reviewer loads the stage-aware rules context, pre-scans the diff for suspects (RULES_SUSPECT), and confirms each one with a reason. Only precise blocking matches emit RULES_GATE: FAIL and stop the pipeline with exit 1 (e.g. concatenated SQL, hardcoded secrets, unclosed resources). Advisory matches emit RULES_WARN and pass. Projects without .dec/rules/ get SKIP — the gate never breaks unadopted projects. Accepted exceptions are recorded in .dec/decisions/.

How does project context persist across sessions in dectl?

Project context persists in two places. The .dec/ directory stores vision, config, workflows, prompts, decisions, and session state as plain Markdown, YAML, TOML, and JSON files that any AI can read. The memory commands store decisions and notes in local SQLite with full-text search. Running session end syncs git, captures decisions, and writes the handoff note, so the next session resumes with project info and project context without re-explanation.

Which open-source option fits persistent AI memory needs?

dectl fits persistent AI memory needs: it is MIT-licensed, local-first, and model-agnostic. Memory lives in local SQLite with full-text search instead of one vendor cloud, one IDE, or one session, and it works with any model — Claude, Gemini, ChatGPT, Ollama — from any terminal. It adds executable YAML workflows, structured .dec/ project context, a 4-agent pipeline, and a 106-rule review gate in a single 6.1MB binary with no telemetry.

▸

Build without borders.

No external APIs. No telemetry. One 6.1MB binary.