Files
yetano-clients/AGENTS.md
T
terminarandClaude Opus 5.5 6a97dbd4c6 Shared Atlassian clients: atlassian/jira and atlassian/confluence
New library module yetano.dev/yetano/yetano-clients (owner decision
2026-11-01) replacing the three own Jira clients in yareco, yabaratla
and yamcp:

- atlassian: Options, Auth (api_token, basic, bearer/pat, cookie),
  Deployment (Cloud/Data Center), TLS, APIError and sentinel errors.
- atlassian/internal/transport: retry with backoff on 5xx/connection
  errors, shared adaptive 429 throttle honouring Retry-After (from
  yabaratla/yareco), CA file, proxy, cross-host redirect hardening,
  response cap (from yamcp), startAt pagination, file downloads.
- atlassian/jira: typed reads (projects, versions, fields, issues,
  comments, changelog, editmeta, transitions), JQL search on Cloud
  (/search/jql) and Data Center, classic search pages, issue writes,
  ADF/plain-text bodies per deployment, custom-field helpers.
- atlassian/confluence: small content API client (CQL search, pages,
  spaces, current user, create/update page with version check,
  comment, label), taken over from yamcp.

Standard library only; tests against httptest servers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:11:00 +01:00

2.0 KiB

AGENTS.md

Guidance for anyone (human or coding agent) working on yetano-clients. The meta-repository's AGENTS.md (../AGENTS.md) applies as well; this file only adds what is specific here. User-facing docs are in README.md, open work in TODO.md.

What this is

A library module, yetano.dev/yetano/yetano-clients, imported like core: no main, no Makefile publish, no internal/version, no Yetanofile. A release is a git tag (vX.Y.Z); consumers reach a change only through a new tag. Never force-move a tag.

Checks

make        # gofmt check, go vet, go test -race, govulncheck

Tests use httptest servers only -- never a live Atlassian site.

Rules

  • Standard library only. A new dependency needs a real reason.
  • atlassian/internal/transport owns everything HTTP: auth, TLS, proxy, redirects, retries, the 429 throttle, pagination, downloads. jira and confluence build requests and decode answers, nothing more. Public configuration and error types live in atlassian.
  • Credentials are never logged and never put into an error. Redirects to another host drop them.
  • No program-specific behaviour: no localized messages, no config-file knowledge, no output shapes for a particular tool. Those stay in the consuming program (yareco's internal/jirautil, yamcp's error mapping).
  • Every call takes a context.Context, and every wait (backoff, Retry-After, throttle, APIDelay) ends when it is cancelled.
  • Cloud and Server/Data Center differ in API prefix and body encoding; keep that switch inside the client (APIPrefix, TextBody), never in the caller.
  • An unexpected answer is an error, never an empty result (ErrNotJSON, OptionValues/SprintValues on an unknown shape).
  • Comments explain why, not what. Every exported identifier has a doc comment.

Consumers

yareco, yabaratla, yamcp (all in the yetano meta-repository). A breaking API change needs a new minor version and the consumers bumped in the same wave.