Dist-Zilla-Plugin-Docker-API
view release on metacpan or search on metacpan
# CLAUDE.md
Repo-specific guidance for Claude Code working on
`Dist::Zilla::Plugin::Docker::API`.
## The 12 Rules
These are the operating rules for this repo. They inherit from the global
and workspace `CLAUDE.md` â what's listed here is the authoritative set
for this distribution.
1. **Use `mcp__serper__google_search` or `mcp__firecrawl__firecrawl_search`**
over `WebSearch` for any web lookup.
2. **Use `mcp__firecrawl__firecrawl_scrape`** over `WebFetch` for fetching
page content.
3. **Use `context7` for library docs** (CPAN, npm, etc.) â *except* this
distribution itself. For `Dist::Zilla::Plugin::Docker::API` always read
the local source under `lib/`, never context7.
4. **Untracked files that are not in `.gitignore` belong in the commit.**
`.gitignore` is the source of truth. Only obvious secrets
(`.env`, credentials) are excluded â and even then warn, don't silently
drop them.
5. **Auto-Memory is for personal/user preferences only.** Project
conventions belong in this `CLAUDE.md` or in a skill, never in
auto-memory.
6. **Perl edits go to a `dzil-docker-*` agent**, which gets
`getty-perl-core` and the object-system skills force-loaded via
`briefing.skills`. If you are editing Perl without that briefing, load
`getty-perl-core` first. See Delegation below.
7. **`use Module;` to load modules.** Only use `require` when there's a
real runtime reason (lazy plugin loading, optional deps), not just to
defer cost.
8. **`->instance` for `MooX::Singleton` / `MooseX::Singleton` classes.**
`->new` for everything else.
9. **A Getty-authored dependency may be pinned to its next, unreleased
version.** This workspace tests its distributions together from their
working trees, so `cpanfile` is allowed to name a version that is not
on CPAN yet â `requires 'API::Docker', '0.003';` while CPAN is still
at 0.002 is deliberate, not a slip. Two things follow, and both are
binding: nothing is released before everything it depends on has been
released, and `cpanm --info Module::Name` is what tells you where CPAN
actually stands before you assume a pin is satisfiable for anyone
outside this machine.
10. **Pin every Getty-authored dependency** in `cpanfile` â to the
released version, or to the coming one when the change spans both
repos.
11. **The version in `lib/Dist/Zilla/Plugin/Docker/API.pm` is the NEXT
release.** What's currently on CPAN is the previous tag. `dzil
release` bumps the version automatically â never bump it by hand
before a release.
12. **`{{$NEXT}}` in `Changes` is the placeholder for the upcoming
release.** Add entries under it as you change behavior; `dzil
release` replaces it with the version + timestamp.
## What this plugin is
A Dist::Zilla plugin that builds and (optionally) pushes Docker images
as part of the `dzil build` / `dzil release` cycle, using
[`API::Docker`](https://metacpan.org/pod/API::Docker) â no shell-outs
to the `docker` CLI.
## Layout
```
lib/Dist/Zilla/Plugin/Docker/API.pm # main plugin (Moose)
lib/Dist/Zilla/Plugin/Docker/API/Client.pm # API::Docker adapter (Moo)
lib/Dist/Zilla/Plugin/Docker/API/Result.pm # build/push result object (Moo)
lib/Dist/Zilla/Plugin/Docker/API/TagTemplate.pm # %-expansion (Moo)
t/ # tests
t/lib/ # Recorder / Unreachable client fakes
```
`API.pm` is Moose because `Dist::Zilla::Role::Plugin` is; the three helper
( run in 1.484 second using v1.01-cache-2.11-cpan-007c89162af )