deft
Apply deft framework standards for AI-assisted development. Use when starting projects, writing code, running tests, making commits, or when the user references deft, project standards, or coding guidelines.
- License 许可
- MIT
- 最近更新
- 2026-04-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- os
- [ "darwin", "linux" ]
- name
- deft
- metadata
- { "clawdbot": { "homepage": "https://github.com/deftai/directive", "requires": { "bins": [ "task" ] } } }
- description
- Apply deft framework standards for AI-assisted development. Use when starting projects, writing code, running tests, making commits, or when the user references deft, project standards, or coding guidelines.
- user-invocable
- false
02 资源文件 252
- 参考文档.github/PULL_REQUEST_TEMPLATE.md1.2 KB
- 参考文档.github/workflows/ci.yml1.4 KB
- 参考文档.github/workflows/release.yml5.5 KB
- 其他.gitignore510 B
- 参考文档.planning/codebase/ARCHITECTURE.md4.9 KB
- 参考文档.planning/codebase/CONCERNS.md2.5 KB
- 参考文档.planning/codebase/CONVENTIONS.md6.4 KB
- 参考文档.planning/codebase/STACK.md2.1 KB
- 参考文档AGENTS.md5.7 KB
- 参考文档CHANGELOG.md95.1 KB
- 脚本cmd/deft-install/drives_other.go529 B
- 脚本cmd/deft-install/drives_windows.go3.1 KB
- 脚本cmd/deft-install/git.go5.7 KB
- 脚本cmd/deft-install/main_test.go21.4 KB
- 脚本cmd/deft-install/main.go3.8 KB
- 脚本cmd/deft-install/setup.go12.2 KB
- 脚本cmd/deft-install/wizard.go11.9 KB
- 参考文档coding/build-output.md1.2 KB
- 参考文档coding/coding.md5.3 KB
- 参考文档coding/holzmann.md4.8 KB
- 参考文档coding/testing.md5.0 KB
- 参考文档coding/toolchain.md1.5 KB
- 参考文档commands.md7.2 KB
- 参考文档context/context.md3.0 KB
- 参考文档context/deterministic-split.md3.1 KB
- 参考文档context/examples.md1.1 KB
- 参考文档context/fractal-summaries.md2.7 KB
- 参考文档context/long-horizon.md2.0 KB
- 参考文档context/spec-deltas.md5.3 KB
- 参考文档context/tool-design.md1.4 KB
- 参考文档context/working-memory.md2.5 KB
- 参考文档contracts/boundary-maps.md2.7 KB
- 参考文档contracts/hierarchy.md3.7 KB
- 参考文档CONTRIBUTING.md2.3 KB
- 参考文档core/glossary.md6.6 KB
- 参考文档core/project.md1.3 KB
- 参考文档core/ralph.md6.9 KB
- 参考文档core/versioning.md10.4 KB
- 参考文档deployments/agentuity/README.md5.8 KB
- 参考文档deployments/agentuity/via-cli.md6.6 KB
- 参考文档deployments/agentuity/via-cloud.md8.3 KB
- 参考文档deployments/agentuity/via-github-actions.md14.2 KB
- 参考文档deployments/agentuity/via-gravity-network.md13.5 KB
- 参考文档deployments/agentuity/via-vpc.md13.0 KB
- 参考文档deployments/aws/README.md1.7 KB
- 参考文档deployments/aws/via-app-runner.md13.7 KB
- 参考文档deployments/aws/via-ecs-fargate.md13.4 KB
- 参考文档deployments/aws/via-elastic-beanstalk.md11.8 KB
- 参考文档deployments/aws/via-lambda.md12.3 KB
- 参考文档deployments/azure/README.md1.7 KB
- 参考文档deployments/azure/via-aks.md7.3 KB
- 参考文档deployments/azure/via-app-service.md11.6 KB
- 参考文档deployments/azure/via-container-apps.md12.6 KB
- 参考文档deployments/azure/via-functions.md12.2 KB
- 参考文档deployments/cloud-gov/agents.md953 B
- 参考文档deployments/cloud-gov/agents/compliance-docs.md4.0 KB
- 参考文档deployments/cloud-gov/cicd.md1.4 KB
- 参考文档deployments/cloud-gov/deployment.md2.2 KB
- 参考文档deployments/cloud-gov/logging.md804 B
- 参考文档deployments/cloud-gov/manifest.md1.8 KB
- 参考文档deployments/cloud-gov/overview.md1.7 KB
- 参考文档deployments/cloud-gov/README.md1.6 KB
- 参考文档deployments/cloud-gov/security.md1.1 KB
- 参考文档deployments/cloud-gov/services.md1.6 KB
- 参考文档deployments/cloud-gov/upstream/README.md319 B
- 参考文档deployments/cloudflare/README.md1.4 KB
- 参考文档deployments/cloudflare/via-dashboard.md3.3 KB
- 参考文档deployments/cloudflare/via-git.md3.9 KB
- 参考文档deployments/cloudflare/via-github-actions.md5.6 KB
- 参考文档deployments/cloudflare/via-terraform.md5.0 KB
- 参考文档deployments/cloudflare/via-wrangler.md4.8 KB
- 参考文档deployments/fly-io/README.md1.4 KB
- 参考文档deployments/fly-io/via-dockerfile.md10.0 KB
- 参考文档deployments/fly-io/via-flyctl.md9.9 KB
- 参考文档deployments/fly-io/via-github-actions.md14.5 KB
- 参考文档deployments/fly-io/via-multi-region.md11.3 KB
- 参考文档deployments/google/README.md1.2 KB
- 参考文档deployments/google/via-app-engine.md844 B
- 参考文档deployments/google/via-cloud-functions.md531 B
- 参考文档deployments/google/via-cloud-run.md6.8 KB
- 参考文档deployments/google/via-gke.md510 B
- 参考文档deployments/netlify/README.md2.9 KB
- 参考文档deployments/netlify/via-cli.md289 B
- 参考文档deployments/netlify/via-functions.md369 B
- 参考文档deployments/netlify/via-git.md523 B
- 参考文档deployments/README.md811 B
- 参考文档deployments/vercel/README.md2.6 KB
- 参考文档deployments/vercel/via-api.md432 B
- 参考文档deployments/vercel/via-cli.md284 B
- 参考文档deployments/vercel/via-git.md488 B
- 参考文档docs/ai-coding-trust-paradox.md4.3 KB
- 参考文档docs/claude-code-integration.md9.6 KB
- 参考文档docs/getting-started.md1.2 KB
- 参考文档docs/research/deft-directive-research.md7.3 KB
- 参考文档docs/superpowers.md10.2 KB
- 其他go.mod44 B
- 参考文档history/analysis-2026-03-22-issue-chain-68-94.md3.6 KB
- 其他history/archive/.gitkeep—
- 参考文档history/archive/2026-03-20-agent-auto-alignment/design.md3.6 KB
- 参考文档history/archive/2026-03-20-agent-auto-alignment/proposal.md3.1 KB
- 参考文档history/archive/2026-03-20-agent-auto-alignment/tasks.vbrief.json10.5 KB
- 参考文档history/archive/2026-03-20-agents-md-onboarding/design.md2.6 KB
- 参考文档history/archive/2026-03-20-agents-md-onboarding/proposal.md2.8 KB
- 参考文档history/archive/2026-03-20-agents-md-onboarding/tasks.vbrief.json9.3 KB
- 参考文档history/changes/fix-171-175-commit-gate-and-review-cycle-discipline/CHANGE.md2.0 KB
- 参考文档history/changes/fix-172-oz-agent-run-correction/CHANGE.md1.4 KB
- 参考文档history/changes/README.md1.5 KB
- 参考文档history/implementation-2026-03-13-fix-interview-strategy.md4.8 KB
- 参考文档history/plan-2026-03-11-cross-platform-agent-skills.md8.9 KB
- 参考文档history/plan-2026-03-12-cross-platform-agent-skills-impl.md6.6 KB
- 参考文档history/plan-2026-03-12-go-installer-impl.md11.7 KB
- 参考文档history/plan-2026-03-12-single-entry-installer.md10.3 KB
- 参考文档history/plan-2026-03-13-fix-interview-strategy.md7.1 KB
- 参考文档history/plan-2026-03-29-fix-vbrief-generation.md9.9 KB
- 参考文档history/README.md1.6 KB
- 参考文档history/todo-2026-03-13-retired.md4.0 KB
- 参考文档interfaces/cli.md2.8 KB
- 参考文档interfaces/rest.md6.6 KB
- 参考文档interfaces/tui.md7.6 KB
- 参考文档interfaces/web.md6.0 KB
- 参考文档languages/6502-DASM.md6.2 KB
- 参考文档languages/c.md9.3 KB
- 参考文档languages/commands.md861 B
- 参考文档languages/cpp.md4.5 KB
- 参考文档languages/csharp.md10.7 KB
- 参考文档languages/dart.md7.3 KB
- 参考文档languages/delphi.md8.6 KB
- 参考文档languages/elixir.md8.4 KB
- 参考文档languages/go.md1.7 KB
- 参考文档languages/java.md10.6 KB
- 参考文档languages/javascript.md4.9 KB
- 参考文档languages/julia.md6.8 KB
- 参考文档languages/kotlin.md7.1 KB
- 参考文档languages/markdown.md7.3 KB
- 参考文档languages/mermaid.md4.2 KB
- 参考文档languages/python.md4.5 KB
- 参考文档languages/r.md6.2 KB
- 参考文档languages/rust.md7.9 KB
- 参考文档languages/sql.md9.3 KB
- 参考文档languages/swift.md4.6 KB
- 参考文档languages/typescript.md3.3 KB
- 参考文档languages/vhdl.md5.7 KB
- 参考文档languages/visual-basic.md5.7 KB
- 参考文档languages/zig.md7.2 KB
- 许可证LICENSE.md1.1 KB
- 参考文档main.md8.9 KB
- 参考文档meta/code-field.md1.9 KB
- 参考文档meta/ideas.md259 B
- 参考文档meta/lessons.md27.7 KB
- 参考文档meta/morals.md1.2 KB
- 参考文档meta/philosophy.md2.5 KB
- 参考文档meta/SOUL.md1.6 KB
- 参考文档meta/suggestions.md58 B
- 参考文档platforms/2600.md7.7 KB
- 参考文档platforms/unity.md15.1 KB
- 参考文档PRD.md9.6 KB
- 参考文档PROJECT.md995 B
- 其他pyproject.toml1.8 KB
- 参考文档README.md34.3 KB
- 参考文档REFERENCES.md9.7 KB
- 参考文档resilience/context-pruning.md3.1 KB
- 参考文档resilience/continue-here.md2.5 KB
- 参考文档ROADMAP.md61.4 KB
- 其他run128.6 KB
- 脚本run.bat1022 B
- 脚本run.py2.3 KB
- 参考文档scm/changelog.md6.9 KB
- 参考文档scm/git.md3.9 KB
- 参考文档scm/github.md11.0 KB
- 脚本scripts/spec_render.py4.4 KB
- 脚本scripts/spec_validate.py6.0 KB
- 脚本scripts/toolchain-check.py1.1 KB
- 脚本scripts/validate-links.py2.1 KB
- 脚本scripts/verify-stubs.py1.9 KB
- 参考文档session.txt30.3 KB
- 参考文档session2.txt5.3 KB
- 参考文档SPECIFICATION.md97.7 KB
- 参考文档specs/strategy-chaining/SPECIFICATION.md12.7 KB
- 参考文档specs/testbed/SPECIFICATION.md13.0 KB
- 参考文档strategies/bdd.md4.8 KB
- 参考文档strategies/brownfield.md241 B
- 参考文档strategies/discuss.md5.3 KB
- 参考文档strategies/enterprise.md4.7 KB
- 参考文档strategies/interview.md13.1 KB
- 参考文档strategies/map.md3.6 KB
- 参考文档strategies/rapid.md3.5 KB
- 参考文档strategies/README.md3.0 KB
- 参考文档strategies/research.md4.2 KB
- 参考文档strategies/roadmap.md2.9 KB
- 参考文档strategies/speckit.md8.6 KB
- 参考文档strategies/yolo.md3.9 KB
- 参考文档swarm/swarm.md8.5 KB
- 参考文档Taskfile.yml2.0 KB
- 参考文档tasks/change.yml2.9 KB
- 参考文档tasks/commit.yml1.1 KB
- 参考文档tasks/core.yml2.5 KB
- 参考文档tasks/deployments.yml2.8 KB
- 参考文档tasks/install.yml743 B
- 参考文档tasks/spec.yml592 B
- 参考文档tasks/toolchain.yml155 B
- 参考文档tasks/verify.yml296 B
- 参考文档templates/make-spec-example.md1.5 KB
- 参考文档templates/make-spec.md6.8 KB
- 其他templates/project.md.template1.5 KB
- 参考文档templates/specification.md24 B
- 其他templates/user.md.template896 B
- 脚本tests/__init__.py—
- 脚本tests/cli/__init__.py—
- 脚本tests/cli/test_bootstrap.py6.3 KB
- 脚本tests/cli/test_doctor.py1.2 KB
- 脚本tests/cli/test_import_smoke.py1.5 KB
- 脚本tests/cli/test_loop_bugs.py5.1 KB
- 脚本tests/cli/test_project_user_defaults.py6.1 KB
- 脚本tests/cli/test_project.py6.3 KB
- 脚本tests/cli/test_resume.py8.8 KB
- 脚本tests/cli/test_spec_sizing.py21.0 KB
- 脚本tests/cli/test_spec.py17.6 KB
- 脚本tests/cli/test_task_scripts.py16.0 KB
- 脚本tests/cli/test_validate.py2.2 KB
- 脚本tests/conftest.py8.0 KB
- 脚本tests/content/__init__.py—
- 脚本tests/content/snapshots/__init__.py—
- 参考文档tests/content/snapshots/baseline.json386.4 KB
- 脚本tests/content/snapshots/capture.py3.6 KB
- 参考文档tests/content/snapshots/known_failures.json13.8 KB
- 脚本tests/content/test_agents_md.py4.7 KB
- 脚本tests/content/test_contracts.py7.7 KB
- 脚本tests/content/test_mermaid_guidance.py2.1 KB
- 脚本tests/content/test_shape.py5.4 KB
- 脚本tests/content/test_skills.py47.0 KB
- 脚本tests/content/test_standards.py7.7 KB
- 脚本tests/content/test_strategy_chaining.py8.1 KB
- 脚本tests/content/test_structure.py6.2 KB
- 脚本tests/content/test_vbrief_schema.py12.7 KB
- 脚本tests/fixtures/__init__.py—
- 脚本tests/fixtures/mock_configs/__init__.py—
- 其他tests/fixtures/mock_configs/.gitkeep—
- 脚本tests/fixtures/shapes.py3.5 KB
- 参考文档tools/greptile.md6.4 KB
- 参考文档tools/RWLDL.md2.8 KB
- 参考文档tools/taskfile-migration.md1.4 KB
- 参考文档tools/taskfile.md4.8 KB
- 参考文档tools/telemetry.md6.7 KB
- 其他uv.lock104.7 KB
- 参考文档vbrief/plan.vbrief.json1.0 KB
- 参考文档vbrief/schemas/vbrief-core.schema.json10.3 KB
- 参考文档vbrief/specification.vbrief.json57.7 KB
- 参考文档vbrief/vbrief.md10.9 KB
- 参考文档verification/integration.md2.7 KB
- 参考文档verification/plan-checking.md2.8 KB
- 参考文档verification/uat.md2.0 KB
- 参考文档verification/verification.md3.5 KB
03 SKILL.md 正文
Deft Framework
A layered framework for AI-assisted development with consistent standards and workflows.
When This Skill Activates
This skill automatically loads when you:
- Start work in a deft-enabled project (has
./deft/directory) - Reference deft, project standards, or coding conventions
- Run tests, make commits, or perform quality checks
- Ask about project structure, workflows, or best practices
Missing Config Auto-Setup
! When this skill activates, check for USER.md at the platform-appropriate path
(Windows: %APPDATA%\deft\USER.md, Unix: ~/.config/deft/USER.md, or $DEFT_USER_PATH).
If USER.md is missing: Skip everything else in this file. Ask this question immediately as your FIRST and ONLY response — no summary, no menu, no preamble:
Deft has solid opinions on how code should be written and tested — I just need a few things about you and your project. First, how deep do you want to go?
- I'm technical — ask me everything
- I have some opinions but keep it simple
- Just pick good defaults — I care about the product, not the tools
Then continue with skills/deft-setup/SKILL.md Phase 1 for remaining questions.
If USER.md exists but PROJECT.md is missing at the project root: Skip to
skills/deft-setup/SKILL.md Phase 2.
If USER.md and PROJECT.md both exist but no SPECIFICATION.md at the project root:
Skip to skills/deft-setup/SKILL.md Phase 3. Start the specification interview
immediately — ask what to build and features as the first question.
⊗ Project Root vs Framework Internals
! When checking for project-level files (PROJECT.md, SPECIFICATION.md, PRD.md,
specs/), ONLY look at the project root and its direct subdirectories.
-
!
./PROJECT.md— the user's project config (project root) -
!
./SPECIFICATION.mdor./specs/*/SPECIFICATION.md— the user's project spec -
⊗ Count ANY file inside
./deft/as a project-level artifact — those are framework-internal (e.g.deft/PROJECT.md,deft/specs/,deft/templates/are all part of the framework, NOT the user's project) -
⊗ Present a summary of the config and ask what the user wants to do
-
⊗ Ask "what would you like to do" or "what are we building" — start the interview directly
-
⊗ Show menus, recaps, or workflow overviews before starting the next missing phase
Core Principle: Rule Precedence
Deft uses hierarchical rules where more specific overrides general. USER.md has two sections with different precedence:
USER.md Personal ← HIGHEST (name, custom rules — always wins)
↓
PROJECT.md ← Project-specific (strategy, coverage, languages, tech stack)
↓
USER.md Defaults ← Fallback defaults (used when PROJECT.md doesn't specify)
↓
{language}.md ← Language standards (python.md, go.md, typescript.md, cpp.md)
↓
{tool}.md ← Tool guidelines (taskfile.md, git.md)
↓
main.md ← General AI behavior
↓
specification.md ← LOWEST precedence (requirements)
IMPORTANT: USER.md Personal section always wins. For project-scoped settings
(strategy, coverage, languages), PROJECT.md overrides USER.md Defaults.
File Reading Strategy (Lazy Loading)
DO NOT read all deft files at once. Read only what you need:
- Always start with:
./deft/main.md(general guidelines) - Check for:
~/.config/deft/USER.md(personal overrides - highest precedence) - Check for:
./PROJECT.md(project-specific rules) - Then read language-specific only if working with that language:
./deft/languages/python.md./deft/languages/go.md./deft/languages/typescript.md./deft/languages/cpp.md
- Read tool files only when using that tool:
./deft/tools/taskfile.md(when running tasks)./deft/scm/git.md(when using git)./deft/scm/github.md(when using GitHub)
Task-Centric Workflow
Deft projects use Taskfile as the universal task runner.
task --list # See all available tasks
task check # CRITICAL: Run before EVERY commit
See ./deft/tools/taskfile.md for complete task standards and common commands.
Development Methodology
Test-Driven Development (TDD):
- Write test first → Watch it fail → Implement → Refactor → Repeat
- Default: ≥85% coverage (check
project.mdfor overrides) - Implementation is INCOMPLETE until tests pass
Spec-Driven Development (SDD) for new features/projects:
- Run
deft/run spec— sizing gate selects Light or Full path - Light: Interview → SPECIFICATION.md (embedded requirements) → Implement
- Full: Interview → PRD.md (approval gate) → SPECIFICATION.md → Implement
See ./deft/coding/testing.md for complete testing standards.
Quality Standards
Before Every Commit:
task check # MUST run: fmt, lint, type check, test, coverage
Conventional Commits: Use https://www.conventionalcommits.org/en/v1.0.0/ format
File Naming: Use hyphens (e.g., user-service.py), not underscores
Secrets: Store in secrets/ directory with .example templates
See ./deft/coding/coding.md and ./deft/scm/git.md for complete standards.
Language-Specific Standards
All languages require ≥85% test coverage. See language-specific files:
./deft/languages/python.md./deft/languages/go.md./deft/languages/typescript.md./deft/languages/cpp.md
New Project Setup
Initialize new project:
deft/run init # Create deft structure
deft/run bootstrap # User config (first time only)
deft/run project # Project config
deft/run spec # Sizing gate → Light (INTERVIEW.md) or Full (PRD.md) → SPECIFICATION
Work with existing deft project:
- First time? If
~/.config/deft/USER.mddoesn't exist, rundeft/run bootstrap - Read
./deft/main.md(general guidelines) - Read
~/.config/deft/USER.md(personal preferences - highest precedence) - Read
./PROJECT.md(project rules) - Run
task --listto see available tasks
See ./deft/main.md for complete workflow details.
Self-Improvement
Deft learns and evolves via meta/ directory:
lessons.md- Patterns learned (AI can update)ideas.md- Future improvementssuggestions.md- Project-specific suggestions
Platform Integration
This SKILL.md follows the AgentSkills specification, compatible with:
- Claude Code:
~/.claude/skills/deft/or.claude/skills/deft/ - clawd.bot:
~/.clawdbot/skills/deft/or install viaclawdhub sync deft - Warp AI: Upload to Warp Drive, reference in
WARP.md/AGENTS.md
See ./deft/docs/claude-code-integration.md for integration details.
Quick Reference
| Task | Command |
|---|---|
| List tasks | task or task --list |
| Pre-commit checks | task check |
| Run tests | task test |
| Check coverage | task test:coverage |
| Format code | task fmt |
| Lint code | task lint |
| Initialize deft | deft/run init |
| Configure user | deft/run bootstrap |
| Configure project | deft/run project |
| Generate spec | deft/run spec |
Remember
- Lazy load files - Only read what you need
- User.md Personal is king - Personal section always wins; Defaults are fallback
- Task-centric - Use
taskfor everything - Test first - Write tests before implementation
- Always check - Run
task checkbefore commits - Conventional commits - Follow the standard
- Coverage matters - ≥85% by default
- Never lie - Don't claim checks passed without running them
For more details, read the specific files in ./deft/ as needed. Start with main.md and follow the precedence hierarchy.