Lauren Tan ships about 2,000 pull requests a month using pstack - her open-source set of agent skills for rigorous engineering. This project converts it, piece by piece, for a platform she never targeted: a governed, multi-tenant cloud with governor limitsGovernor limitsHard per-transaction caps Salesforce enforces on a shared runtime - queries, rows, CPU time, heap. Breach one and your transaction is killed on the spot., metadata deployments, and a mandatory test gate. Same discipline, rebuilt around Salesforce reality, and grounded in Salesforce Well-ArchitectedWell-ArchitectedSalesforce's own framework for healthy solutions, organized around three capabilities: Trusted, Easy, Adaptable - with prescriptive patterns and anti-patterns..
pstack asks you to build two things: a control CLI so agents can drive your app, and disposable environments so agents can work in parallel. Salesforce already ships both - the sf CLI and scratch orgs. What is missing is the skill that wires them together, and the discipline tuned to a governed runtime.
In Part 1 of her guide, Lauren's core lesson is that verification is everything: the agent must be able to check its own work - run the app, click through it, read logs - or the human stays the bottleneck. To get there on a normal app you invest heavily: a scriptable control CLI, reproducible environments, a feature map. Her advice for parallelism in Part 2 is fleets of cloud agents, each with a real machine.
A Salesforce team starts further ahead than almost anyone: the sf CLI already launches environments (scratch orgs), drives data and logic (sf data, sf apex run), observes behavior (debug logs, test results, deployment reports), and tears everything down. Scratch orgs are the disposable parallel machines - ephemeral, source-tracked, scriptable. The platform even ships the discipline problem: you cannot be sloppy here, because the runtime kills sloppy work automatically (governor limits, below). sfstack's job is to convert pstack's skills so they speak this platform's language.
Four platform facts change how agents must work: limits you cannot catch, a runtime you do not control, deployments that are metadata transactions, and tests that are a legal gate for shipping.
1. Governor limits are uncatchable. Salesforce runs your code in a shared, multi-tenant runtime and caps every transaction: queries, rows, DML, CPU time, heap. Breach a cap and the transaction dies instantly with System.LimitException - and here is the part that changes agent behavior: you cannot try/catch it. There is no recovery path, no graceful degradation, no "handle the error." The only winning strategy is never getting near the limit. So where pstack teaches agents to verify after building, sfstack also teaches them to budget before building: bulkify everything (operate on collections, never one record at a time), write selective queries, and probe headroom with the Limits class while verifying.
2. You never control the runtime. There is no local server to run, no process to attach a debugger to, no host to install tools on. Logs exist only when someone enabled them (trace flags) and are volume-capped. Verification on Salesforce means: deploy to a real org and observe what the platform lets you observe. This is why the control layer matters more here, not less.
3. Deployments are metadata transactions, and tests are the gate. You do not "restart the app" - you deploy metadata (Apex, objects, Flows, all as XML source) into an org, asynchronously. Production deployments are legally blocked until at least 75% of your Apex is covered by passing tests. Salesforce even gives you the rehearsal: sf project deploy validate runs the full deployment analysis plus tests without committing anything. In sfstack, that validate run becomes the pre-merge proof every agent attaches to its work.
4. Metadata is the code. A record-triggered Flow is code that runs inside your transaction. Well-Architected says it plainly: don't use org-based development - adopt source-driven development with the Salesforce CLI. So sfstack treats Flows, validation rules, and objects with the same rigor as Apex: reviewed, tested, version-controlled, blast-radiused before change.
Numbers from the official Execution Governors and Limits doc (read September 11, 2026). Sync / async columns: asynchronous Apex (batch, queueable, future) gets a bigger budget on some limits - one reason sfstack has an "async for volume" principle.
pstack Part 1 tells you to build a control CLI and rent cloud agents. On Salesforce both already exist: the sf CLI is the control layer, and scratch orgs are the disposable fleet.
Gift one: the sf CLI is a ready-made control CLI. Lauren has agents build a small command-line tool to drive the app - launch it, interact, observe, clean up. The sf CLI covers all four jobs against real orgs. sfstack's verification skills are built from these commands, grouped exactly the way pstack groups its control CLI:
Gift two: scratch orgs are pstack's cloud agents. When Lauren wants parallelism, she spins up cloud agents on rented machines. A Salesforce agent spins up scratch orgs: ephemeral orgs created from a definition file, source-tracked, deletable with one command, living up to 30 days. Every parallel agent gets its own throwaway org - deploy the branch, run the experiment, capture evidence, delete. No worktrees eating your laptop, no shared sandbox everyone trips over.
The punchline architects appreciate: the platform governor-limits the harness itself. Your DevHub caps how many scratch orgs you can create per day, so sfstack's swarm and arena skills budget org creation before fanning out - the same prevent-don't-catch thinking, one level up.
Sources: Salesforce CLI Command Reference, Scratch Orgs - Salesforce DX Guide.
pstack's loop - change, drive the app, check, repeat - becomes: change, validate (check-only deploy + tests), deploy to a scratch org, run Apex tests, drive the real UI, capture proof. Tests alone are not verification; the agent runs the behavior for real.
Lauren's blunt rule: a task is verified only when the agent actually ran the code and saw it work - tests alone do not count. Salesforce makes that rule natural to keep, because its tests are already the deployment gate, and its scratch orgs make the "real run" cheap. The loop below is what sfstack's verify-<project> skill (generated by /sf-create-verification-skill) automates per project. Press run and watch who does the checking.
In the "without" world every check routes through a human: deploy by hand, click around, read the error, repeat. In the "with" world the agent rehearses the deployment (validate), proves behavior in a scratch org, attaches the evidence (deployment ID, test-run ID, screenshots, log excerpts), and only then asks for review. Your job moves from checking work to reviewing proof - and the proof has IDs, so you can re-run it.
What the Salesforce version adds to pstack's loop: the validate step (the platform's own rehearsal), governor-limit telemetry in the evidence (SOQL counts, heap, CPU at realistic volume - "it passed" without numbers is not proof at volume), and cleanup that deletes the org but keeps the evidence.
Verified against the live pstack repo (cursor/plugins, September 2026): 20 core skills ported and adapted, 1 new Salesforce skill added, 4 deliberately not ported, all 23 engineering principles vendored as files, 8 Salesforce-native principles added, 23 playbooks distilled to 10. Nothing dropped silently - the skips are named with their reasons.
A conversion you can't audit is just a rebrand. The table below is the complete inventory: every skill in the upstream repo and where it landed in sfstack. Filter it, search it, check the counts - the repo's README carries the same table.
pstack's 23 engineering principles carry over untouched - and ship vendored inside the repo, so a clean sfstack install has them as real files. These eight are new - each one is a Salesforce platform rule the agent applies while it works, and each is grounded in Well-Architected or the Apex docs. Click a card to flip it.
These are not style preferences. Every one traces to a named platform behavior: the uncatchable LimitException, the 75% deploy gate, the recursive order of execution, per-org record IDs, the system-mode default in Apex. An agent that internalizes these stops producing the classic Salesforce failure shapes - the trigger that dies at 101 records, the flow that breaks the data load, the integration that leaks records because nobody chose a sharing mode.
sfstack's rules are not invented - they are Salesforce's own framework, made executable by agents. Trusted, Easy, Adaptable: each pillar has patterns sfstack turns into checks the agent runs, not posters on a wall.
The deepest alignment is philosophical. Well-Architected's anti-pattern tables describe how Salesforce solutions get sick; pstack is a system for keeping engineering healthy at agent speed. sfstack fuses them: the /sf-interrogate skill ships the Well-Architected pattern/anti-pattern checklists as a reference file, so every adversarial review literally runs the framework's own criteria against the diff. Architects don't have to trust the conversion - they can watch the agent apply Salesforce's own document.
Framework: Salesforce Well-Architected - Trusted, Easy, Adaptable. Pattern tables cited from the Reliable, Automated, and Resilient guides (read September 11, 2026).
A conversion that hides its seams is marketing. These are the four places where Salesforce genuinely pushes back, and the three adjacent efforts this builds alongside.
Limitation 1 - the UI is the hard part. pstack's home turf is an Electron app with a debug port. Lightning is a session-gated web app on someone else's cloud: driving it means browser automation with a session URL from sf org open --url-only (Salesforce's own UTAM exists for exactly this, and LWC logic gets Jest tests). It works, but it is the weakest link in the loop, and sfstack says so inside its own skills.
Limitation 2 - the platform caps the harness. DevHubs limit daily scratch org creation; orgs cap daily async executions and API calls. Fleets are budgeted resources here, not infinite ones. sfstack's swarm and arena skills check the budget first - but physics is physics.
Limitation 3 - managed packages are partially opaque. Their code is hidden, their automations still spend your transaction's CPU budget, and the dependency graph cannot see everything (dynamic references, reports, integrations). sfstack's blast-radius skill names what it cannot see instead of pretending completeness.
Limitation 4 - async testing has sharp edges. Future/queueable/batch only run inside Test.startTest/stopTest, tests are data-isolated by default, and setup-DML rules trip newcomers. sfstack encodes these as rules, but an agent (or human) new to the platform should expect a learning curve.
Prior art, deliberately built alongside, not duplicated: Salesforce's own sf-skills repo (curated agent skills for Apex, Flow, LWC generation - complementary: it teaches agents to produce Salesforce artifacts, sfstack is the verification and discipline layer around them), the official Salesforce Development plugin for Claude, and Salesforce's agent skills & plugins hub. And credit where it is due: Lauren Tan's pstack is the blueprint - this is a conversion of her ideas, unaffiliated, MIT-licensed like the original. Her Part 3 is announced but not yet published; when it lands, this conversion gets a matching update.
One repo, 52 skills + 10 playbooks, MIT - self-contained: the 23 upstream pstack principles are vendored in, so a clean install needs nothing else. Works with any tool that supports the Agent Skills spec - Claude Code, Cursor, Codex, OpenCode.
The repo: github.com/krika2810/sfstack. Everything on this site - the mapping, the principles, the Well-Architected checklists - lives there as runnable skill files, not just prose. Fork it, improve it, make it yours (that is Lauren's invitation on pstack too; MIT both times).