skills/define/SKILL.md

Define a task

Turn the developer's idea into one task file that the deliver skill can build without guessing.

First read storage and the shared task record. Resolve $FACTORY_ROOT and use its tasks/ catalog, outside product branches. Approval/status edits do not require a product commit.

This is the code track. If the request is for visual/UI designs or a design-only prototype, direct the developer to /factory:design define instead; do not load or orchestrate the design workflow here.

Steps

  1. Understand the request. Restate the problem in one or two sentences. If no idea was given, ask for one.
  2. Look before asking. Read the code, docs, and tests relevant to the request, including docs/factory/ and relevant .agents/skills/. Note the project's conventions and how it is tested, including what the checks need to run (services, migrations, env files). If those prerequisites aren't documented in the project, add documenting them to the Scope of work; they belong in the project's docs, not the task. Include needed durable documentation/skill updates in the implementation scope, not in task-state files.
  3. Ask only what you cannot find out. Ask the developer the few questions that change the approach (at most 3 at a time). Do not ask about things the code already answers.
  4. Keep it small. A task should be buildable and reviewable in one sitting. If it is bigger, propose a split and define only the first slice. When the idea is uncertain, make the first slice a thin end-to-end version that proves it.
  5. Write the task file. Create a DEV-NNN task as the shared task record describes.
  6. Get approval. Confirm priority with the developer as part of definition approval; the template's normal is a proposal, not inferred approval. Before making it ready, list any task that must be done first in depends_on and, for a task with an approved-design dependency, fill the implements header field. When they approve, set status: ready and add a log line: - YYYY-MM-DD: draft → ready (define, approved by dev). If they don't approve yet, leave it as draft.
  7. Journal. Add a short entry with the journal skill if anything was notable: unclear request, a split, a question the factory should have answered itself, or the process felt slow or heavy.

Rules

  • Define does not write product code.
  • One task per file.
  • Task statuses: draft, ready, building, reviewing, checking, done, and the side states waiting-for-approval and blocked. The design track uses draft, ready, building, reviewing, done and blocked. See deliver for what each code status means.
  • Write kind: code; validate existing task identity/kind through task IDs. Do not reclassify a design task into this track without the developer's decision. Follow the priority contract for approved metadata-only edits; do not use definition to backfill records in bulk.
Original Markdown, including metadata
---
name: define
description: Define a small code task in the shared local factory catalog before implementation. Visual/UI design tasks belong to the separate design skill.
argument-hint: "[idea or problem]"
---

# Define a task

Turn the developer's idea into one task file that the `deliver` skill can build without guessing.

First read [storage](../storage.md) and the shared [task record](../task-record.md). Resolve `$FACTORY_ROOT` and use its `tasks/` catalog, outside product branches. Approval/status edits do not require a product commit.

This is the code track. If the request is for visual/UI designs or a design-only prototype, direct the developer to `/factory:design define` instead; do not load or orchestrate the design workflow here.

## Steps

1. **Understand the request.** Restate the problem in one or two sentences. If no idea was given, ask for one.
2. **Look before asking.** Read the code, docs, and tests relevant to the request, including `docs/factory/` and relevant `.agents/skills/`. Note the project's conventions and how it is tested, including what the checks need to run (services, migrations, env files). If those prerequisites aren't documented in the project, add documenting them to the Scope of work; they belong in the project's docs, not the task. Include needed durable documentation/skill updates in the implementation scope, not in task-state files.
3. **Ask only what you cannot find out.** Ask the developer the few questions that change the approach (at most 3 at a time). Do not ask about things the code already answers.
4. **Keep it small.** A task should be buildable and reviewable in one sitting. If it is bigger, propose a split and define only the first slice. When the idea is uncertain, make the first slice a thin end-to-end version that proves it.
5. **Write the task file.** Create a `DEV-NNN` task as the shared [task record](../task-record.md) describes.
6. **Get approval.** Confirm priority with the developer as part of definition approval; the template's normal is a proposal, not inferred approval. Before making it ready, list any task that must be done first in `depends_on` and, for a task with an approved-design dependency, fill the `implements` header field. When they approve, set `status: ready` and add a log line: `- YYYY-MM-DD: draft → ready (define, approved by dev)`. If they don't approve yet, leave it as `draft`.
7. **Journal.** Add a short entry with the `journal` skill if anything was notable: unclear request, a split, a question the factory should have answered itself, or the process felt slow or heavy.

## Rules

- Define does not write product code.
- One task per file.
- Task statuses: `draft`, `ready`, `building`, `reviewing`, `checking`, `done`, and the side states `waiting-for-approval` and `blocked`. The design track uses `draft`, `ready`, `building`, `reviewing`, `done` and `blocked`. See [deliver](../deliver/SKILL.md) for what each code status means.
- Write `kind: code`; validate existing task identity/kind through [task IDs](../task-ids.md). Do not reclassify a design task into this track without the developer's decision. Follow the priority contract for approved metadata-only edits; do not use definition to backfill records in bulk.