Skip to content

Add Inventory Modelling: Four Methods (monthly), and move model links to the apex domain - #3

Merged
anthomakr merged 3 commits into
mainfrom
feat/inventory-methods-and-apex-links
Aug 9, 2026
Merged

Add Inventory Modelling: Four Methods (monthly), and move model links to the apex domain#3
anthomakr merged 3 commits into
mainfrom
feat/inventory-methods-and-apex-links

Conversation

@anthomakr

@anthomakr anthomakr commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Two changes: a new model page, and a domain sweep the repo had been missing since the apex migration.

New model: Inventory Modelling: Four Methods (monthly)

Open in Layerz · models/inventory-methods/

Four ways to forecast inventory, computed side by side on the same business over 72 months, each in its own tab. One Inventory method switch decides which one feeds working capital, cash flow and the balance sheet. Nothing downstream references a method directly.

Method Dec 2025 Dec 2029 Implied DIO 2029
A. Percent of COGS 4,315,200 6,849,537 68
B. Inventory days 4,322,192 6,255,285 62
C. Unit build 4,330,667 5,984,138 59
D. Ageing from flows 3,509,000 6,051,723 60

A, B and C are calibrated to agree within 0.4% in 2025 and are 865,398 apart by 2029, because a fixed ratio cannot express an efficiency gain: method A's implied days never move.

Why monthly. The model was originally yearly. It could not express stock ageing at all: on flat annual flows a "last 180 days of purchases" rule is just a DIO of 180 in disguise. 2024 is a ramp-in year that gives the trailing-12-month windows a full history and absorbs the working capital build; results are read from 2025.

What method D adds. It forecasts purchases and lets the stock follow, rather than inferring the stock from COGS. Under FIFO the remaining stock is always the most recent purchases, so age is a subtraction rather than a layer simulation:

Stock older than 60 days  = MAX(0, inventory − purchases of the last 2 months)
Write-off (over 180 days) = MAX(0, stock before write-off − purchases of the last 6 months)

The result is the point of the whole thing: at normal purchasing the write-off never fires, and the stock ages anyway, from 16% to 22% over 60 days. A business turning stock in 60 days never holds anything for 180, so the accounting alarm stays silent for years while a quarter of the warehouse quietly gets old. No ratio method can produce that column.

Balance check verified at 0 on all 72 periods and all four methods, re-run with the switch on each value. Annual P&L totals and the December inventory figures reproduce the earlier yearly build to the euro.

Apex domain sweep

layerz.cc became the canonical origin on 2026-08-06 and app.layerz.cc now 308s to it. Every Open in Layerz button, OG card and workflow URL in this repo still pointed at app., so each one took a redirect hop.

More pressing: check-links.yml was about to start failing. It asserts a bare 200 and app.layerz.cc/models/<id> answers 308. Its last green run was 2026-08-03, three days before the migration, so the next scheduled run would have failed on all 12 models. Fixed here and replayed: 13 models, 26 URLs, all 200.

The workflow now also runs on pull requests, so a dead or mistyped model link is caught before merge instead of by the next Monday cron. The id-collection grep accepts both forms, so a stray app. link in a future page still gets checked rather than silently dropped.

Notes

  • The branch was rebased onto origin/main first: it carried four commits that were content-identical duplicates of main's, which the rebase dropped.
  • The model is promoted to a Layerz template at user scope, not system. Per CLAUDE.md this catalog and the public template catalog are reconciled deliberately, not assumed to match.
  • The earlier yearly model is superseded and no longer referenced anywhere in the repo.

🤖 Generated with Claude Code

anthomakr and others added 3 commits August 9, 2026 18:06
Percent of COGS, days inventory outstanding and unit build computed side
by side on the same business, with a single switch driving which one
feeds working capital, cash flow and the balance sheet.

The three methods agree within 0.4% in year 1 and are EUR 865k apart by
year 5. The P&L is identical on all three, so the whole difference lands
in closing cash. Balance check verified at 0 on all five periods and on
all three methods.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
layerz.cc became the canonical origin on 2026-08-06; app.layerz.cc now
308s to it. Every Open in Layerz button, OG card and workflow URL in this
repo still pointed at app., so each one took a redirect hop.

The check-links workflow was about to break on it: it asserts a bare 200
and app.layerz.cc/models/<id> answers 308. Its last green run was
2026-08-03, three days before the migration, so the next scheduled run
would have failed on all 12 models. Replayed locally after the sweep:
13 models, 26 URLs, all 200.

The id-collection grep now accepts both forms, so a stray app. link in a
future page still gets checked rather than silently dropped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A page that ships a dead or mistyped model link was only caught by the
Monday cron, after merge and after the page was already public. Adding
pull_request to the triggers moves that check before merge.

On a pull_request event the checkout is the merge result, so what gets
verified is the repo as it would look on main. The job only curls public
URLs and needs no secrets, so it works on fork PRs under the read-only
token as well.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anthomakr
anthomakr merged commit 5336268 into main Aug 9, 2026
1 check passed
@anthomakr anthomakr changed the title Add Inventory Modelling: Three Methods, and move model links to the apex domain Add Inventory Modelling: Four Methods (monthly), and move model links to the apex domain Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant