<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Toshikatsu Oga</title>
    <description>The latest articles on DEV Community by Toshikatsu Oga (@ogasurfprojectjpg).</description>
    <link>https://dev.to/ogasurfprojectjpg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3923328%2F441862c7-b956-4db7-8c04-8f117634ee78.png</url>
      <title>DEV Community: Toshikatsu Oga</title>
      <link>https://dev.to/ogasurfprojectjpg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ogasurfprojectjpg"/>
    <language>en</language>
    <item>
      <title>How I built a tamper-proof AI for construction quotes after 30 years as a carpenter</title>
      <dc:creator>Toshikatsu Oga</dc:creator>
      <pubDate>Sun, 10 May 2026 13:33:26 +0000</pubDate>
      <link>https://dev.to/ogasurfprojectjpg/how-i-built-a-tamper-proof-ai-for-construction-quotes-after-30-years-as-a-carpenter-1hji</link>
      <guid>https://dev.to/ogasurfprojectjpg/how-i-built-a-tamper-proof-ai-for-construction-quotes-after-30-years-as-a-carpenter-1hji</guid>
      <description>&lt;p&gt;I'm 49. I learned to code two years ago. Before that, I spent 30 years as a carpenter in Japan.&lt;br&gt;
This is the story of why I built HORIZON SHIELD — and the architectural decision that made it actually useful.&lt;/p&gt;

&lt;p&gt;The problem nobody was solving&lt;br&gt;
Japan's residential renovation market is ¥7.35 trillion per year.&lt;br&gt;
Contractors routinely overcharge by 15–20%. The weapon they use is a single Japanese character: 一式 (isshiki) — "lump sum." One line item. No breakdown. Inside that line item, markups of 200–300% are invisible.&lt;br&gt;
After 30 years on job sites, I watched this happen to thousands of families. They had no way to verify whether a quote was fair. Then ChatGPT arrived — and homeowners started asking it for second opinions.&lt;br&gt;
They got different numbers every time.&lt;br&gt;
A contractor will weaponize any inconsistency. "The AI said ¥800,000 last week and ¥1,200,000 this week — which is it?" Game over.&lt;/p&gt;

&lt;p&gt;The architectural insight&lt;br&gt;
The problem with using an LLM for cost estimation isn't intelligence. It's determinism.&lt;br&gt;
LLMs are probabilistic by nature. Same input, different output. That's fine for creative writing. It's catastrophic when a contractor is looking for ammunition.&lt;br&gt;
So I separated the concerns completely:&lt;br&gt;
User input (natural language)&lt;br&gt;
        ↓&lt;br&gt;
    LLM layer&lt;br&gt;
  (parsing ONLY)&lt;br&gt;
        ↓&lt;br&gt;
  JCCDB v1.2.1&lt;br&gt;
(3,350 line items)&lt;br&gt;
        ↓&lt;br&gt;
  SHA-256 hash&lt;br&gt;
 of canonical input&lt;br&gt;
        ↓&lt;br&gt;
  PDF report&lt;br&gt;
The LLM touches zero numbers. It only parses what the user typed into a canonical structured format. All arithmetic happens in a versioned database.&lt;br&gt;
Every report carries a 12-character SHA-256 audit hash. Same input → same hash → same answer, every time. A contractor cannot challenge the number by asking for a rerun.&lt;/p&gt;

&lt;p&gt;The War Price Coefficient&lt;br&gt;
Material prices in Japan have been volatile since 2022. A static database goes stale in months.&lt;br&gt;
I added a War Price Coefficient (WPC) — currently ×1.0935 — that adjusts base prices for supply-chain volatility. It's updated monthly using Bank of Japan Corporate Goods Price Index (CGPI) data.&lt;br&gt;
The hash includes the database snapshot version. So when the WPC updates:&lt;/p&gt;

&lt;p&gt;Hash changes → price can change (new market conditions)&lt;br&gt;
Hash matches → price is locked (same conditions, same answer)&lt;/p&gt;

&lt;p&gt;This is what I called "version-aware idempotency" when I posted about it on HN.&lt;/p&gt;

&lt;p&gt;The open dataset&lt;br&gt;
The underlying database — Japan Construction Cost Database (JCCDB) — is open.&lt;/p&gt;

&lt;p&gt;3,350+ line items across 7 categories&lt;br&gt;
4 contractor tiers: sole trader (25–35% margin) → major firm (35–45%)&lt;br&gt;
CC-BY 4.0 — free to use, fork, cite&lt;br&gt;
Peer-reviewed preprint on engrXiv (DOI: 10.31224/7007)&lt;/p&gt;

&lt;p&gt;The commercial service and the research dataset are intentionally separated. The data is CC-BY 4.0 forever. The API pays rent.&lt;br&gt;
GitHub: ogasurfproject-jpg/japan-construction-cost-database&lt;/p&gt;

&lt;p&gt;What I learned building this at 47&lt;br&gt;
Framing a house at 16 was harder than learning to code at 47. Not because coding is easy — but because 30 years of domain knowledge is a massive shortcut.&lt;br&gt;
I didn't need to understand the construction industry. I was the construction industry. I just needed to learn how to encode what I already knew.&lt;br&gt;
The hardest part wasn't the SHA-256 hashing or the Cloudflare Workers architecture. It was deciding what not to put in the LLM.&lt;br&gt;
Every time I was tempted to let the LLM "help" with a calculation, I asked: can a contractor use this inconsistency against a homeowner? If yes, the LLM doesn't touch it.&lt;/p&gt;

&lt;p&gt;Try it&lt;/p&gt;

&lt;p&gt;Service: shield.the-horizons-innovation.com/index_en.html&lt;br&gt;
Dataset: github.com/ogasurfproject-jpg/japan-construction-cost-database&lt;br&gt;
Paper: engrXiv DOI 10.31224/7007&lt;br&gt;
Pitch deck: shield.the-horizons-innovation.com/pitch.html&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the architecture, the dataset, or what it's like to ship your first product at 49.&lt;br&gt;
— Toshi&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>career</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
