Run 5: API Proxy Update
Update @arda-cards/api-proxy TypeScript types and proxy methods to match the updated print API contracts from Runs 1-3.
Specification: Phase 5 Specification Requirements: Phase 5 Requirements Verification: Phase 5 Verification
Entry Criteria
Section titled “Entry Criteria”| # | Criterion | Verification Command | Expected Output |
|---|---|---|---|
| 1 | Run 3 exit gate passes (API contracts finalized) | bash .../run-3-diagnostics/validate-exit.sh | ALL CHECKS PASSED |
| 2 | api-proxy worktree exists and builds | cd /Users/jmp/code/arda/projects/multi-pdf-print-and-bugs-worktrees/api-proxy && npm run build | Exit 0 |
| 3 | api-proxy tests pass | cd .../api-proxy && npm test | 211 passed |
| 4 | api-proxy on correct branch | git -C .../api-proxy branch --show-current | jmpicnic/multi-pdf-print-and-bugs |
Artifact Specifications
Section titled “Artifact Specifications”| Artifact | Path | Format | Description |
|---|---|---|---|
| CompositeRenderResult type | api-proxy/src/reference/shared/types.ts | TypeScript | New composite response types |
| PrintOptions type | api-proxy/src/reference/shared/types.ts | TypeScript | Diagnostic parameter options |
| Updated ItemProxy | api-proxy/src/reference/item/proxy.ts | TypeScript | printLabels/printBreadcrumbs return CompositeRenderResult |
| Updated KanbanProxy | api-proxy/src/resources/kanban/proxy.ts | TypeScript | printCards returns CompositeRenderResult; new unmarkPrinted() |
| Updated tests | api-proxy/tests/ | TypeScript | Updated mock responses, new method tests |
| CHANGELOG | api-proxy/CHANGELOG.md | Markdown | Version entry |
Task List
Section titled “Task List”| # | Task | Persona | Depends On | Status | Acceptance Criteria |
|---|---|---|---|---|---|
| 5.1 | Update RenderResult → CompositeRenderResult types | typescript-engineer | — | Pending | Types compile. T-P5-001, T-P5-002. |
| 5.2 | Update print proxy methods + add PrintOptions | typescript-engineer | 5.1 | Pending | Methods accept options, return composite. T-P5-003 through T-P5-007. |
| 5.3 | Add KanbanProxy.unmarkPrinted() | typescript-engineer | — | Pending | Calls correct endpoint. T-P5-008. |
| 5.4 | Update tests and CHANGELOG | typescript-engineer | 5.1, 5.2, 5.3 | Pending | All 211+ tests pass. CHANGELOG updated. T-P5-009, T-P5-010. |
Internal Dependency Graph
Section titled “Internal Dependency Graph”5.1 (types) ──→ 5.2 (proxy methods) ──→ 5.4 (tests + CHANGELOG)5.3 (unmarkPrinted) ──────────────────┘Tasks 5.1 and 5.3 can run in parallel. Small scope — single typescript-engineer agent.
Exit Criteria
Section titled “Exit Criteria”| # | Criterion | Verification Command | Expected Output |
|---|---|---|---|
| 1 | api-proxy builds | cd .../api-proxy && npm run build | Exit 0 |
| 2 | All tests pass | cd .../api-proxy && npm test | All passed |
| 3 | Lint passes | cd .../api-proxy && npm run lint | Exit 0 |
| 4 | CHANGELOG updated | head -10 .../api-proxy/CHANGELOG.md | Contains version entry |
| 5 | Worktree clean | git -C .../api-proxy status --short | Clean |
PR creation is gated on explicit user prompt. The api-proxy package publishes to GitHub Packages on merge — coordinate with user before pushing.
Agent Prompt Templates
Section titled “Agent Prompt Templates”TypeScript Engineer — ts-api-proxy
Section titled “TypeScript Engineer — ts-api-proxy”You are updating the @arda-cards/api-proxy TypeScript package at /Users/jmp/code/arda/projects/multi-pdf-print-and-bugs-worktrees/api-proxy.
Read the specification at .../../phase-5-api-proxy/specification.md and implement Tasks 5.1 through 5.4. Use mode: "bypassPermissions".
Key points:
- Replace
RenderResultwithCompositeRenderResult+GroupRenderResult - Add
PrintOptionsinterface for diagnostic parameters (livePrint, debug, dryRun) - Add
KanbanProxy.unmarkPrinted(cardEId)method - Follow existing test patterns (Vitest + fetch mocks)
- Read
api-proxy/CLAUDE.mdfor repo conventions
Handoff
Section titled “Handoff”Artifacts Consumed (from previous runs)
Section titled “Artifacts Consumed (from previous runs)”| Artifact | Source Run | Path |
|---|---|---|
| CompositeRenderResult shape | Run 2 | API contract (no file dependency) |
| Diagnostic parameters | Run 3 | API contract |
| Unmark endpoint | Run 1 | API contract |
Artifacts Produced (for subsequent runs)
Section titled “Artifacts Produced (for subsequent runs)”None — this is the final code run. Run 4 (api-test) can execute in parallel with Run 5 since they operate on independent repositories with no code dependencies.
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved