Thanks for helping improve ap-sdk — write an agent plugin once, ship it to
every harness. This guide covers local setup, conventions, adding a harness, and
the release flow. For agent-facing rules, see AGENTS.md.
A pnpm + Turborepo monorepo:
| Path | Package | Notes |
|---|---|---|
packages/agent-plugin-sdk/ |
@jalco/ap-sdk |
the SDK + ap-sdk CLI (published) |
apps/docs/ |
@jal-co/docs |
the docs site (private) |
scripts/tegami.mts |
— | release configuration |
The npm package is @jalco/ap-sdk; the CLI binary is ap-sdk. The project,
brand, and GitHub repo are agent-plugin-sdk (org jal-co).
Requires Node 24+ and pnpm (the repo pins a version via packageManager).
pnpm install
pnpm turbo buildUseful commands:
pnpm --filter @jalco/ap-sdk test # run the SDK tests
pnpm --filter @jalco/ap-sdk test:watch # watch mode
pnpm --filter @jal-co/docs dev # docs site at localhost:3000
node packages/agent-plugin-sdk/dist/cli.js --help # the built CLIBefore every commit, this must pass:
pnpm turbo typecheck test lint buildNever mark work done with failing tests, a partial implementation, or unresolved errors. CI runs the same gate on every push and pull request.
Both are enforced locally (husky hooks) and in CI (the commit-check action):
- Commits follow Conventional Commits:
type(scope): summary— e.g.feat(gemini): add command translation,fix: handle null tool result. A!orBREAKING CHANGE:footer signals a breaking change. Subject ≤ 80 chars, imperative, lowercase after the colon. - Branches follow Conventional Branch:
type/short-description— e.g.feat/add-acme-harness,fix/install-paths. - Never commit directly to
main. Branch → verify → open a PR.
A harness is one target agent. The full guide —
the capability map, native emit, and install paths — is in the docs:
Authoring a harness. In short:
- Scaffold a working starter:
(or
node packages/agent-plugin-sdk/dist/cli.js add-harness acme --name "Acme Agent"npx ap-sdk add-harness …). Put built-in harnesses inpackages/agent-plugin-sdk/src/harnesses/. - Declare
supports— the capability map is the single source of truth. Anything leftfalsedegrades to a structured warning, never a broken file. - Implement
emitas a pure translator using the shared emit helpers, and point the install paths at the agent's real directories. - Research the native format first — confirm each harness's real paths and frontmatter against its official docs. Never guess; fail loudly if unsure.
- Register it. For a built-in, add it to
harnesses/index.ts; the support matrix, CLI, and docs pick it up automatically. - Add tests asserting the emitted paths and frontmatter (mirror an existing harness's test), and run the verify gate.
Releases run through Tegami. Any user-facing
change to @jalco/ap-sdk ships with a changelog file under .tegami/:
---
packages:
"@jalco/ap-sdk": minor
---
## Short, user-facing title
What changed and why.- Bump type follows SemVer: a feature is
minor, a fix ispatch, a breaking change ismajor(seeAGENTS.mdfor the exact criteria). - Heading depth can set the bump (
#major,##minor,###patch). - Don't hand-edit
package.jsonversions, the publish lock, orCHANGELOG.md— Tegami owns them. On merge tomain, CI opens a Version Packages PR; merging that publishes to npm and cuts the GitHub release.
- Open as a draft while in progress; mark ready once the verify gate passes.
- Keep PRs focused and under ~400 lines where reasonable; don't bundle unrelated changes. Include a short what / why / how / testing, and screenshots for any docs-site UI change.
- Feature branches squash merge; delete the branch after merge.
- Resolve all conflicts before review; don't self-approve.
Open a GitHub issue with a minimal repro (a small plugin.ts and the command
you ran) and the actual vs. expected output. Security concerns: please report
privately rather than in a public issue.