AGENTS.md

 1<!--
 2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
 3
 4SPDX-License-Identifier: CC0-1.0
 5-->
 6
 7# AGENTS.md
 8
 9Go client library for the [Lunatask API](https://lunatask.app/api).
10
11Copies of the API docs (uncommitted) are in `./docs/` with a thorough index at `./docs/index.md`. You can also check Context7 with `/websites/lunatask_app_api`. Reference them _often_. 
12
13## Commands
14
15Run these most to least often
16
17```bash
18task fmt lint staticcheck test  # Important ones to runs often
19task                            # Include vulnerability and copyright checks
20```
21
22## Duplicate Handling
23
24Create methods return `(nil, nil)` when a matching entity already exists (HTTP 204). This is intentional API behavior, not an error:
25
26```go
27task, err := client.NewTask("Review PR").Create(ctx)
28if err != nil {
29    return err // actual error
30}
31if task == nil {
32    // duplicate exists, not created
33}
34```