Skip to content

Implementation Plan

Author: Claude Code for jmpicnic Date: 2026-03-30 Status: Draft Related Issue: Arda-cards/management#820

Implement additional printing format options (X_SMALL and SPECIAL_01SPECIAL_10) across the Documint configuration spreadsheet, the operations backend, and deliver a frontend specification ticket. This plan covers a single-agent, three-phase execution with two STOP gates.

  • Goal and Requirements — analysis, requirements (REQ-EPO-001–016), and acceptance criteria (24 items)
  • Specification — detailed task breakdown, per-task code examples, alias tables, and phase instructions
  • Verification — bidirectional traceability matrix (requirements → acceptance criteria → verification methods)
  • Printing Configuration Spreadsheet — source of truth for template IDs, display names, and active flags
  • Project type: Modification — extending existing enums, protobuf definitions, configuration, and CSV upload logic
  1. Spreadsheet — New versioned sheet Documint Template Mapping (20260330) with 45 data rows, Active and Notes columns.
  2. Backend (operations) — Domain enums, protobuf enums, mapping functions, PrintingTemplateConfiguration data class, pdf-templates.json, CSV alias support, tests, CHANGELOG.
  3. Frontend ticket — GitHub issue in Arda-cards/management assigned to danmerb with full specification for arda-frontend-app.
  • Direct modifications to arda-frontend-app (ticket only).
  • Changes to common-module (reference dependency only).
  • Rendering logic or Documint template design.
  • API endpoint signatures.

None. Existing enumerationByName columns store enum names as strings. Adding new enum values (X_SMALL, SPECIAL_01SPECIAL_10) is additive — no schema migration or Flyway script needed. Verify at implementation time (T-8).

PrintingTemplateConfiguration (RenderJob.kt): Add active: Boolean = true field. Default ensures backwards compatibility with existing JSON entries that lack the field.

PrintTemplates (Printing.kt): No change to resolution logic. Fallback to MEDIUM for missing sizes is preserved. The active flag is stored but not used for backend resolution.

ItemCsvUploadService (ItemCsvUploadService.kt):

  • Extend CardSizeMessage.domain(), LabelSizeMessage.domain(), BreadcrumbSizeMessage.domain() with mappings for all new protobuf values.
  • Add alias resolution: CSV values matching the Size of Template display name (e.g., “Quarter-Index”) resolve to the corresponding enum value. Alias tables are defined in the specification.

None. Existing print endpoints (/v1/kanban/kanban-card/print-card, /v1/item/item/print-label, /v1/item/item/print-breadcrumb) accept the size from the item’s persisted value. New enum values flow through the existing path.

Delivered as a GitHub ticket (T-12), not implemented in this plan. See specification Phase 3 for the ticket contents.

#TaskPersonaDepends OnAcceptance Criteria
T-1Create new spreadsheet sheet via Google Workspace MCPImplementer45 data rows (15 per category), Active/Notes columns, no LARGE+QR row
STOP — Review checkpoint
T-2Extend domain enums in Printing.ktBack End EngineerT-115 values per enum, correct ordering
T-3Extend protobuf enums in item_row.protoBack End EngineerT-1Sequential field numbers 5–15 appended
T-4Update protobuf → domain mapping in ItemCsvUploadService.ktBack End EngineerT-2, T-3All new values mapped; UNSPECIFIEDMEDIUM preserved
T-5Add CSV alias resolution for display namesBack End EngineerT-4Aliases from specification accepted in CSV upload
T-6Add active field to PrintingTemplateConfigurationBack End Engineeractive: Boolean = true in data class
T-7Update pdf-templates.json from spreadsheetBack End EngineerT-1, T-645 entries with template, columns, description, default, active
T-8Verify existing data deserializationBack End EngineerT-2, T-7SMALL/MEDIUM/LARGE/X_LARGE items load without error
T-9Update and add testsBack End EngineerT-2–T-7All tests pass, new enum values and aliases covered
T-10make clean build and verify coverageBack End EngineerT-2–T-9Zero errors, coverage meets Gradle targets
T-11Update CHANGELOG.mdBack End EngineerT-10[2.20.0-jmpicnic-820] entry with Added section
STOP — Review checkpoint
T-12Write frontend spec and create GitHub ticketImplementerT-1, T-10Ticket in Arda-cards/management, assigned to danmerb

PlantUML diagram

Within Phase 2, tasks can be grouped into two parallel streams that converge at T-8/T-9:

  • Stream A: T-2 → T-3 → T-4 → T-5 (enum + protobuf + mapping + aliases)
  • Stream B: T-6 → T-7 (data class + JSON config)
  • Convergence: T-8, T-9 → T-10 → T-11

Since this is a single-agent project, streams execute sequentially in practice but the dependency graph allows flexibility in ordering.

Single agent, two repositories — no additional worktrees needed.

Worktree directoryBranchRepositoryTasks
extra-printing-options-worktrees/operationsjmpicnic/extra-printing-options-management-820operationsT-2 through T-11
extra-printing-options-worktrees/documentationjmpicnic/extra-printing-options-management-820documentationProject docs, T-12

Spreadsheet task (T-1) uses Google Workspace MCP — no worktree needed.

Merge workflow: Each worktree pushes its branch directly. One PR per repository targeting main.

RiskLikelihoodImpactMitigation
enumerationByName fails on new enum values for existing DB rowsLowHighAdditive change; existing string names unchanged. Verify at T-8.
Protobuf wire compatibility broken by new field numbersLowHighNew values appended after existing; UNSPECIFIED = 0 unchanged.
Spreadsheet MCP write fails mid-updateLowMediumNew sheet created (existing untouched); can retry from scratch.
Frontend misinterprets active flag semanticsLowMediumTicket specifies exact behavior; backend stores but does not filter.
Test coverage drops below threshold due to new enum branchesMediumMediumAdd explicit tests for new values and aliases in T-9.

All questions resolved during planning — see specification for the full decision log.

#QuestionDecision
1Breadcrumb X_SMALL/SMALL alias collisionDifferentiate display names: “3 x 1 (xs Label Printer)” vs “3 x 1 (Label Printer)“
2active default in data classtrue (backwards-compatible)
3CHANGELOG version2.20.0 (minor — additive feature)

Copyright: (c) Arda Systems 2025-2026, All rights reserved