PayCargo · AI-Sandbox · Process

6.eSDK capability roadmap

The complete vibe-scripter-facing surface, designed up-front from engineering pattern recognition (per §21) rather than discovered piecemeal. Sixteen capability groups, sequenced across Phase A through Phase D. Each capability has a named API surface that survives consumer addition; consumers validate but rarely reshape.
Block: 6.e (Console doctrine extension) · Pins: §19 (two-tier), §21 (experience pre-shapes)
Roadmap

The full SDK surface area mapped against phases. Phase A delivers the foundation; B-C-D fill in as vibe apps 2-3+ land. Engineering team writes; vibe scripters consume.

1. The 16 SDK capability groups

#CapabilityVibe-scripter importPhase
1HTTP / Lambda shellimport { route } from 'vibecode-sdk';A
2Auth contextctx.user, ctx.groups, ctx.permissionsA
3State persistencectx.store.{threads,documents,keyValue,auditTrail,transient}A threads; B rest
4AI / Bedrockctx.agent.{invokeAgent,invokeWithTools,summarize,classify,extract}A streaming; C tools
5Audit / observabilityctx.audit.{emit,span,error}, ctx.metric()A
6Cost attributionauto via invokeAgent(); manual ctx.cost.track()A
7SoR helpers (user-context)ctx.{salesforce,github,monday,gitbook}B
8Async / queue / batchqueue.{enqueue,worker}, scheduled(), workflow()B
9Cross-app eventsevents.{emit,subscribe}C
10Email (SES-backed)ctx.email.send({ to, subject, template })B
11File handlingctx.upload.{beginMultipart,complete}, presigned URLs, CSV parsingB
12PII detection + lockboxaudit.detectPII(), lockbox.{store,reveal}A detector; B lockbox
13Time / IDsctx.{uuid,now,timezone,formatDate,formatRelative,parseUserDate}A
14Paginationpagination.cursor(), consistent across all store.*.list()A
15Validationvalidate.shape(input, schema) — lightweight JSON-shapeA
16Cachectx.cache.{get,set} with TTL; read-through for SoR callsB

Bonus capabilities (covered by their own Step doc but consumed via SDK):

CapabilitySourcePhase
Charts (SVG, design tokens)vibecode/sdk/v1/charts/A
Diagrams (interactive)vibecode/sdk/v1/diagrams/ (promoted from diagram-process)A
Streaming chat UXvibecode/sdk/v1/spa/streaming-message.jsA
WebSocketsvibecode/sdk/v1/spa/socket.js, vibecode/sdk/v1/lambda/socket.tsStep 6.b — built on demand
Multi-step agents / tool usectx.agent.invokeWithTools()C

2. Phase A deliverables — what ships this week

Phase A's SDK foundation:

Phase A chatbot consumes everything above. Vibe app 2's first day of Phase B starts with Phase A's complete SDK already in production.

3. The vibe-scripter handler shape

Reference target — what a chatbot handler looks like at end of Phase A:

// cartridges/engineering/chatbot/handler.js
import { route, agent, store } from 'vibecode-sdk';

export default route({
  'GET /api/threads': async (req, ctx) =>
    await ctx.store.threads.list(ctx.user.id),

  'POST /api/threads': async (req, ctx) => {
    const threadId = ctx.uuid();
    return await ctx.store.threads.put(ctx.user.id, threadId, {
      title: 'New conversation', messages: [],
    });
  },

  'POST /api/threads/:id/messages': async (req, ctx) => {
    const { content } = req.body;
    const thread = await ctx.store.threads.get(ctx.user.id, req.params.id);
    thread.messages.push({ role: 'user', content });

    return ctx.stream(
      agent.invokeAgent({
        model: 'claude-haiku-4-5',
        messages: thread.messages,
        attribution: { app: 'chatbot', purpose: 'user_chat', threadId: req.params.id },
      }),
      async (fullResponse) => {
        thread.messages.push({ role: 'assistant', content: fullResponse });
        await ctx.store.threads.put(ctx.user.id, req.params.id, thread);
      },
    );
  },
});

~25 lines. No BedrockRuntimeClient, no DynamoDBDocumentClient, no aws-jwt-verify, no CognitoIdentityProviderClient. The SDK does it all.

4. SDK velocity curve (per §21)

The compounding-interest shape applied to platform development:

PhaseVibe code per appNew SDK code per appCumulative SDK
A (chatbot)~50 lines~500 lines~500
B (Sales reports)~50 lines~100 lines~600
C (vibe app 3)~50 lines~30 lines~630
D (apps 4-10)~50 lines each~10 lines each on average~700

By Phase D, new vibe apps ship with virtually no engineering work because every common need has already been encountered by an earlier app and turned into SDK surface.

5. Doctrine

Step 6.e doctrine: "The SDK is the platform's compounding investment."

Every helper written for vibe app 1 removes friction from vibe app 2. Every helper added for vibe app 2 removes friction from vibe apps 3 through N. The platform's quality at year one reflects the engineering team's discipline at design time, and the SDK's velocity-per-app curve is asymptotic toward zero. Discipline today is leverage tomorrow.