Skip to content

packaging-patterns

<!-- file: packaging-patterns.md — consumers: agents/sw-engineer.md (<oss_patterns> trigger) -->

From plugin
ai-rig
2425 skills25 agents2 MCP
Install
$ npx -y skills add Borda/AI-Rig --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

<!-- file: packaging-patterns.md — consumers: agents/sw-engineer.md (<oss_patterns> trigger) -->

Agent definition

packaging-patterns.md

<!-- file: packaging-patterns.md — consumers: agents/sw-engineer.md (<oss_patterns> trigger) -->

src Layout (mandatory for libraries)

mypackage/
├── src/
│   └── mypackage/
│       ├── __init__.py   # export public API + __all__
│       ├── _internal.py  # private, underscore-prefixed
│       └── module.py
├── tests/
├── pyproject.toml
└── README.md

Deprecation (mandatory for public API changes)

Use `typing_extensions.deprecated` (PEP 702) — verify project preference with maintainer or `oss:shepherd` (requires `oss` plugin) for full release patterns. Prefer dedicated library over raw `warnings.warn` — handles argument forwarding, "warn once" dedup, automatic call delegation.

**Key rules**: set `deprecated_in` + `remove_in`, add `.. deprecated:: X.Y.Z` Sphinx directive in docstring.

API Stability

  • Mark experimental APIs with `# experimental: API may change without notice`
  • Derive `__version__` in `__init__.py` from package metadata — `from importlib.metadata import version; __version__ = version("mypackage")`; pyproject.toml stays the single source of truth
  • SemVer: MAJOR.MINOR.PATCH — breaking changes only in MAJOR
  • Never remove public API without deprecation cycle spanning ≥1 minor release
  • **Rename with backward compat**: assign `OldName = NewName` as deprecated alias for one major cycle, then remove
Ships withai-rig

Specialist-agent infrastructure for Python/ML OSS — the scaffolding that lets you maintain at scale without becoming a full-time reviewer.

Get the whole plugin, auto-invoked
Stats
24
Stars
0
Views
3
Forks
Active
Maintenance
Python
Language
Apache-2.0
License
2d ago
Last commit
5mo ago
Created

Repo: Borda/AI-Rig

Other agents on ai-rig.