> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compozy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create & Publish

> Repository-based tasks are standalone projects that can be published and shared with other Compozy users. You can create tasks using YAML configuration files that define the task's metadata, schema, and execution flow.

<Warning>
  Unlike tools and agents which require implementation in TypeScript or Python, tasks are purely configuration-based using YAML files.
</Warning>

## Repository Structure

```
my-task/
├── manifest.yaml      # Task metadata and schema definitions
├── README.md         # Documentation
└── tasks/
    └── main.yaml     # Main task definition
```

## Manifest File

The `manifest.yaml` defines your task's metadata, configuration, and dependencies:

```yaml theme={"dark"}
type: task
name: content-processor
version: 1.0.0
license: MIT
description: Process and optimize content for various platforms
repository: https://github.com/your-org/content-processor
main: tasks/main.yaml

tags:
  - content
  - optimization
  - publishing

author:
  name: Your Name
  email: your.email@example.com
  organization: Your Organization

dependencies:
  tools:
    - image-optimizer@^1.0.0
    - text-analyzer@^2.0.0
```

## Task Configuration

The `tasks/main.yaml` file defines your task's execution flow and input schema. Note that outputs are handled by the executed components (tools, agents, or MCPs):

```yaml theme={"dark"}
tasks:
  - id: process_content
    type: basic
    use: tool(text-analyzer)
    schema:
      input:
        type: object
        properties:
          content:
            type: string
            description: "Content to process"
          format:
            type: string
            enum: ["markdown", "html", "text"]
            default: "markdown"
        required: [content]
    with:
      text: "{{ input.content }}"
      format: "{{ input.format }}"

  - id: optimize_content
    type: parallel
    use: tool(image-optimizer)
    config:
      max_concurrent: 3
    with:
      content: {{ tasks.process_content.output }}  # Output from the text-analyzer tool
      format: webp
```

## Publishing Process

<Steps>
  <Step title="Prepare Your Repository">
    * Initialize a GitHub repository
    * Set up CI/CD workflows for testing
    * Include comprehensive documentation in README.md
  </Step>

  <Step title="Validate">
    Ensure your task configuration is valid:

    ```bash theme={"dark"}
    compozy task validate
    ```
  </Step>

  <Step title="Version and Release">
    * Use semantic versioning (MAJOR.MINOR.PATCH)
    * Create GitHub releases with detailed changelogs
    * Tag releases (e.g., `v1.0.0`)
  </Step>

  <Step title="Submit to Registry">
    Once your task is ready for distribution:

    ```bash theme={"dark"}
    # Login to Compozy CLI
    compozy login

    # Submit your task
    compozy publish
    ```

    After submission, our team will review your task to ensure it meets our quality and security standards. You'll receive notifications about the review process and when your task is approved and listed in the registry.
  </Step>
</Steps>

<Note>
  Make sure your task follows these best practices:

  * Use semantic versioning for your task versions
  * Include comprehensive documentation in README.md
  * Define clear input/output schemas
  * Use environment variables for sensitive configuration
  * Follow the single responsibility principle
</Note>
