Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 95 additions & 13 deletions SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,40 @@ field3: "string value"

### 5.2 Standard Task Fields

#### 5.2.1 `task_name` (optional)
#### 5.2.1 `id` (optional)
- **Type:** String
- **Purpose:** Unique identifier for the task
- **Note:** Metadata only, does not affect task matching or filtering

```yaml
---
id: task-12345
---
```

#### 5.2.2 `name` (optional)
- **Type:** String
- **Purpose:** Human-readable name for the task
- **Note:** Metadata only, does not affect task matching or filtering

```yaml
---
name: Fix Critical Bug
---
```

#### 5.2.3 `description` (optional)
- **Type:** String
- **Purpose:** Description of what the task does
- **Note:** Metadata only, does not affect task matching or filtering

```yaml
---
description: Fix the critical bug affecting user authentication
---
```

#### 5.2.4 `task_name` (optional)
- **Type:** String
- **Purpose:** Metadata identifier for the task
- **Note:** Tasks are matched by filename, not this field
Expand All @@ -446,7 +479,7 @@ task_name: fix-bug
---
```

#### 5.2.2 `resume` (optional)
#### 5.2.5 `resume` (optional)
- **Type:** Boolean
- **Purpose:** Indicates if task is for resuming work
- **Default:** `false`
Expand All @@ -458,7 +491,7 @@ resume: true
---
```

#### 5.2.3 `languages` (optional)
#### 5.2.6 `languages` (optional)
- **Type:** Array of strings (recommended) or string
- **Purpose:** Metadata about programming languages
- **Note:** Metadata only, does not auto-filter rules
Expand All @@ -472,7 +505,7 @@ languages:
---
```

#### 5.2.4 `agent` (optional)
#### 5.2.7 `agent` (optional)
- **Type:** String
- **Purpose:** Target agent, acts as default selector
- **Values:** `cursor`, `copilot`, `claude`, `gemini`, `opencode`, `augment`, `windsurf`, `codex`
Expand All @@ -483,7 +516,7 @@ agent: cursor
---
```

#### 5.2.5 `model` (optional)
#### 5.2.8 `model` (optional)
- **Type:** String
- **Purpose:** AI model identifier (metadata only)

Expand All @@ -493,7 +526,7 @@ model: anthropic.claude-sonnet-4-20250514-v1-0
---
```

#### 5.2.6 `single_shot` (optional)
#### 5.2.9 `single_shot` (optional)
- **Type:** Boolean
- **Purpose:** Indicates single vs. multi-execution
- **Note:** Metadata only
Expand All @@ -504,7 +537,7 @@ single_shot: true
---
```

#### 5.2.7 `timeout` (optional)
#### 5.2.10 `timeout` (optional)
- **Type:** String (Go time.Duration format)
- **Purpose:** Task execution timeout
- **Note:** Metadata only
Expand All @@ -515,7 +548,7 @@ timeout: 10m
---
```

#### 5.2.8 `selectors` (optional)
#### 5.2.11 `selectors` (optional)
- **Type:** Map of key-value pairs
- **Purpose:** Auto-filter rules for this task
- **Supports:** Scalar values and arrays (OR logic)
Expand All @@ -537,7 +570,7 @@ selectors:
---
```

#### 5.2.9 `expand` (optional)
#### 5.2.12 `expand` (optional)
- **Type:** Boolean
- **Purpose:** Control parameter expansion
- **Default:** `true`
Expand All @@ -550,7 +583,40 @@ expand: false

### 5.3 Standard Rule Fields

#### 5.3.1 `languages` (optional)
#### 5.3.1 `id` (optional)
- **Type:** String
- **Purpose:** Unique identifier for the rule
- **Note:** Metadata only, does not affect rule matching or filtering

```yaml
---
id: rule-12345
---
```

#### 5.3.2 `name` (optional)
- **Type:** String
- **Purpose:** Human-readable name for the rule
- **Note:** Metadata only, does not affect rule matching or filtering

```yaml
---
name: Go Implementation Standards
---
```

#### 5.3.3 `description` (optional)
- **Type:** String
- **Purpose:** Description of what the rule provides
- **Note:** Metadata only, does not affect rule matching or filtering

```yaml
---
description: Standards and best practices for Go implementation
---
```

#### 5.3.4 `languages` (optional)
- **Type:** Array or string
- **Purpose:** Filter rules by programming language
- **Values:** Lowercase language names
Expand All @@ -562,7 +628,7 @@ languages:
---
```

#### 5.3.2 `stage` (optional)
#### 5.3.5 `stage` (optional)
- **Type:** String
- **Purpose:** Filter by development stage
- **Common values:** `planning`, `implementation`, `testing`, `review`
Expand All @@ -573,7 +639,7 @@ stage: implementation
---
```

#### 5.3.3 `agent` (optional)
#### 5.3.6 `agent` (optional)
- **Type:** String
- **Purpose:** Target specific agent

Expand All @@ -583,7 +649,7 @@ agent: cursor
---
```

#### 5.3.4 `mcp_server` (optional)
#### 5.3.7 `mcp_server` (optional)
- **Type:** Object
- **Purpose:** Model Context Protocol server configuration

Expand Down Expand Up @@ -1554,6 +1620,9 @@ Potential future additions while maintaining backward compatibility:

| Field | Type | Required | Purpose |
|-------|------|----------|---------|
| `id` | string | No | Unique identifier (metadata) |
| `name` | string | No | Human-readable name (metadata) |
| `description` | string | No | Task description (metadata) |
| `task_name` | string | No | Metadata identifier |
| `resume` | boolean | No | Resume mode indicator |
| `languages` | array/string | No | Programming languages (metadata) |
Expand All @@ -1568,11 +1637,24 @@ Potential future additions while maintaining backward compatibility:

| Field | Type | Required | Purpose |
|-------|------|----------|---------|
| `id` | string | No | Unique identifier (metadata) |
| `name` | string | No | Human-readable name (metadata) |
| `description` | string | No | Rule description (metadata) |
| `languages` | array/string | No | Language filter |
| `stage` | string | No | Development stage filter |
| `agent` | string | No | Agent filter |
| `mcp_server` | object | No | MCP server config |

### Command Fields

| Field | Type | Required | Purpose |
|-------|------|----------|---------|
| `id` | string | No | Unique identifier (metadata) |
| `name` | string | No | Human-readable name (metadata) |
| `description` | string | No | Command description (metadata) |
| `expand` | boolean | No | Parameter expansion control |
| `selectors` | object | No | Auto-filter rules |

### Skill Fields

| Field | Type | Required | Purpose |
Expand Down
126 changes: 126 additions & 0 deletions docs/reference/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@ Content can include ${parameter_placeholders}.

### Frontmatter Fields

#### `id` (optional, standard field)

**Type:** String
**Purpose:** Unique identifier for the task. This field is metadata only and does not affect task matching or filtering.

**Example:**
```yaml
---
id: task-12345
---
```

**Note:** The `id` field is purely informational and can be used to track tasks in external systems or for auditing purposes.

#### `name` (optional, standard field)

**Type:** String
**Purpose:** Human-readable name for the task. This field is metadata only and does not affect task matching or filtering.

**Example:**
```yaml
---
name: Fix Critical Authentication Bug
---
```

**Note:** The `name` field is useful for display purposes and documentation, but tasks are still matched by their filename.

#### `description` (optional, standard field)

**Type:** String
**Purpose:** Description of what the task does. This field is metadata only and does not affect task matching or filtering.

**Example:**
```yaml
---
description: Fix the critical bug affecting user authentication in the login flow
---
```

**Note:** The `description` field provides additional context about the task's purpose and goals.

#### `task_name` (optional)

**Type:** String
Expand Down Expand Up @@ -439,6 +481,48 @@ This content will be substituted when the command is referenced.

### Frontmatter Fields (optional)

#### `id` (optional, standard field)

**Type:** String
**Purpose:** Unique identifier for the command. This field is metadata only and does not affect command matching or filtering.

**Example:**
```yaml
---
id: cmd-12345
---
```

**Note:** The `id` field is useful for tracking commands in external systems.

#### `name` (optional, standard field)

**Type:** String
**Purpose:** Human-readable name for the command. This field is metadata only and does not affect command matching or filtering.

**Example:**
```yaml
---
name: Database Setup
---
```

**Note:** The `name` field helps identify the command's purpose in documentation.

#### `description` (optional, standard field)

**Type:** String
**Purpose:** Description of what the command does. This field is metadata only and does not affect command matching or filtering.

**Example:**
```yaml
---
description: Sets up PostgreSQL database with authentication
---
```

**Note:** The `description` field provides context about the command's functionality.

#### `expand` (optional)

**Type:** Boolean
Expand Down Expand Up @@ -563,6 +647,48 @@ All frontmatter fields are optional and used for filtering.

**Standard fields for rules:**

#### `id` (optional, standard field)

**Type:** String
**Purpose:** Unique identifier for the rule. This field is metadata only and does not affect rule matching or filtering.

**Example:**
```yaml
---
id: rule-12345
---
```

**Note:** The `id` field is useful for tracking rules in external systems or for documentation purposes.

#### `name` (optional, standard field)

**Type:** String
**Purpose:** Human-readable name for the rule. This field is metadata only and does not affect rule matching or filtering.

**Example:**
```yaml
---
name: Go Implementation Standards
---
```

**Note:** The `name` field helps identify the rule's purpose in documentation and tooling.

#### `description` (optional, standard field)

**Type:** String
**Purpose:** Description of what the rule provides. This field is metadata only and does not affect rule matching or filtering.

**Example:**
```yaml
---
description: Standards and best practices for implementing Go code
---
```

**Note:** The `description` field provides context about what guidance the rule offers.

#### `task_names` (rule selector)

Specifies which task(s) this rule applies to. Can be a string or array. The field name is `task_names` (plural).
Expand Down
16 changes: 16 additions & 0 deletions examples/agents/commands/example-command-with-standard-fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: cmd-example-001
name: Example Command with Standard Fields
description: This command demonstrates the use of id, name, and description standard frontmatter fields
expand: true
---

# Example Command

This command demonstrates the new standard frontmatter fields:
- `id`: A unique identifier for the command
- `name`: A human-readable name
- `description`: A description of what the command does

These fields are metadata only and do not affect command matching.
Commands are still referenced using slash syntax like `/example-command-with-standard-fields`.
Loading
Loading