Skip to content

Claude Code

Two approvals per feature: Pragma’s Claude Code iOS pipeline

8 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: github.com

Pragma, an iOS scaffold that iOS lead engineer Akshay Pimprikar released on August 19, asks the engineer to make two decisions per feature: approve the spec and approve the plan. After that, Claude Code agents and GitHub Actions take the work through implementation, checks, review, tests and release. His evidence is FinanceTracker, a production SwiftUI and SwiftData app he built on the pipeline from its first commit. It now has 94 merged PRs, and specs and plans go back to the start of the history.

The project’s GitHub README describes three layers that each work on their own: 15 slash commands in .claude/commands/, three GitHub Actions workflows, and support scripts for picking a simulator and enforcing coverage in CI. You can take all three or just the commands. The recommended install runs inside Claude Code as a plugin: /plugin marketplace add akshaypimprikar/pragma, then /plugin install pragma@pragma, then /pragma:init MyApp.

Where the two approvals sit

The pipeline starts with /spec "feature idea". It proposes two or three approaches, you pick one, and the result is saved as a spec document. /plan turns the approved spec into an implementation plan, one task at a time. Those are the two points where a human signs off. In the README’s flowchart they are the only nodes in amber.

/feature then executes the plan under strict test-driven development. For each task the agent writes a failing test and checks that it fails for the right reason, writes the minimal code to pass it, runs the full suite to catch regressions, and commits. Each task gets its own commit, with no batching, and the agent does not start the next task while tests are red.

/gates runs before a PR opens. It checks the build, the full test suite and architecture compliance, plus a list of smaller maintainability items: leftover TODO/FIXME markers, branch naming, the CHANGELOG, coverage, and what the README calls “abstraction bloat”. Once the PR is open, /review checks it for architecture compliance and posts its verdict as an actual GitHub review. /test writes tests for the branch, and only after /review reports APPROVED. /pr-followup runs both in sequence as soon as the PR appears. After the merge to develop, /release 1.0.0 bumps the version, writes the changelog, opens a PR to main and tags the release.

Bugs take a shorter route: /bugfix "description" writes a regression test first and then the fix, followed by /gates, a PR and /review. The six utility commands cover the rest. /design sets visual design tokens before a UI spec. /parallel-review runs the architecture checklist alongside code-review:code-review on the branch diff. /pipeline-review audits the pipeline itself for drift. /status reconstructs where work stands so you can resume a session. /trim-context prunes accumulated context once a plan is finished, and /sync-workflow brings the scaffold in line with the project’s latest conventions.

Some of these names are already taken in Claude Code. It has a built-in /plan that puts the session into plan mode before changes are made, and a bundled /code-review skill with /review as its alias. Pragma’s versions do different jobs: its /plan takes a spec file path, and its /review works from a project-specific architecture checklist.

What CI enforces

Pimprikar’s main argument for a separate scaffold is that every check runs twice. /gates runs locally for fast feedback. Then pr-checks.yml and ui-tests.yml re-run the checks in GitHub Actions on every PR to develop or main. In his words, that enforcement “can’t be skipped by rerunning the agent with a different prompt.” pr-checks.yml runs unit and integration tests. ui-tests.yml runs UI tests and also fires on pushes to either branch. release.yml triggers on a tag matching v*.*.*, runs the full suite in the Release configuration and creates a GitHub Release.

Coverage is where the two layers stop matching. /test aims for at least 80% coverage on new code. pr-checks.yml fails a PR only below 60% and just warns between 60% and 80%. So the CI floor, the layer the README says can’t be bypassed, is 20 points below the bar the agent sets for itself.

The checks that don’t depend on an agent’s judgement are also packaged as a standalone skill, deterministic-pr-gates, which works in projects that don’t use the rest of the pipeline. It covers build, tests, coverage, branch naming and layer rules. The README says every gate in it “is a real command with a pass/fail outcome, none of it asks an LLM to judge the diff.”

App Store distribution is a manual step for now. A TestFlight upload stage is written out but commented out in release.yml, labelled Phase 2. Turning it on requires an Apple Developer Program membership, a distribution certificate and an App Store Connect API key, and the commented block shows what to add.

Memory in four files

The second argument is persistence. Pragma keeps four files in .claude/context/: invariants.md for rules no agent may override (the README’s examples are architecture and money types), decisions.md for each spec decision with the approach chosen and why, feature-log.md for every shipped feature, and rejections.md for approaches that were tried and ruled out, with reasons. Every agent reads these files before it acts. The aim, in the README’s words, is for the pipeline to carry what a senior engineer would remember: “constraints, past decisions, and dead ends.”

The two install paths differ in how they fill these files. Both copy the commands, context files, workflows and scripts, and substitute your app name. /pragma:init also interviews you about architecture and key constraints, then writes the answers into CLAUDE.md and seeds invariants.md from them. The git clone plus ./scripts/setup.sh MyApp /path/to/your-ios-project route leaves both as templates for you to fill in. The README is firm that invariants.md should be populated before the first /feature run. For comparison, Claude Code’s own /init generates a starter CLAUDE.md, and /memory edits it and the auto-memory notes.

Installing through the plugin has a running cost that the Claude Code plugin docs spell out: an enabled plugin is part of every session, and the name and description of each skill, agent and command Claude can invoke on its own sit in context on every turn and count toward usage. The full text loads only when it is used.

Why not a spec mode?

The README addresses this question head-on and lists Cursor’s Plan Mode, Windsurf’s Cascade, GitHub Copilot workspace, GitHub Spec Kit and BMAD-METHOD as tools that already ship some form of spec-driven development. According to Pimprikar, those generate a plan but don’t add “an enforcement layer the agent itself can’t talk its way around,” and most of them reset context at the end of a conversation. He also says plainly where they fit: “None of this makes the built-in spec modes bad — they’re a reasonable default for teams already inside that IDE.”

He frames the design with Martin Fowler’s April 2026 essay “Harness Engineering for Coding Agent Users,” which treats an agent as model plus harness and splits the harness into feedforward guides, which steer the agent before it acts, and feedback sensors, which check the result afterwards. In Pragma, /spec and /plan are the guides. /gates is the maintainability sensor, /review covers architecture fitness, /test covers behavioural correctness, and /bugfix is the recovery loop. Fowler called that behavioural sensor “the elephant in the room — still unsolved” for most agent harnesses. The README presents /test and the coverage gate as Pragma’s “concrete attempt” at it.

Assumptions baked in

The defaults suit one kind of app, and you override them in CLAUDE.md. They are MVVM with a Repository layer (no business logic in views; ViewModels depend on protocols, never concrete types), SwiftData for persistence with no SwiftData imports in Domain Services, Swift Testing (@Suite, @Test, #expect()) for unit and integration tests, and XCUITest for UI. The scaffold also relies on Xcode 16’s PBXFileSystemSynchronizedRootGroup, which compiles files placed in the right directory automatically, so agents never edit project.pbxproj. If you install by hand, you also update the architecture checklist inside /review and replace YOUR_PROJECT and YOUR_SCHEME in the three workflows.

Branching follows gitflow. feature/*, fix/* and release/* branch off develop, and hotfix/* branches off main. Specs and plans get their own spec/* branches, which is how FinanceTracker ended up with design documents older than every feature.

The README gives the PR count differently in different places: “80+” in the intro and “70+” in the comparison section, both below the current 94. Pimprikar points readers to the evidence itself and says the claim is “checkable: read the actual PR history.”

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.