Skip to content

Automations & Goals

DotCraft gives the agent two ways to keep working without you driving every turn:

  • Automations — run the agent on a schedule or on demand, so routine work like reports, checks, and cleanups happens on its own.
  • Goals — pin a long-running objective to a conversation, and DotCraft keeps pushing it forward whenever that conversation goes idle.

DotCraft Automations and Goals overview

DotCraft Goals

Automations

DotCraft native Automations covers local tasks only. It reads task files from .craft/tasks/ in the current workspace, runs Agents manually or on a schedule, and supports thread binding, templates, retries, activity display, and the CompleteLocalTask completion path.

Create a Local Task

A local task lives under .craft/tasks/<task-id>/:

text
.craft/
  tasks/
    weekly-report/
      task.md
      workflow.md

task.md describes the title, body, schedule, and thread binding. workflow.md describes the Agent workflow prompt.

Common Capabilities

CapabilityDescription
Manual runDesktop Automations panel or AppServer automation/task/run
Scheduled runConfigure schedule in the task file
Thread bindingBind a task to an existing thread so future runs submit there
TemplatesSave reusable task templates under .craft/automations/templates/
Completion toolAgent calls CompleteLocalTask with a summary
Delete taskDelete the task folder, optionally with the linked thread

Workflow Template Variables

VariableDescription
task.idTask id
task.titleTask title
task.descriptiontask.md body
task.thread_idBound thread id

AppServer methods and automation configuration fields are listed in Automations, Goals, and Hooks.

CompleteLocalTask Tool

ParameterDescription
summaryShort completion summary

The agent calls it after finishing the work so the task can record its summary and complete.

Directory Layout

text
<workspace>/
  .craft/
    tasks/
      <task-id>/
        task.md
        workflow.md
    automations/
      templates/
        <template-id>/
          template.md

Goals

Goals are long-running objectives attached to a single Thread. After a user explicitly sets a goal, DotCraft stores it in Session Core so future Turns can see it. When the Thread is idle and auto-continue is enabled, the system can keep advancing the goal until it is completed, paused, cleared, or budget-limited.

Good Fits

  • Refactors, documentation passes, migrations, or investigations that need multiple turns.
  • Long-running work that users may pause, resume, replace, or clear at any time.
  • Work where token usage, elapsed time, and completion state should persist with the Thread.

Lifecycle

StatusMeaning
activeThe goal is in effect; idle Threads may auto-continue
pausedThe goal is retained but does not auto-continue
budgetLimitedToken budget was reached; user action is required
completeThe agent audited the work and marked the goal complete

Common Entry Points

ActionEntry point
Set / replace a goalDesktop Goal control, clients with threadGoals, AppServer thread/goal/set
Pause / resume a goalDesktop Goal control or AppServer thread/goal/set status update
Clear a goalDesktop Goal control or AppServer thread/goal/clear
Read goal stateThread lists, Thread detail, AppServer thread/goal/get

Goal configuration fields and AppServer goal methods are listed in Automations, Goals, and Hooks.

Goals × Automations

Automations are best for "run this task on a schedule or on demand." Goals are best for "keep this Thread moving toward one long-running objective." They can be combined: an Automation wakes up or submits a check, while the Goal preserves the Thread's long-term direction and completion state.

Common Scenarios

ScenarioRecommendation
Weekly / daily reports, scheduled checksAutomations on a schedule
Run a test suite and write the summary to a threadAutomations + CompleteLocalTask
Keep advancing a refactor or documentation passGoals
Make scheduled work follow the same long-running objectiveAutomations + Goals
Auto-lint / format after file writesHooks AfterToolCall
Block dangerous shell commandsHooks BeforeToolCall

Apache License 2.0