<!--
SPDX-FileCopyrightText: Amolith <amolith@secluded.site>

SPDX-License-Identifier: CC0-1.0
-->

# AGENTS.md

Go client library for the [Lunatask API](https://lunatask.app/api).

Copies of the API docs (uncommitted) are in `./docs/` with a thorough index at `./docs/index.md`. Reference them _often_.

## Commands

Run these most to least often

```bash
task fmt lint staticcheck test  # Important ones to runs often
task                            # Include vulnerability and copyright checks
```

## Duplicate Handling

Create methods return `(nil, nil)` when a matching entity already exists (HTTP 204). This is intentional API behavior, not an error:

```go
task, err := client.CreateTask(ctx, req)
if err != nil {
    return err // actual error
}
if task == nil {
    // duplicate exists, not created
}
```
