home / skills / jpicklyk / task-orchestrator / create-item

This skill creates MCP work items anchored to appropriate containers from conversation context, inferring type, priority, and notes for tracking.

npx playbooks add skill jpicklyk/task-orchestrator --skill create-item

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
7.0 KB
---
name: create-item
description: Create an MCP work item from conversation context. Scans existing containers to anchor the item in the right place (Bugs, Features, Tech Debt, Observations, etc.), infers type and priority, creates single items or work trees, and pre-fills required notes. Use this whenever the conversation surfaces a bug, feature idea, tech debt item, or observation worth tracking persistently. Also use when user says "track this", "log this bug", "create a task for", or "add this to the backlog".
argument-hint: "[optional: brief description of what to create]"
---

# create-item — Container-Anchored Work Item Creation

Create MCP work items intelligently from conversation context. This skill handles container anchoring, tag inference, structure decisions, and note pre-population so you don't have to.

---

## Step 1 — Infer intent from conversation

Determine from context (or from `$ARGUMENTS` if provided):
- **Title** — what is the work item?
- **Type** — bug / feature / tech debt / observation / action item / general task
- **Priority** — high / medium / low (default: medium)
- **Scope** — single item, or feature with 2+ clear distinct subtasks?

If title or type cannot be inferred with confidence, use `AskUserQuestion` with concrete options. Do not ask open-ended questions.

---

## Step 2 — Scan containers

```
query_items(operation="overview", includeChildren=true)
```

Classify the existing structure:

| Pattern | Classification |
|---------|---------------|
| Depth-0 item with category-named children (Bugs, Features, etc.) | **Hierarchical** — project root exists |
| Category-named items at depth 0, no project root | **Flat** — use category containers directly |
| No items at all | **Empty** — offer to create project root |

---

## Step 3 — Container anchoring

### Category mapping

| Item type | Target category container |
|-----------|--------------------------|
| Bug / error / crash / unexpected behavior | Bugs |
| Feature / enhancement / new capability | Features |
| Tech debt / refactor / cleanup / improvement | Tech Debt |
| Observation / friction / optimization / missing capability | Observations |
| Action item / follow-up / reminder / TODO | Action Items |
| General / unclear | Best-effort match — ask if uncertain |

### Anchoring decision tree

```
Hierarchical structure:
  Matching category found under project root → use as parentId
  Category missing under project root → create it, then use as parentId

Flat structure:
  Matching category at depth 0 → use as parentId
  Category missing at depth 0 → create it, then use as parentId

Empty (no project root exists):
  → AskUserQuestion: "No project root container exists yet.
    Would you like to create one for this project?"
  → Yes: create project root → create category under it → create item
  → No: create category container at depth 0 → create item under it
```

---

## Step 4 — Apply tags via schema discovery

Read `.taskorchestrator/config.yaml` to discover available note schemas (this is a file read, not an MCP call). In Docker, the path is resolved via the `AGENT_CONFIG_DIR` env var. Each schema key is a tag that activates gate enforcement when applied to an item.

**Infer the best schema match from context:**

| Context signal | Schema to apply |
|----------------|-----------------|
| Feature, enhancement, new capability | `feature-implementation` (if it exists in config) |
| Bug, error, crash, unexpected behavior | `bug-fix` (if it exists in config) |
| Observation, friction, optimization, missing capability | `agent-observation` (if it exists in config) |

If the inferred schema key exists in the config, apply it as the item's `tags` value. If the key does not exist in the config (e.g., no `bug-fix` schema defined), leave tags empty — do not apply a tag that has no matching schema.

**When no confident match can be inferred:**
- If a schema named `default` exists in the config, apply it as the fallback — this lets users control what happens to unclassified items
- Otherwise, ask the user which schema to apply via `AskUserQuestion`, listing the available schema keys from the config
- Include a "No schema" option for items that should be schema-free

**If no config file exists**, skip tagging entirely — all items will be schema-free.

---

## Step 5 — Create the item(s)

**Single item** (bug, observation, standalone task, action item):
```
manage_items(operation="create", items=[{
  title: "<inferred title>",
  summary: "<1-2 sentence description from context>",
  priority: "<inferred priority>",
  tags: "<tags or omit>",
  parentId: "<category container UUID>"
  // Additional fields like `complexity` are optional — omit if not relevant
}])
```

**Work tree** (feature with 2+ distinct subtasks clearly described):
```
create_work_tree(
  root={title, summary, priority, tags},
  children=[{ref: "t1", title: "..."}, {ref: "t2", title: "..."}, ...],
  parentId="<category container UUID>"
)
```

Default to single item when scope is unclear. Use `create_work_tree` only when the conversation explicitly names multiple distinct subtasks.

---

## Step 6 — Pre-fill required notes

Check `expectedNotes` in the create response. For each note where `required: true` and `role: "queue"`:
- Extract relevant content from the conversation
- Check each `expectedNotes` entry for a `guidance` field — use it as the authoring instruction for note content. Guidance takes precedence over free-form inference.
- Upsert: `manage_notes(operation="upsert", notes=[{itemId, key, role, body}])`
- If conversation content is too sparse for a meaningful note body, leave it — do not fabricate content

---

## Step 7 — Report

```
✓ Created: [title] (`short-id`)
  Path: [container path, e.g. "Features" or "Project Root › Features"]
  Tags: [tags, or "none"]
  Notes pre-filled: [key names, or "none"]
```

If a new category container was created, add one line:
```
  ↳ Created new container: [category name] under [parent]
```

---

## Troubleshooting

**No containers found in overview**
- Cause: Fresh workspace with no existing structure
- Solution: The skill handles this automatically — it will offer to create a project root and category containers via `AskUserQuestion`

**Wrong container chosen for the item**
- Cause: Item type was ambiguous or the category mapping didn't match intent
- Solution: Move the item after creation with `manage_items(operation="update", items=[{id: "<uuid>", parentId: "<correct-container-uuid>"}])`

**Tags not matching a schema — `expectedNotes` is empty**
- Cause: The tag string doesn't match any key in `.taskorchestrator/config.yaml`, or the config hasn't been loaded
- Solution: Verify the tag matches a `note_schemas:` key exactly. If the config was recently changed, run `/mcp` to reconnect the server

**Expected notes not returned after item creation**
- Cause: MCP server caches schemas on first access — config changes require reconnect
- Solution: Run `/mcp` in Claude Code to reconnect the server, then retry the create operation

Overview

This skill creates MCP work items from conversation context with minimal friction. It infers title, type, priority, and scope, anchors the item into the appropriate container (Bugs, Features, Tech Debt, Observations, etc.), and pre-fills required notes when possible. Use it whenever a conversation surfaces a bug, feature idea, tech debt item, or any trackable observation.

How this skill works

The skill first infers intent from the conversation or provided arguments: title, type, priority, and whether a work tree is needed. It scans existing containers via an overview query to detect hierarchical, flat, or empty project structures and decides where to anchor the item. It reads available note schemas from the agent config to apply tags when a matching schema exists, creates the item (single or work tree) with inferred fields, and upserts any required queue notes using guidance from expectedNotes.

When to use it

  • When someone says “track this”, “log this bug”, or “create a task for” during conversation
  • When a bug, crash, or unexpected behavior is described and should be tracked persistently
  • When a new feature idea or enhancement is proposed that needs planning or subtasks
  • When tech debt, refactor work, or cleanup opportunities are identified
  • When an observation or workflow friction should be recorded for later action

Best practices

  • Supply concise context or an explicit title if available to avoid clarification questions
  • If multiple distinct subtasks are named, confirm to create a work tree; otherwise default to a single item
  • Keep required note content in the conversation or provide guidance so auto-filled notes are meaningful
  • Rely on the config.yaml note schemas to enforce gating; add a default schema if you want fallback behavior
  • If no project root exists, respond to the prompt about creating one to keep containers organized

Example use cases

  • A user reports a reproducible crash during file upload — create a Bug under Bugs and pre-fill reproduction steps
  • A designer proposes a new settings panel with three clear subtasks — create a Features work tree with those subtasks
  • A developer flags duplicate technical complexity to be cleaned up — create a Tech Debt item and tag accordingly
  • An agent notices a missing API capability during a run — create an Observation under Observations with captured evidence
  • A meeting note says “follow up on quota limits” — create an Action Item under Action Items with the follow-up instruction

FAQ

What happens if the config file with schemas is missing?

If no config file exists, the skill skips tagging and creates schema-free items. It will not apply tags that don’t match any schema key.

How does the skill decide between a single item and a work tree?

It creates a work tree only when the conversation explicitly names two or more distinct subtasks. Otherwise it defaults to a single item and asks a concrete yes/no if the scope is unclear.

What if the inferred container is wrong?

You can move the item after creation using an update operation to set the correct parentId. The skill will ask clarifying questions if type inference is uncertain.