Publishing Guide
Publishing Guide
Section titled “Publishing Guide”This monorepo publishes agent-detective (operator CLI) and @agent-detective/* workspace packages to npm using release-please and Conventional Commits.
Package overview
Section titled “Package overview”| Package | npm name | Role |
|---|---|---|
| Root app | agent-detective | Operator CLI (npm i -g agent-detective) |
packages/types | @agent-detective/types | Host-internal types (re-exported via SDK) |
packages/sdk | @agent-detective/sdk | Plugin-author SDK |
packages/observability | @agent-detective/observability | Logging, metrics, health |
packages/process-utils | @agent-detective/process-utils | Process helpers |
packages/local-repos-plugin | @agent-detective/local-repos-plugin | Local repos plugin |
packages/jira-adapter | @agent-detective/jira-adapter | Jira adapter |
packages/linear-adapter | @agent-detective/linear-adapter | Linear adapter |
packages/pr-pipeline | @agent-detective/pr-pipeline | PR pipeline plugin |
Apps under apps/* are private and are not published.
All publishable packages share one linked version (see release-please-config.json).
Prerequisites
Section titled “Prerequisites”- npm account with publish access to
agent-detectiveand@agent-detective/* - 2FA on npm (recommended)
- npm Trusted Publishing (OIDC) configured for this GitHub repo (see .github/workflows/release-please.yml —
id-token: write,--provenance) - Commits on
mainfollow Conventional Commits (husky + commitlint)
Day-to-day workflow (maintainers)
Section titled “Day-to-day workflow (maintainers)”- Merge feature PRs to
mainusing Conventional Commit messages, for example:feat(jira): add OAuth refresh retryfix(cli): init refuses invalid agent idchore: update turbo
- release-please opens or updates a Release PR (
chore: release X.Y.Z) with version bumps, changelogs, and lockfile updates. - Merge the Release PR when ready to ship.
- On merge, .github/workflows/release-please.yml:
- Creates the GitHub Release + tag
- Runs lint, typecheck, test, build
- Runs
pnpm publish -r --access public --provenance
Manual trigger: Actions → release-please → Run workflow (same publish path when a release is created).
Configuration files
Section titled “Configuration files”| File | Purpose |
|---|---|
| release-please-config.json | Release types, linked-versions group, node-workspace plugin |
| .release-please-manifest.json | Current version per package path |
| commitlint.config.js | Conventional Commit rules |
| .husky/commit-msg | Runs commitlint on each commit |
src/version.ts includes an // x-release-please-version marker so the root CLI version stays in sync.
Pre-release checklist (manual smoke)
Section titled “Pre-release checklist (manual smoke)”pnpm run lintpnpm run typecheckpnpm testpnpm run build && pnpm run build:appnpm pack # optional: inspect tarball at repo rootFor external plugin developers
Section titled “For external plugin developers”Wiring a published package into a running app is covered in extending-with-plugins.md.
Installing the SDK
Section titled “Installing the SDK”npm install @agent-detective/sdk# orpnpm add @agent-detective/sdkWorkspace vs published versions
Section titled “Workspace vs published versions”Inside the monorepo, dependencies use workspace:*. On publish, pnpm replaces those with concrete semver versions.
Troubleshooting
Section titled “Troubleshooting”Publish failed in GitHub Actions
Section titled “Publish failed in GitHub Actions”- Confirm Trusted Publishers on npm match this repo and workflow.
- First publish of scope
@agent-detective/*may requireaccess: public(already set viapublishConfig). - Check the workflow log for
pnpm publisherrors (missingdist/, auth, or duplicate version).
Release PR did not open
Section titled “Release PR did not open”- Commits since the last release must use Conventional Commit types (
feat,fix,chore, …) that release-please recognizes. - Check the release-please Action log on
main.
commitlint rejected my commit
Section titled “commitlint rejected my commit”Use messages like type(scope): subject — e.g. docs: fix installation link.
Operators
Section titled “Operators”End users install npm i -g agent-detective. See installation.mdx and releasing.md.