/dr-init
Initialize a new task, resume from backlog, or scaffold a new project
Overview
/dr-init is the entry point for every Datarim workflow. It supports two modes: task mode (create or resume tasks) and project mode (scaffold a new project). The mode is auto-detected from your prompt — no flags needed.
In task mode, it creates the datarim/ directory on first run, assigns a complexity level (L1 through L4), generates a unique task ID, and routes you to the correct next stage. If a backlog exists, it can pull pending items instead of starting from scratch.
In project mode, it scaffolds a full project structure: CLAUDE.md, docs/ stubs (architecture, testing, deployment, gotchas), docs/ephemeral/ (plans, research, reviews), datarim/ workflow state, and .gitignore. Tech stack is auto-detected via tech-stack.md.
Usage
# Task mode (default)
/dr-init "Add dark mode toggle"
/dr-init pick from backlog
/dr-init INFRA-0004
# Project mode (auto-detected by keywords)
/dr-init create project "My API Service"
/dr-init new project for task management app
/dr-init создай проект "Мой сервис"
What It Does
- Resolves the git root and creates
datarim/if it does not exist (the only command allowed to do this). - On first run, scaffolds
backlog.md,backlog-archive.md, and the archive directory. Optionally addsdatarim/to.gitignore. - Checks the backlog for pending items. If a backlog item ID or "pick from backlog" is given, selects that item and preserves its existing ID.
- Analyzes the request, determines complexity (L1-L4), and assigns a task ID using Unified Task Numbering (project prefix first, then area prefix,
TASKas fallback). - PRD Waiver Check (Level 3-4 only) — if no PRD exists for the task, prompts: run
/dr-prdfirst, or state a waiver reason (recorded intasks.md). - For L3-L4 tasks, proposes subtask breakdown and offers to add subtasks to the backlog.
- Creates or updates
datarim/tasks.md. Appends the new task to## Active Tasksindatarim/activeContext.md— does not remove existing active tasks. If the file uses legacy single-task format, converts to## Active Taskslist first. - Step 2.5b — Topic Overlap Advisory (v2.7.0+): a non-blocking check that compares the fresh task description against pending backlog items and surfaces any item that shares ≥2 keyword stems. Skips silently when
python3is absent or the backlog has no pending items. RU + EN tokenisation. Operator picks duplicate / refine-scope / orthogonal before committing to a new task ID.
Arguments
Optional. A free-text task description, a backlog item ID (e.g. INFRA-0004), or the phrase "pick from backlog" to browse pending items interactively.
Output
Creates or updates: datarim/tasks.md, datarim/activeContext.md, datarim/backlog.md (if selecting from backlog).
Multi-Task Support
Multiple tasks can be active simultaneously. Each /dr-init appends to the active tasks list rather than replacing it. Use /dr-status to see all active tasks, and /dr-next to pick which one to resume.
Example Session
$ claude
> /dr-init "Implement user authentication"
Analyzing task...
Complexity: Level 3 (complex feature, 5-15 files)
Task ID: AUTH-0001
PRD Waiver Check:
No PRD found for this L3 task.
Options: (a) Run /dr-prd first, (b) State waiver reason
> b "Scope is well-understood from previous projects"
PRD waived: "Scope is well-understood from previous projects"
Created entry in datarim/tasks.md
Appended to Active Tasks in datarim/activeContext.md
This task has 3 identifiable subtasks:
1. OAuth provider integration
2. Session management
3. Role-based access control
Add them to backlog for independent tracking? (y/n)
Next steps:
/dr-plan for implementation plan
Project Scaffolding (v1.14.0)
When /dr-init detects project creation keywords ("create project", "new project", "scaffold project", or Russian equivalents), it enters project mode:
- Loads
project-initskill - Gathers project info (name, description, type)
- Auto-detects tech stack via
tech-stack.md - Creates:
CLAUDE.md(from template with Laws of Robotics + Datarim pipeline),docs/stubs,docs/ephemeral/dirs,datarim/state,.gitignore - Reports what was created and skipped
Idempotent — safe to run on existing projects. Existing files are never overwritten; only missing ones are created. Use "update project structure" to add missing files to an existing project.
Pipeline Position
First stage. Always starts the pipeline. In task mode, routes based on complexity: L1 goes straight to /dr-do, L2 and above go to /dr-plan. In project mode, exits after scaffolding.
Related Commands
- /dr-prd — requirements document for L2+
- /dr-plan — implementation plan for L2+
- /dr-do — direct execution for L1
- /dr-status — check current task and backlog