Imported from MonetizeKit/examples (
AGENTS.md). Install upstream withnpx skills add MonetizeKit/examples. Copyright stays with the author.
AGENTS.md
Project overview
Official runnable MonetizeKit integration examples, kept aligned with the
latest SDKs by CI. pnpm workspace: saas-taskflow/ (full SaaS lifecycle),
agent-ops/ (agent entities, metering, credits), node-server/
(@monetizekit/node), nextjs/ (@monetizekit/react widgets). e2e/ holds
the Playwright lifecycle gate that drives the deployed TaskFlow and AgentOps
apps against the live API (Delivery).
Commands
pnpm install --frozen-lockfilepnpm typecheck,pnpm lint,pnpm buildpnpm sdk:latestre-pins every example to@monetizekit/*@latest(.github/workflows/sdk-alignment.ymldoes this daily and opens a PR)pnpm test:e2e(needs live credentials;.github/workflows/e2e.ymlruns it nightly against Delivery)pnpm sweep:demoremoves demo customers the E2E created
Conventions
- Examples are copy-paste friendly: each package stands alone with its own
package.jsonand README; no shared internal helpers. - Every example demonstrates the purchasing gate (entitlement or credit check that allows or blocks access) and is exercised by the lifecycle E2E.
- E2E test data is unique per run and cleaned up; reruns must be idempotent.
Verifying your work
$ pnpm typecheck
Scope: 4 of 5 workspace projects
node-server typecheck: Done
nextjs typecheck: Done
agent-ops typecheck: Done
saas-taskflow typecheck: Done
$ pnpm lint
agent-ops lint: Done
saas-taskflow lint: Done
nextjs lint: Done
SDLC and promotion chain
- Branches:
feature/*-> PR ->development->delivery->main. Feature PRs targetdevelopment. Promotion between stages is a promotion PR from the upstream stage branch (development -> delivery,delivery -> main); where this repository has.github/workflows/promote.yml, that workflow opens it when the stage gate is green, anddelivery -> mainis always merged by a human. Never open a feature PR againstmainordelivery. - Every PR must pass the
Required Checks Gatejob in.github/workflows/ci.yml. TheShadow Review (advisory)job posts a model review comment; it never blocks. React with a thumbs-down to dismiss a finding. - Agent roles, model IDs, tools and autonomy for the whole fleet are declared in
MonetizeKit/.github/agent-policy.json. Never hardcode a model ID in this repository. - Conventional commits (
feat:,fix:,chore:, ...). Position and status live in Linear (teamMK); reference the issue key in the PR body when one exists. - The fleet-wide plan is
docs/engineering/ai-native-sdlc-plan.mdin the monorepo.