FiCl Dev Blog한국어

[PR #222·223·227·229] Laying the Ground for Detail 3: Choosing the Scope, Shared Types, Locking Approved Standards, and Rounding

Work completed 2026-11-17 07:58 KST · Published 2026-11-22 12:51 KST · AI model used for the work Claude Opus 5.5

[PR #222·223·227·229] Laying the Ground for Detail 3: Choosing the Scope, Shared Types, Locking Approved Standards, and RoundingSummary. Choosing the scope before the spec when the material was wider, types shared by three areas, a database check that locks approved calculation standards, and fixing a rounding error in the calculation functionPR #222·223·227·229Ground for Detail 3Scope · Types · Lock · RoundingPlanning → types → tables → calculationI chose scopeand lockClaudeplanned, built,checkedCodex wrote testsPlanningTypesTablesCalcⅠPlanningPR 222: scope first1Material wider than scopeOnly records people enterand the server-calculated plan2I chose 'option 1'Server calculatesfrom approvedstandard; else 'No standard'ⅡTypesPR 223: sharedvocabulary3One shape for three areasScreens can be built firstagainst fake responses4Basis for admins onlyThe customer type hasno basis valuesⅢTablesPR 227: lockingstandards5I chose 'option B'Only drafts can be edited;approved ones cannot6TRUNCATE blocked tooCodex caught wiping a tablepast the row-level checksⅣCalcPR 229: purefunctions74.8195 became 4.819Binary fraction error: trimto 12 digits, then round8Cap on direct amountCut it to the daily totalso the sum check holdsKey: if the goal is a lock, close the side doorstoo, and test rounding with documented examples.FiCl Dev Blog · Post summary figure
[PR #222·223·227·229] Laying the Ground for Detail 3: Choosing the Scope, Shared Types, Locking Approved Standards, and RoundingSummary. Choosing the scope before the spec when the material was wider, types shared by three areas, a database check that locks approved calculation standards, and fixing a rounding error in the calculation functionPR #222·223·227·229Ground for Detail 3Scope · Types · Lock · RoundingPlanning → types → tables → calculationI chose scopeand lockClaudeplanned, built,checkedCodex wrote testsPlanningTypesTablesCalcⅠPlanningPR 222: scope first1Material wider than scopeOnly records people enterand the server-calculated plan2I chose 'option 1'Server calculatesfrom approvedstandard; else 'No standard'ⅡTypesPR 223: sharedvocabulary3One shape for three areasScreens can be built firstagainst fake responses4Basis for admins onlyThe customer type hasno basis valuesⅢTablesPR 227: lockingstandards5I chose 'option B'Only drafts can be edited;approved ones cannot6TRUNCATE blocked tooCodex caught wiping a tablepast the row-level checksⅣCalcPR 229: purefunctions74.8195 became 4.819Binary fraction error: trimto 12 digits, then round8Cap on direct amountCut it to the daily totalso the sum check holdsKey: if the goal is a lock, close the side doorstoo, and test rounding with documented examples.FiCl Dev Blog · Post summary figure

These four PRs lay the ground for Detail 3 (input records that people enter, and a daily plan the server calculates). In order: the planning that set the scope (PR 222), the types shared by the server, admin web and customer app (PR 223), the database tables (PR 227) and the calculation functions (PR 229). Each one had to finish before the next could start, so I put them in one post in sequence.

All the work ran on my Windows computer. In all four PRs a Claude Code session (Claude Opus 5.5) handled the planning, work instructions, implementation, checks and PR. Codex (gpt-6.1-terra) wrote the code for PR 223 and the tests for PRs 227 and 229, and the implementation side did not edit those test files. The final review for PRs 227 and 229 was codex exec review (Codex’s default model, name unknown). In this post, words that would reveal the business field are replaced with general ones (input material, device, count, and so on).

PR What it did Who How it was checked
222 Planning that set the scope (spec and plans) I decided the scope, how to calculate and more; Claude wrote the spec and plans A subagent read the spec and raised 8 questions
223 Types, error codes and policy values shared by three areas Codex wrote the code; Claude compared it Build, type checks, lint, line-by-line comparison with the plan
227 Database tables and the standard lock I chose the lock option; Codex wrote tests; Claude implemented 38 tests, full verify, codex exec review
229 Daily plan calculation functions and rounding Codex wrote tests; Claude implemented 19 tests, full verify, codex exec review twice

PR 222: Choosing the Scope First

What was done and why

The head office sent a development brief and screen mockups for Detail 3. But the material was much wider than Detail 3. It also covered today’s tasks and routines, home warnings and alerts, and automatic input using the devices. The pilot has no device control link, and the head office’s calculation standard data had not arrived yet. So before writing the spec (the design document describing what to build), Claude had the scope decided first.

Chosen approach and rejected options

I decided the first four.

How it was checked

PR 223: Agreeing on the Shared “Vocabulary” First

What was done and why

This is Detail 3’s first code task. The types (shapes of requests and responses) shared by the server, admin web and customer app, 15 error codes and 8 policy values (a capacity limit, 48 hours for late records, 1,000 characters for memos, and so on) went into the shared package first. Once merged, the admin web and customer app can build screens against fake responses without waiting for the real server.

The database structure, server behavior and screens did not change. The type the customer receives has no calculation basis; the basis is only in the type the admin receives. The information boundary chosen in PR 222 is kept from the type level up.

Chosen approach and rejected options

How it was checked

PR 227: The Database Guards Approved Standards

What was done and why

All of Detail 3’s server work needs the tables first. So this PR added migration 0006 (a step file that changes the database structure) and 22 entities (tables written as code): material types, calculation standard versions and their row tables, plans and rounds, record headers, version tables for input, count change and refill records, devices and their setting versions, and more. The API and screens did not change.

Chosen approach and rejected options

How it was checked

What happened during this task

While Codex was writing tests, Claude wrote implementation files into the same working folder, and the script guarding Codex stopped with exit code 3 because “the working folder changed”. Codex had not written outside its own clone. By my decision, Codex’s tests were committed in the clone and brought over, placed before the implementation commits.

The 2 lock tests came after my decision, so the implementing session wrote them itself with the lead session’s approval. That is an exception to the rule “tests are written by the side that does not implement”, so the log notes it for reviewers to keep in mind.

PR 229: The Calculation Functions and Rounding

What was done and why

The daily plan has more number rules than anything else in Detail 3. So the calculation was split out into pure functions (functions that produce an answer from their inputs alone, without calling the database or server framework). Later tasks only gather inputs and call them. The API and screens did not change.

Chosen approach and rejected options

How it was checked

What was not checked

Lessons