The /dr-init Command — Where Every Task Begins
How /dr-init detects intent, assigns a task ID, creates the tracking structure, and routes you to the right next step — all without touching files you did not ask it to touch.
Every pipeline needs a starting point. In Datarim, that point is /dr-init. It is the only command allowed to create the datarim/ directory and set up the task-tracking structure inside it. Everything else — planning, coding, reviewing — assumes that structure already exists.
The command accepts a plain-text description: what you want to build or fix. From that, it determines the complexity level (1 through 4), picks the right task ID prefix based on the project or area, and creates the first tracking files. If a backlog already exists with pending items, the command lists them and lets you pick one instead of starting fresh.
What it does
The first action is intent detection. The command distinguishes between initializing a task (the common case) and scaffolding an entirely new project. A new project triggers a separate scaffolding flow; a task description goes straight to task setup.
Once the task type is clear, the command assigns an ID by scanning existing tasks and backlog entries to find the next free number. Before committing to that ID, it probes the full task surface — both the backlog and the archive — to catch collisions. A collision means two tasks could end up sharing the same identifier, which breaks the archive step later.
With the ID confirmed, the command writes two files: an init-task file that captures the verbatim operator brief, and an expectations skeleton that records what the task should achieve. The expectations file is used by /dr-qa later to verify that what was built matches what was asked for.
One concrete example
Say the command is run with the description "add CSV export to the invoices endpoint". The command detects a task (not a project), estimates complexity at Level 2, and picks the BILL prefix based on the billing project mapping. It probes the backlog, finds no collision at BILL-0047, and writes datarim/tasks/BILL-0047-init-task.md with the description verbatim, plus BILL-0047-expectations.md with one wish derived from the brief. The task entry lands in tasks.md and activeContext.md. The response ends with a recommended next step.
Where it fits in the pipeline
The pipeline order is: /dr-init → /dr-prd → /dr-plan → /dr-design → /dr-do → /dr-qa → archive. Where the command routes after initialization depends on complexity: a Level 1 task skips directly to /dr-do; a Level 2 task goes to /dr-plan; a Level 3 or 4 task requires a PRD and routes to /dr-prd first.
The structural compliance check at startup is worth mentioning separately. If the datarim/ directory already exists but its schema has drifted, the command reports the finding and offers to run /dr-doctor to repair it. This prevents accumulated schema debt from surfacing as an error at archive time.
Read more about the full pipeline in what Datarim is, or continue to the /dr-prd command for the requirements phase that follows initialization.