README
ยถ
Deft
One-shot, anti-slop
A layered framework for AI-assisted development with consistent standards and workflows.
TL;DR
Deft is a SKILL.md that makes AI coding significantly more effective by providing consistent, hierarchical standards. Instead of repeating the same instructions in every AI session, you define your preferences onceโfrom general coding style to project-specific rulesโand AI agents follow them. The result: higher quality code, reproducible workflows, and AI that gets better over time by learning from your patterns.
Key benefits: No more "AI forgot my preferences", no more inconsistent code style across AI sessions, no more re-explaining your stack every time.
Don't have preferences yet? No problemโDeft ships with professional-grade defaults for Python, Go, TypeScript, C++, and common workflows. Use it out of the box and customize later.
Platform compatibility: If you're on a platform that doesn't yet support SKILL.md, just add a line to your AGENTS.md that says "See deft/main.md".
Context-efficient: Deft keeps AI context windows lean through RFC 2119-based notation (!, ~, โ, โ) and lazy-loadingโAI only reads the files relevant to the current task, not everything at once.
๐ Roadmap: See ROADMAP.md for the development timeline, open issues, and planned work.
๐ข Cloned manually? Tell your agent: "Read
deft/QUICK-START.mdand follow it." It creates your project's AGENTS.md and starts the setup flow automatically.
๐ Upgrading from a previous version? Read UPGRADING.md before proceeding.
Agents: ! Read UPGRADING.md on the first session after a framework update.
โฌ๏ธ Get Deft: Download the installer for your platform from GitHub Releases, run it, and follow the prompts. See Getting Started below.
๐ Getting Started
Download the installer for your platform from GitHub Releases, run it, and follow the prompts.
โฌ๏ธ Quick Download -- direct binaries from the latest GitHub Release:
- Windows:
install-windows-amd64.exe|install-windows-arm64.exe(Surface / Copilot+ PCs)- macOS:
install-macos-universal(Intel + Apple Silicon)- Linux:
install-linux-amd64|install-linux-arm64(Raspberry Pi / ARM)
1. Install Deft
Windows:
- Download
install-windows-amd64.exe(orinstall-windows-arm64.exefor Surface / Copilot+ PCs) - Run the downloaded file -- Windows SmartScreen may warn about an unrecognised publisher; click "More info" then "Run anyway" (code signing is planned for a future release)
macOS:
- Download
install-macos-universal-- works on all Macs (Intel and Apple Silicon) - Make it executable and run:
chmod +x install-macos-universal && ./install-macos-universal - If macOS Gatekeeper blocks the file: right-click then Open, or remove the quarantine attribute first (code signing is planned for a future release):
xattr -d com.apple.quarantine install-macos-universal
Linux:
- Download
install-linux-amd64(orinstall-linux-arm64for Raspberry Pi / ARM cloud) - Make it executable and run:
chmod +x install-linux-amd64 && ./install-linux-amd64
The installer guides you through choosing a project directory, installs git if needed, clones deft, wires it into AGENTS.md, and creates your user config directory.
Manual clone (no installer): If you clone deft directly via git clone, tell your agent: "Read deft/QUICK-START.md and follow it." It creates your project's AGENTS.md and starts the setup flow automatically.
Building from source (developers only): requires Go 1.22+
go run ./cmd/deft-install/
2. Set Up Your Preferences
Deft offers two setup paths that produce the same output (USER.md + vbrief/PROJECT-DEFINITION.vbrief.json) but adapt to different users:
Agent-driven (recommended for most users) โ Tell your agent read AGENTS.md and follow it to start the Deft setup flow. The agent will ask how technical you are and adapt accordingly:
- Technical: asks about languages, strategy, coverage, meta rules, and custom rules
- Some opinions: asks name, languages, and custom rules; defaults the rest
- Just pick defaults: asks what you're building, infers everything else
CLI (for technical users) โ If you're running commands in a terminal, you're technical. The CLI treats you as a power user and asks all configuration questions directly โ no skill-level gate.
deft/run bootstrap # Interactive setup for USER.md and PROJECT-DEFINITION.vbrief.json
User config location:
- Unix / macOS:
~/.config/deft/USER.md - Windows:
%APPDATA%\deft\USER.md - Override: set
DEFT_USER_PATHenvironment variable
3. Generate a Scope vBRIEF
deft/run bootstrap can chain into the scope-vBRIEF interview, or create one anytime:
deft/run spec # AI-assisted interview -> vbrief/proposed/YYYY-MM-DD-<slug>.vbrief.json
The interview writes a scope vBRIEF to vbrief/proposed/ as YYYY-MM-DD-<slug>.vbrief.json. vbrief/*.vbrief.json files are the source of truth; .md files (PRD.md, SPECIFICATION.md, ROADMAP.md) are rendered views generated on demand via task *:render. Direct edits to the rendered .md files are overwritten on the next render -- edit the underlying .vbrief.json instead.
Other commands:
deft/run reset # Reset config files
deft/run validate # Check deft configuration
deft/run doctor # Check system dependencies
deft/run upgrade # Record the current framework version after updating deft
4. Build With AI
Ask your AI to build the product/project from your scope vBRIEFs and away you go:
Read vbrief/PROJECT-DEFINITION.vbrief.json and the scope vBRIEFs in
vbrief/active/ (or vbrief/pending/ if none are active yet) and implement
the project following deft/main.md standards.
Brownfield adoption: Adding Deft to an existing project with pre-v0.20
SPECIFICATION.md/PROJECT.md? See docs/BROWNFIELD.md for the migration path (task migrate:vbrief) and what to expect.
๐ธ From Vibe to Virtuoso
AGENTS.md is great for vibe-codingโloose guidance, good enough for quick work:
"Make it clean, I like tests, use TypeScript."
Deft is for when you want virtuoso results: precise standards, reproducible workflows, and AI that improves over time.
| Vibe (AGENTS.md) | Virtuoso (Deft) |
|---|---|
| All rules in one file | Modularโload only what's relevant |
| Gets bloated across languages/tools | Scales cleanly (python.md stays focused) |
| Same context loaded every session | Lazy-loading saves tokens |
| Preferences mixed with standards | Clear separation (user.md vs language files) |
| No evolution mechanism | Meta files capture learnings automatically |
| Starts fresh each project | Portable across projects |
When to use which:
- Your AGENTS.md is under 200 lines and you work in one language? Vibe is fine.
- It's growing unwieldy, you're repeating yourself, or you want consistent quality across projects? Deft pays off.
Same instrument, different mastery.
โ๏ธ Platform Requirements
GitHub is the primary supported SCM platform. Skills that interact with issues and PRs (deft-directive-sync, deft-directive-swarm, deft-directive-review-cycle, deft-directive-refinement) require the GitHub CLI (gh) to be installed and authenticated. Core framework features (setup, build, rendering, validation) work independently of any SCM platform.
The migration script (task migrate:vbrief) defaults origin provenance to github-issue type. Non-GitHub users should manually adjust references[].type in generated vBRIEFs after migration.
๐ฆ Document Generation & vBRIEF Tooling
Deft provides deterministic task commands for rendering, migrating, and validating documents:
| Command | Description | When to use |
|---|---|---|
task spec:render |
Regenerate SPECIFICATION.md from specification.vbrief.json |
After editing the spec vBRIEF |
task prd:render |
Export plan.narratives from specification.vbrief.json to a read-only PRD.md for stakeholder review |
On demand, when a stakeholder wants a PRD-style export |
task roadmap:render |
Regenerate ROADMAP.md from vbrief/pending/ scope vBRIEFs |
After promoting/demoting scopes |
task project:render |
Regenerate PROJECT-DEFINITION.vbrief.json items registry |
After scope lifecycle changes |
task migrate:vbrief |
Migrate existing projects to vBRIEF lifecycle folder structure | One-time cutover from pre-v0.20 model |
task issue:ingest -- <N> |
Ingest a single GitHub issue as a scope vBRIEF in vbrief/proposed/ (deduplicates via existing references) |
After filing a new issue you plan to work on |
task issue:ingest -- --all [--label L] [--status S] [--dry-run] |
Bulk-ingest all open issues into scope vBRIEFs | Post-refactor / post-release cleanup, or when reducing the reconcile unlinked backlog |
task vbrief:validate |
Validate vBRIEF schema, filenames, folder/status consistency | Pre-commit (runs as part of task check) |
See commands.md for the full change lifecycle and the Command Lifecycle: run vs task section there for detailed usage.
Ingesting GitHub issues
Post-v0.20, new GitHub issues become scope vBRIEFs via task issue:ingest:
# Single issue -- writes vbrief/proposed/YYYY-MM-DD-<N>-<slug>.vbrief.json
task issue:ingest -- 123
# Bulk ingest all open issues carrying the `bug` label, dry-run first
task issue:ingest -- --all --label bug --dry-run
task issue:ingest -- --all --label bug
The script deduplicates against existing references[type=github-issue] entries in vbrief/, writes to the lifecycle folder selected by --status proposed|pending|active (default: proposed), and exits with 1 if the issue already has a scope vBRIEF. Use --dry-run in bulk mode to preview without writing files.
Command Lifecycle: run vs task
Deft uses two complementary command surfaces:
runcommands (deft/run bootstrap,deft/run spec,deft/run validate) handle interactive creation โ bootstrapping user/project config, conducting spec interviews, validating configuration. These are the entry points for humans starting new work.taskcommands (task spec:render,task roadmap:render,task migrate:vbrief, etc.) handle scripted rendering, migration, and validation โ deterministic operations that transform vBRIEF source files into readable artifacts or enforce structural rules.
This split is intentional: run commands are conversational and agent-friendly; task commands are deterministic and CI-friendly. For the full document lifecycle, start with run to create, then use task to render and validate. See commands.md for cross-references.
๐ฏ What is Deft?
Deft is a structured approach to working with AI coding assistants that provides:
- Consistent coding standards across languages and projects
- Reproducible workflows via task-based automation
- Self-improving guidelines that evolve with your team
- Hierarchical rule precedence from general to project-specific
- Lazy loading - only read files relevant to current task (see REFERENCES.md)
๐ Notation Legend
Deft uses compact notation for requirements:
- ! = MUST (required, mandatory)
- ~ = SHOULD (recommended, strong preference)
- โ = SHOULD NOT (discouraged, avoid unless justified)
- โ = MUST NOT (forbidden, never do this)
This notation appears in technical standard files (python.md, go.md, etc.) for scanability. Based on RFC 2119.
๐ The Layers
Deft uses a layered architecture where more specific rules override general ones:
flowchart TD
subgraph precedence ["Rule Precedence (top = highest)"]
direction TB
U["๐ค USER.md<br/><i>Personal preferences</i>"]
P["๐ PROJECT-DEFINITION.vbrief.json<br/><i>Project identity + rules</i>"]
L["๐ python.md / go.md / etc.<br/><i>Language standards</i>"]
T["๐ง taskfile.md<br/><i>Tool guidelines</i>"]
M["๐ค main.md<br/><i>General AI behavior</i>"]
S["๐ vbrief/specification.vbrief.json<br/><i>Project requirements</i>"]
end
U --> P
P --> L
L --> T
T --> M
M --> S
style U fill:#4ade80,stroke:#166534,color:#000
style P fill:#60a5fa,stroke:#1e40af,color:#000
style L fill:#facc15,stroke:#a16207,color:#000
style T fill:#fb923c,stroke:#c2410c,color:#000
style M fill:#c084fc,stroke:#7c3aed,color:#000
style S fill:#94a3b8,stroke:#475569,color:#000
๐ Directory Structure
deft/
โโโ README.md # This file
โโโ CHANGELOG.md # Release history
โโโ CONTRIBUTING.md # Contributor bootstrap guide
โโโ LICENSE.md # MIT License
โโโ PROJECT.md # Project-level configuration (deprecated -- see PROJECT-DEFINITION.vbrief.json)
โโโ REFERENCES.md # Lazy-loading reference system
โโโ ROADMAP.md # Development timeline
โโโ SKILL.md # Entry point for AI agents
โโโ main.md # Entry point - general AI guidelines
โโโ commands.md # Available commands
โโโ Taskfile.yml # Task automation
โโโ run.bat # Windows task runner shim
โ
โโโ cmd/ # Go installer source
โ โโโ deft-install/ # Cross-platform installer wizard
โ
โโโ coding/ # Coding standards
โ โโโ coding.md # General coding guidelines
โ โโโ testing.md # Testing standards
โ
โโโ context/ # Context management strategies
โ โโโ context.md # Overview
โ โโโ deterministic-split.md
โ โโโ examples.md
โ โโโ fractal-summaries.md
โ โโโ long-horizon.md
โ โโโ spec-deltas.md
โ โโโ tool-design.md
โ โโโ working-memory.md
โ
โโโ contracts/ # Interface contracts
โ โโโ boundary-maps.md # Produces/consumes between slices
โ โโโ hierarchy.md # Dual-hierarchy framework (durability + generative axes)
โ
โโโ core/ # Core framework files
โ โโโ glossary.md # Terminology definitions
โ โโโ project.md # Project template
โ โโโ ralph.md # Ralph loop concept
โ โโโ user.md # Legacy; now ~/.config/deft/USER.md or %APPDATA%\deft\USER.md
โ โโโ versioning.md # Versioning guidelines
โ
โโโ deployments/ # Platform-specific deployment guidance
โ โโโ README.md # Deployment overview
โ โโโ agentuity/ # Agentuity platform
โ โโโ aws/ # AWS (Lambda, ECS, App Runner, EB)
โ โโโ azure/ # Azure (App Service, Functions, AKS, Container Apps)
โ โโโ cloudflare/ # Cloudflare Workers/Pages
โ โโโ cloud-gov/ # cloud.gov (FedRAMP)
โ โโโ fly-io/ # Fly.io
โ โโโ google/ # GCP (Cloud Run, Functions, App Engine, GKE)
โ โโโ netlify/ # Netlify
โ โโโ vercel/ # Vercel
โ
โโโ docs/ # Documentation & articles
โ โโโ ai-coding-trust-paradox.md
โ โโโ BROWNFIELD.md # Adding Deft to an existing project (brownfield adoption)
โ โโโ claude-code-integration.md
โ
โโโ history/ # Plan archives and change logs
โ โโโ archive/
โ โโโ changes/
โ
โโโ interfaces/ # Interface types
โ โโโ cli.md # Command-line interfaces
โ โโโ rest.md # REST APIs
โ โโโ tui.md # Terminal UIs
โ โโโ web.md # Web UIs
โ
โโโ languages/ # Language-specific standards
โ โโโ python.md, go.md, typescript.md, javascript.md
โ โโโ cpp.md, c.md, csharp.md, rust.md, zig.md
โ โโโ java.md, kotlin.md, swift.md, dart.md
โ โโโ elixir.md, julia.md, r.md, sql.md
โ โโโ delphi.md, visual-basic.md, vhdl.md
โ โโโ 6502-DASM.md # 6502 Assembly (DASM)
โ โโโ markdown.md, mermaid.md
โ โโโ commands.md # Language command reference
โ
โโโ meta/ # Meta/process files
โ โโโ code-field.md # Coding mindset
โ โโโ ideas.md # Future directions
โ โโโ lessons.md # Learnings
โ โโโ morals.md # Ethical guidelines
โ โโโ SOUL.md # Core philosophy
โ โโโ suggestions.md # Improvements
โ
โโโ platforms/ # Platform-specific standards
โ โโโ 2600.md # Atari 2600
โ โโโ unity.md # Unity engine
โ
โโโ resilience/ # Session continuity & recovery
โ โโโ continue-here.md # Interruption recovery protocol
โ โโโ context-pruning.md # Fresh context per task
โ
โโโ scm/ # Source control management
โ โโโ changelog.md # Changelog conventions
โ โโโ git.md # Git conventions
โ โโโ github.md # GitHub workflows
โ
โโโ skills/ # Agent skills (SKILL.md format)
โ โโโ deft-directive-build/ # Build/implement skill
โ โโโ deft-directive-interview/ # Deterministic structured Q&A interview
โ โโโ deft-directive-pre-pr/ # Iterative pre-PR quality loop (RWLDL)
โ โโโ deft-directive-refinement/ # Conversational backlog refinement
โ โโโ deft-directive-review-cycle/ # Greptile bot review cycle
โ โโโ deft-directive-setup/ # Interactive setup skill
โ โโโ deft-directive-swarm/ # Parallel agent orchestration
โ โโโ deft-directive-sync/ # Session-start framework sync
โ
โโโ specs/ # Per-feature specifications
โ โโโ testbed/ # QA testbed Phase 1 spec
โ โโโ strategy-chaining/ # Strategy chaining feature spec
โ
โโโ strategies/ # Development strategies
โ โโโ README.md # Strategy overview
โ โโโ brownfield.md # Redirect โ map.md (backward compat)
โ โโโ discuss.md # Discussion mode
โ โโโ interview.md # Interview-driven development (default)
โ โโโ map.md # Codebase mapping
โ โโโ research.md # Research mode
โ โโโ speckit.md # Specification toolkit
โ โโโ yolo.md # Rapid prototyping
โ
โโโ swarm/ # Multi-agent coordination
โ โโโ swarm.md # Swarm guidelines
โ
โโโ taskfiles/ # Reusable Taskfile includes
โ โโโ deployments.yml # Deployment tasks
โ
โโโ templates/ # Templates and examples
โ โโโ make-spec.md # Spec generation guide
โ โโโ make-spec-example.md
โ โโโ specification.md # Project spec template
โ
โโโ tests/ # Test fixtures and snapshots
โ โโโ content/snapshots/ # Content validation baselines
โ โโโ fixtures/ # Mock configs
โ
โโโ tools/ # Tooling and workflow
โ โโโ RWLDL.md # Read-Write-List-Delete-Link pattern
โ โโโ taskfile.md # Task automation
โ โโโ telemetry.md # Observability
โ
โโโ vbrief/ # vBRIEF document model
โ โโโ vbrief.md # Canonical vBRIEF usage reference
โ โโโ PROJECT-DEFINITION.vbrief.json # Project identity gestalt
โ โโโ proposed/ # Scope vBRIEFs: ideas, not committed to
โ โโโ pending/ # Scope vBRIEFs: accepted backlog
โ โโโ active/ # Scope vBRIEFs: in progress
โ โโโ completed/ # Scope vBRIEFs: done
โ โโโ cancelled/ # Scope vBRIEFs: rejected/abandoned
โ โโโ schemas/ # JSON schemas
โ
โโโ verification/ # Agent work verification
โโโ verification.md # 4-tier verification ladder
โโโ integration.md # Integration testing
โโโ plan-checking.md # Plan validation
โโโ uat.md # User acceptance testing
๐ง Core Files
main.md - Entry point, general AI guidelines
SKILL.md - Entry point for AI agent skill loading
coding/coding.md - Software development standards
coding/testing.md - Testing standards
vbrief/PROJECT-DEFINITION.vbrief.json - Project identity gestalt (replaces PROJECT.md)
USER.md - Your personal preferences (highest precedence) -- ~/.config/deft/USER.md (Unix/macOS) or %APPDATA%\deft\USER.md (Windows)
๐ Languages
languages/ contains standards for 20+ languages including:
python.md - Python (โฅ85% coverage, mypy strict, ruff/black)
go.md - Go (โฅ85% coverage, Testify)
typescript.md / javascript.md - TS/JS (strict mode, Vitest)
cpp.md / c.md / csharp.md - C family
rust.md / zig.md - Systems languages
java.md / kotlin.md / swift.md / dart.md - Mobile/JVM
elixir.md / julia.md / r.md / sql.md - Specialized
markdown.md / mermaid.md - Documentation formats
Plus: delphi, visual-basic, vhdl, 6502-DASM
๐ป Interfaces
interfaces/cli.md - Command-line interface patterns
interfaces/rest.md - REST API design
interfaces/tui.md - Terminal UI (Textual, ink)
interfaces/web.md - Web UI (React, Tailwind)
๐ฎ Platforms
platforms/2600.md - Atari 2600 development
platforms/unity.md - Unity engine standards
๐ ๏ธ Tools
tools/taskfile.md - Task automation best practices
tools/telemetry.md - Logging, tracing, metrics
tools/RWLDL.md - Read-Write-List-Delete-Link pattern
๐ SCM
scm/git.md - Commit conventions, safety
scm/github.md - GitHub workflows
scm/changelog.md - Changelog conventions
๐ Swarm
swarm/swarm.md - Multi-agent coordination patterns
๐งญ Strategies
strategies/ - Development approach strategies:
interview.md / discuss.md / map.md / research.md / speckit.md / yolo.md / brownfield.md (redirect to map.md)
๐ง Context
context/context.md - Context management overview
context/fractal-summaries.md / working-memory.md / long-horizon.md / deterministic-split.md / spec-deltas.md / tool-design.md / examples.md
โ Verification
verification/verification.md - 4-tier verification ladder, must-haves, stub detection
verification/integration.md - Integration testing standards
verification/plan-checking.md - Plan validation
verification/uat.md - Auto-generated user acceptance test scripts
๐ก๏ธ Resilience
resilience/continue-here.md - Interruption recovery protocol (vBRIEF-based)
resilience/context-pruning.md - Fresh context per task, eliminating context rot
๐ vBRIEF
vbrief/vbrief.md - Canonical vBRIEF usage reference (file taxonomy, lifecycle folders, scope vBRIEFs)
vbrief/schemas/ - JSON validation schemas
vbrief/PROJECT-DEFINITION.vbrief.json - Project identity gestalt
vbrief/{proposed,pending,active,completed,cancelled}/ - Scope vBRIEF lifecycle folders
๐ Contracts
contracts/hierarchy.md - Dual-hierarchy framework (durability axis + generative axis)
contracts/boundary-maps.md - Explicit produces/consumes declarations between slices
๐ Deployments
deployments/ - Deployment guides for 9 platforms:
agentuity, aws, azure, cloudflare, cloud-gov, fly-io, google, netlify, vercel
๐ Glossary
glossary.md - Canonical v0.20 vocabulary (Scope vBRIEF, lifecycle folder, canonical narrative keys, rendered export, source of truth, ...) -- one page under 150 lines.
๐ค Skills
skills/deft-directive-build/ - Build/implement skill
skills/deft-directive-interview/ - Deterministic structured Q&A interview skill
skills/deft-directive-pre-pr/ - Iterative pre-PR quality loop (Read-Write-Lint-Diff-Loop) -- run before pushing a branch for PR creation
skills/deft-directive-refinement/ - Conversational backlog refinement (ingest, evaluate, promote/demote, prioritize)
skills/deft-directive-review-cycle/ - Greptile bot reviewer response workflow (fetch findings, batch fix, exit on clean)
skills/deft-directive-setup/ - Interactive setup wizard skill
skills/deft-directive-swarm/ - Parallel local agent orchestration (worktrees, prompts, monitoring, merge)
skills/deft-directive-sync/ - Session-start framework sync (submodule update, project validation)
๐ Templates
templates/make-spec.md - Specification generation
templates/specification.md - Project spec template
๐ง Meta
meta/code-field.md - Coding mindset and philosophy
meta/SOUL.md - Core philosophy
meta/morals.md - Ethical guidelines
meta/lessons.md - Codified learnings (AI-updatable)
meta/ideas.md - Future directions
meta/suggestions.md - Improvement suggestions
Rule Hierarchy
Rules cascade with precedence:
- USER.md (highest) - your personal overrides (
~/.config/deft/USER.mdon Unix/macOS,%APPDATA%\deft\USER.mdon Windows) - vbrief/PROJECT-DEFINITION.vbrief.json - project-specific rules and identity gestalt
- Language files (python.md, go.md) - language standards
- Tool files (taskfile.md) - tool guidelines
- main.md - general AI behavior
- vbrief/specification.vbrief.json + scope vBRIEFs (lowest) - requirements (rendered to SPECIFICATION.md via
task spec:render)
Continuous Improvement
The deft process evolves over time:
flowchart TD
subgraph evolution ["Continuous Evolution"]
DEV["๐ ๏ธ Development<br/><i>Daily coding</i>"]
LEARN["๐ lessons.md<br/><i>Patterns discovered</i>"]
IDEAS["๐ก ideas.md<br/><i>Future directions</i>"]
SUGGEST["๐ suggestions.md<br/><i>Improvements</i>"]
USER["๐ค user.md<br/><i>Preferences</i>"]
STANDARDS["๐ Language/Tool files<br/><i>Evolving standards</i>"]
end
DEV -->|"AI discovers"| LEARN
DEV -->|"AI notes"| IDEAS
DEV -->|"AI suggests"| SUGGEST
LEARN -->|"Promote"| STANDARDS
IDEAS -->|"Review"| STANDARDS
SUGGEST -->|"Accept"| USER
STANDARDS -->|"Inform"| DEV
USER -->|"Guide"| DEV
style DEV fill:#f0abfc,stroke:#a855f7,color:#000
style LEARN fill:#fde68a,stroke:#d97706,color:#000
style IDEAS fill:#a5f3fc,stroke:#06b6d4,color:#000
style SUGGEST fill:#fecaca,stroke:#ef4444,color:#000
style USER fill:#86efac,stroke:#22c55e,color:#000
style STANDARDS fill:#c7d2fe,stroke:#6366f1,color:#000
- AI updates
lessons.mdwhen learning better patterns - AI notes ideas in
ideas.mdfor future consideration - AI suggests improvements in
suggestions.md - You update your USER.md (
~/.config/deft/USER.mdon Unix/macOS,%APPDATA%\deft\USER.mdon Windows) with new preferences - You update language/tool files as standards evolve
๐ก Key Principles
Task-Centric Workflow with Taskfile
Why Taskfile?
Deft uses Taskfile as the universal task runner for several reasons:
- Makefiles are outdated: Make syntax is arcane, portability is poor, and tabs vs spaces causes constant friction
- Polyglot simplicity: When working across Python (make/invoke/poetry scripts), Go (make/mage), Node (npm scripts/gulp), etc., each ecosystem has different conventions. Taskfile provides one consistent interface
- Better than script sprawl: A
/scriptsdirectory with dozens of bash files becomes chaoticโhard to discover, hard to document, hard to compose. Taskfile provides discoverability (task --list), documentation (desc), and composition (deps) - Modern features: Built-in file watching, incremental builds via checksums, proper error handling, variable templating, and cross-platform support
Usage:
task --list # See available tasks
task check # Pre-commit checks
task test:coverage # Run coverage
task dev # Start dev environment
Test-Driven Development (TDD)
Deft embraces TDD as the default development approach:
flowchart LR
subgraph cycle ["TDD Cycle"]
R["๐ด RED<br/>Write failing test"]
G["๐ข GREEN<br/>Make it pass"]
B["๐ต REFACTOR<br/>Improve code"]
end
R -->|"Minimal code"| G
G -->|"Clean up"| B
B -->|"Next feature"| R
style R fill:#fca5a5,stroke:#dc2626,color:#000
style G fill:#86efac,stroke:#16a34a,color:#000
style B fill:#93c5fd,stroke:#2563eb,color:#000
- Write the test first: Define expected behavior before implementation
- Watch it fail: Confirm the test fails for the right reason
- Implement: Write minimal code to make the test pass
- Refactor: Improve code quality while keeping tests green
- Repeat: Build features incrementally with confidence
Benefits:
- Tests become specifications of behavior
- Better API design (you use the API before implementing it)
- High coverage naturally (โฅ85% is easy when tests come first)
- Refactoring confidence
- Living documentation
In Practice:
task test # Run tests in watch mode during development
task test:coverage # Verify โฅ75% coverage
task check # Pre-commit: all quality checks including tests
Quality First
- โฅ85% test coverage (overall + per-module)
- Always run
task checkbefore commits - Run linting, formatting, type checking
- Never claim checks passed without running them
Spec-Driven Development (SDD)
Before writing any code, deft uses an AI-assisted specification process:
flowchart LR
subgraph sdd ["Spec-Driven Development"]
I["๐ก Idea<br/><i>Initial concept</i>"]
Q["โ Interview<br/><i>AI asks questions</i>"]
S["๐ vbrief/specification.vbrief.json<br/><i>Complete plan (source of truth)</i>"]
D["๐ฅ Development<br/><i>Parallel agents</i>"]
end
I -->|"make-spec.md"| Q
Q -->|"Clarify ambiguity"| S
S -->|"Independent tasks"| D
style I fill:#fef08a,stroke:#ca8a04,color:#000
style Q fill:#c4b5fd,stroke:#7c3aed,color:#000
style S fill:#6ee7b7,stroke:#059669,color:#000
style D fill:#7dd3fc,stroke:#0284c7,color:#000
The Process:
-
Start with make-spec.md: A prompt template for creating specifications
I want to build **\_\_\_\_** that has the following features: 1. Feature A 2. Feature B 3. Feature C -
AI Interview: The AI (Claude or similar) asks focused, non-trivial questions to clarify:
- Missing decisions and edge cases
- Implementation details and architecture
- UX considerations and constraints
- Dependencies and tradeoffs
Each question includes numbered options and an "other" choice for custom responses.
-
Generate a scope vBRIEF (and optionally
vbrief/specification.vbrief.jsonvia the Full path): Once ambiguity is minimized, the AI produces a comprehensive vBRIEF with:- Clear phases, subphases, and tasks
- Dependency mappings (what blocks what)
- Parallel work opportunities
- No codeโjust the complete plan
.mdexports (SPECIFICATION.md,PRD.md) are generated views viatask spec:render/task prd:render; the.vbrief.jsonfiles remain authoritative. -
Multi-Agent Development: The spec enables multiple AI coding agents to work in parallel on independent tasks
Why SDD?
- Clarity before coding: Catch design issues early
- Parallelization: Clear dependencies enable concurrent work
- Scope management: Complete spec prevents scope creep
- Onboarding: New contributors/agents understand the full picture
- AI-friendly: Structured specs help AI agents stay aligned
Example: See templates/make-spec.md for the interview process template
Convention Over Configuration
- Use Conventional Commits for all commits
- Use hyphens in filenames, not underscores
- Keep secrets in
secrets/directory - Keep docs in
docs/, not project root
Safety and Reversibility
- Never force-push without permission
- Assume production impact unless stated
- Prefer small, reversible changes
- Call out risks explicitly
๐ Example Workflows
flowchart TB
subgraph NewProject ["๐ New Python Project"]
direction TB
NP1["AI reads main.md"] --> NP2["AI reads python.md"]
NP2 --> NP3["AI reads taskfile.md"]
NP3 --> NP4["Setup: pytest, ruff, black, mypy"]
NP4 --> NP5["Configure: โฅ85% coverage"]
NP5 --> NP6["You customize: vbrief/PROJECT-DEFINITION.vbrief.json"]
end
subgraph ExistingGo ["๐ Existing Go Project"]
direction TB
EG1["AI reads USER.md"] --> EG2["AI reads vbrief/PROJECT-DEFINITION.vbrief.json"]
EG2 --> EG3["AI reads go.md"]
EG3 --> EG4["AI runs task check"]
EG4 --> EG5["AI makes changes"]
end
subgraph Review ["๐ Code Review"]
direction TB
CR1["AI reads quality standards"] --> CR2["task quality"]
CR2 --> CR3["task test:coverage"]
CR3 --> CR4["Check commits"]
CR4 --> CR5["Update suggestions.md"]
end
Starting a New Python Project
sequenceDiagram
participant AI
participant Files as Deft Files
participant Project
AI->>Files: Read main.md
AI->>Files: Read python.md
AI->>Files: Read taskfile.md
AI->>Project: Setup pytest, ruff, black, mypy
AI->>Project: Configure โฅ85% coverage
AI->>Project: Create Taskfile.yml
Note over AI,Project: You customize project.md
- AI reads:
main.mdโpython.mdโtaskfile.md - AI sets up: pytest, ruff, black, mypy, Taskfile
- AI configures: โฅ85% coverage, PEP standards
- You customize:
vbrief/PROJECT-DEFINITION.vbrief.jsonwith project specifics
Working on an Existing Go Project
sequenceDiagram
participant AI
participant Files as Deft Files
participant Code
AI->>Files: Read USER.md (your overrides)
AI->>Files: Read vbrief/PROJECT-DEFINITION.vbrief.json
AI->>Files: Read go.md
AI->>Files: Read main.md
AI->>Code: Run task check
AI->>Code: Apply changes
Note over AI,Code: Respects your USER.md preferences
- AI reads:
USER.mdโvbrief/PROJECT-DEFINITION.vbrief.jsonโgo.mdโmain.md - AI follows: go.dev/doc/comment, Testify patterns
- AI runs:
task checkbefore suggesting changes - AI respects: your USER.md overrides
Code Review Session
sequenceDiagram
participant AI
participant Standards as Language File
participant Tasks as Taskfile
participant Meta as suggestions.md
AI->>Standards: Reference quality standards
AI->>Tasks: Run task quality
AI->>Tasks: Run task test:coverage
AI->>AI: Check Conventional Commits
AI->>Meta: Log improvements
- AI references quality standards from language file
- AI runs
task qualityandtask test:coverage - AI checks Conventional Commits compliance
- AI suggests improvements โ adds to
suggestions.md
๐ Contributing to Deft
As you use deft, AI maintains three meta files that help the framework evolve:
lessons.md โ Patterns discovered during development
## 2026-01-15: Testify suite setup
When using Testify in Go, always define `suite.Suite` struct with
dependencies as fields, not package-level vars. Discovered during
auth-service refactorโpackage vars caused test pollution.
## 2026-01-20: CLI flag defaults
For CLI tools, default to human-readable output, use `--json` flag
for machine output. Users expect pretty by default.
ideas.md โ Potential improvements for later
- [ ] Add `deft/run upgrade` command to pull latest deft without
losing local user.md/project.md customizations
- [ ] Consider `deft/interfaces/grpc.md` for protobuf/gRPC patterns
- [ ] Explore integration with cursor rules format
suggestions.md โ Project-specific improvements
## auth-service
- The retry logic in `client.go` should use exponential backoff
(currently linear)โsee coding.md resilience patterns
## api-gateway
- Consider splitting routes.go (850 lines) into domain-specific
route files per coding.md file size guidelines
Review these periodically and promote good ideas to main guidelines
๐ข Release & Testing
The GitHub Actions workflow (.github/workflows/release.yml) builds installers for all 6 platform targets, creates a macOS universal binary, runs smoke tests on real hardware, and publishes a GitHub Release.
What the Smoke Tests Verify
Every build is tested on its native platform (including macos-latest and ubuntu-24.04-arm):
--versionโ binary executes and reports version--helpโ flag parsing and usage output render correctly--debugโ correct OS and architecture detection (e.g.OS=darwin ARCH=arm64)- Wizard startup โ binary initializes and prints the welcome banner
--branch <name>โ branch flag is accepted without error- macOS universal binary contains both
x86_64andarm64architectures
Testing Without Publishing
The workflow triggers on version tags (v*.*.*). To run a full build and smoke test without publishing a real release, push a disposable test tag from any branch:
# Tag the current HEAD
git tag v0.0.0-test.1
git push origin v0.0.0-test.1
# Monitor the workflow run
gh run list --workflow=release.yml -R deftai/directive
gh run watch <RUN_ID> -R deftai/directive
# Clean up after verifying
gh release delete v0.0.0-test.1 -R deftai/directive --yes
git push origin --delete v0.0.0-test.1
git tag -d v0.0.0-test.1
The workflow also includes a workflow_dispatch trigger for manual runs without publishing:
gh workflow run release.yml --ref <branch> -R deftai/directive
Manual runs skip the release job automatically (guarded by if: startsWith(github.ref, 'refs/tags/v')).
Release Process
- Merge the feature branch PR into
master - Tag
masterwith a semantic version:git checkout master git pull origin master git tag v1.2.3 git push origin v1.2.3 - The workflow runs automatically: build โ universal-macos โ smoke-test โ release
- Verify the published release at https://github.com/deftai/directive/releases
- Each release includes:
install-windows-amd64.exe,install-windows-arm64.exe,install-macos-universal,install-linux-amd64,install-linux-arm64
Note: Binaries are not yet code-signed. macOS users may need to bypass Gatekeeper (see Getting Started). Windows users may see a SmartScreen warning. Code signing is planned for a future release.
๐ฆ Your Artifacts
When you use Deft in a consumer project, these are the key locations for user-generated artifacts:
./vbrief/-- vBRIEF document rootPROJECT-DEFINITION.vbrief.json-- project identity gestalt (replaces PROJECT.md)plan.vbrief.json-- session-level tactical plan; carriesplanRefto scope vBRIEFscontinue.vbrief.json-- interruption checkpoint (ephemeral)specification.vbrief.json-- project spec source of truthproposed/,pending/,active/,completed/,cancelled/-- scope vBRIEF lifecycle folders (individual units of work asYYYY-MM-DD-slug.vbrief.json)
USER.md-- personal preferences (~/.config/deft/USER.mdon Unix/macOS,%APPDATA%\deft\USER.mdon Windows)./deft/-- installed framework files (cloned or installed by the installer)
๐ Philosophy
Deft embodies:
- Correctness over convenience: Optimize for long-term quality
- Standards over flexibility: Consistent patterns across projects
- Evolution over perfection: Continuously improve through learning
- Clarity over cleverness: Direct, explicit, maintainable code
Next Steps: Read main.md for comprehensive AI guidelines, then download the installer for your platform to get started.
Copyright ยฉ 2025-2026 Jonathan "visionik" Taylor โ https://deft.md
Licensed under the MIT License