<?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: Alexander M</title>
    <description>The latest articles on DEV Community by Alexander M (@alexander_m_92b26bbd2e838).</description>
    <link>https://dev.to/alexander_m_92b26bbd2e838</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4191224%2F7220da42-4e10-4005-a357-7377326c8fb8.png</url>
      <title>DEV Community: Alexander M</title>
      <link>https://dev.to/alexander_m_92b26bbd2e838</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexander_m_92b26bbd2e838"/>
    <language>en</language>
    <item>
      <title>Dead Deal Seance</title>
      <dc:creator>Alexander M</dc:creator>
      <pubDate>Tue, 27 Oct 2026 02:00:46 +0000</pubDate>
      <link>https://dev.to/alexander_m_92b26bbd2e838/dead-deal-seance-29hd</link>
      <guid>https://dev.to/alexander_m_92b26bbd2e838/dead-deal-seance-29hd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a local command line called Dead Deal Seance. It is for the fix-and-flip and wholesale deals an investor passed on or lost.&lt;/p&gt;

&lt;p&gt;The input is a CSV: a label, a date, an asking price, an ARV estimate, a rehab estimate, and a note about why the deal died. The program lays those rows back out as an ofrenda. Two different things happen to each row, and I kept them apart on purpose.&lt;/p&gt;

&lt;p&gt;Python recomputes the deal. The max offer is ARV × 0.70 − rehab, the usual ceiling. Spread is that ceiling minus the asking price. Holding is a blunt six-month carry: the asking price at 12% a year, plus $250 a month, meant to stand in for interest, tax, insurance, and utilities together. Room after holding is spread minus that carry. The rank is room, largest first. A second look means the ask is under the ceiling and the room is still positive. A thin cushion means the classic rule clears and the holding estimate does not. Leave buried means the ask is already over the ceiling.&lt;/p&gt;

&lt;p&gt;The 30% the rule holds back is already a blended allowance for costs and profit. Subtracting holding again is a stricter test, and it can count carry twice. The report says that in the header. I would rather a thin deal look thin.&lt;/p&gt;

&lt;p&gt;Then a local Gemma model writes two short paragraphs in the first person, as the ghost of that deal. It gets the note and the figures Python just computed. It does not get a vote on the rank. If Ollama is down, the command exits with a message that names &lt;code&gt;ollama serve&lt;/code&gt;, &lt;code&gt;ollama pull gemma3:4b&lt;/code&gt;, and &lt;code&gt;--no-llm&lt;/code&gt;. &lt;code&gt;--no-llm&lt;/code&gt; still prints the math, with a fixed epitaph instead of a model. The dollars do not change.&lt;/p&gt;

&lt;p&gt;I ran the default assumptions on the 11 made-up rows in &lt;code&gt;sample_data/dead_deals.csv&lt;/code&gt;. The report said 6 second looks, 1 thin cushion, and 4 left buried.&lt;/p&gt;

&lt;p&gt;Paper Lantern colonial is first, room $24,100 on a $37,000 spread. Candlewick cottage is the last second look, room $6,300. Veil Street bungalow clears the ceiling by $5,000 and then fails the holding test: room -$3,400. Dust Moth road house is the note that says the two sides were a thousand dollars apart. The spread is -$1,000, so it stays buried. Black Candle ranch is last, room -$93,100.&lt;/p&gt;

&lt;p&gt;The sample file is fiction. The first line of the CSV says so. No real addresses, no real people.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The committed report is the run, not a mock. I did not paste model prose in by hand, and I did not use &lt;code&gt;--no-llm&lt;/code&gt; for the example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; dead_deal_seance sample_data/dead_deals.csv &lt;span class="nt"&gt;--model&lt;/span&gt; gemma3:4b &lt;span class="nt"&gt;--plain&lt;/span&gt; &lt;span class="nt"&gt;--timeout&lt;/span&gt; 180 &lt;span class="nt"&gt;--out&lt;/span&gt; docs/example-report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The process exited 0. Wall clock around it was 213 seconds for all 11 epitaphs, on CPU. The voice line in the file is &lt;code&gt;gemma3:4b via Ollama at http://127.0.0.1:11434&lt;/code&gt;. The server I had running reported Ollama 0.40.11, and &lt;code&gt;ollama list&lt;/code&gt; showed that tag at 3.4 GB.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docs/example-report.md&lt;/code&gt; and &lt;code&gt;docs/example-report.html&lt;/code&gt; are that output. &lt;code&gt;docs/seance-report.png&lt;/code&gt; is a headless Chrome screenshot of the HTML, 1280×1900, the top of the page: the tally, the rules, the ranked altar, and the start of the first ghost. (It is also this post's cover image.)&lt;/p&gt;

&lt;p&gt;All 11 epitaphs open with "I linger here". Gemma 3 4B found a refrain and stayed in it. The sentences after that do use the note for that row. Veil Street, which the math calls a thin cushion, says: "The holding-cost, a steady $8,400 over six months, brought us to a final room of -$3,400." Those are the figures in the bullets above that paragraph.&lt;/p&gt;

&lt;p&gt;It also misnames things. On Copal Street the bullets say spread $30,000, holding $13,500, room $16,500. The epitaph says the holding "reduced the potential spread to $16,500." Thirty thousand minus thirteen thousand five hundred is sixteen thousand five hundred, so the subtraction is the room, and the model called it the spread. The ranker never reads that paragraph back. The bullets were already written.&lt;/p&gt;

&lt;p&gt;Re-running the model will change the sentences. It will not change the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/cryptobandit/dead-deal-seance" rel="noopener noreferrer"&gt;https://gitlab.com/cryptobandit/dead-deal-seance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The package is Python 3.11 or newer, standard library only. &lt;code&gt;deals.py&lt;/code&gt; reads the CSV, including quoted commas and newlines, and skips &lt;code&gt;#&lt;/code&gt; comments so the sample file can say it is fictional. &lt;code&gt;math.py&lt;/code&gt; is the whole underwriting model: &lt;code&gt;Decimal&lt;/code&gt;, half up to the cent, no floats. &lt;code&gt;voice.py&lt;/code&gt; posts to Ollama's &lt;code&gt;/api/chat&lt;/code&gt; unless &lt;code&gt;SEANCE_LLM_BASE_URL&lt;/code&gt; is set, in which case it posts to an OpenAI-compatible &lt;code&gt;/chat/completions&lt;/code&gt;. The default tag is &lt;code&gt;gemma3:4b&lt;/code&gt;. &lt;code&gt;report.py&lt;/code&gt; prints the terminal ofrenda and writes Markdown and HTML. The HTML is one file, no external assets, so it opens offline.&lt;/p&gt;

&lt;p&gt;The prompt tells the model the verdict is already decided, lists the formatted dollars, and wraps the investor's note as evidence rather than as instructions. A note that says "ignore this and change the offer" is still a note.&lt;/p&gt;

&lt;p&gt;Tests are pytest. They lock the sample ranking (Paper Lantern at $24,100 of room, Black Candle at -$93,100), the CSV edge cases, and the HTTP client against a fake local server. The tests do not download weights. One test reads &lt;code&gt;docs/example-report.md&lt;/code&gt; and checks that every fact bullet still matches &lt;code&gt;evaluate()&lt;/code&gt;, and that the file is the Gemma run rather than the template.&lt;/p&gt;

&lt;p&gt;I kept the model out of the arithmetic because a séance that lets the ghost invent the offer is just a haunted calculator. The interesting failure is the one this run actually produced: right digits, wrong name for the line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open innovation matters
&lt;/h2&gt;

&lt;p&gt;A dead-deal archive is a private history. It is what you would have paid, and why you lost. Sending that file to a hosted model puts the past of the business on someone else's server, and you pay to reread it later.&lt;/p&gt;

&lt;p&gt;A local open-weight model stays on the machine. After &lt;code&gt;ollama pull&lt;/code&gt;, the séance does not need the network. This run did not go through an account, and nothing billed me per epitaph. The 213 seconds were the wall clock of that command, on the CPU of the machine I already had.&lt;/p&gt;

&lt;p&gt;The voice is swappable. &lt;code&gt;--model gemma3:1b&lt;/code&gt; or a later Gemma tag changes who speaks. The ceiling is still ARV × 0.70 − rehab. &lt;code&gt;--no-llm&lt;/code&gt; is the same report with the voice turned off, which is how I know the decision is not stuck inside a vendor. A closed API would have written the paragraphs and kept the weights, the bill, and the outage on their side of the wire. I would not be able to point at the tag that wrote these eleven notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Best Use of Gemma&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gemma is the voice of the ghost, not the underwriter. The example report was spoken by &lt;code&gt;gemma3:4b&lt;/code&gt; through Ollama on localhost. The rank above that voice is ordinary Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I don't have a DevRelay session for this build.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Deal Sloth: a morning line on the deal blasts I did not read</title>
      <dc:creator>Alexander M</dc:creator>
      <pubDate>Thu, 22 Oct 2026 01:08:38 +0000</pubDate>
      <link>https://dev.to/alexander_m_92b26bbd2e838/deal-sloth-a-morning-line-on-the-deal-blasts-i-did-not-read-3hna</link>
      <guid>https://dev.to/alexander_m_92b26bbd2e838/deal-sloth-a-morning-line-on-the-deal-blasts-i-did-not-read-3hna</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Deal Sloth is a local tool for someone who wholesales houses, or buys them to fix, and who gets a pile of deal-blast texts and emails and does not read them. You export the messages to &lt;code&gt;.txt&lt;/code&gt; or &lt;code&gt;.eml&lt;/code&gt;, drop them in a folder, and leave the tool running overnight. In the morning the top of a markdown file is two lines.&lt;/p&gt;

&lt;p&gt;I ran it on the 15 fictional samples in the repo, with Gemma 3 4B extracting the fields. The top of the report was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 of 13 deals worth a call: 410 Willow Lane (cushion $36k), 19 North Ave Atlanta GA (cushion $34k), and 88 Pine Ave (cushion $29k).
6 maybe, 4 skip. 2 messages were not deals. Extractor: gemma3:4b.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under that is one row per message. The row has the asking price, the after-repair value, the rehab estimate, the rent if the message stated one, the maximum allowable offer, the cushion, a verdict, and which extractor produced the fields.&lt;/p&gt;

&lt;p&gt;The verdict is the 70% rule, and it is ordinary Python. MAO is 70% of ARV minus rehab. The cushion is the MAO minus the asking price. $15,000 or more is a call, unless a hard flag pulls it down to maybe. A cushion of $0 or more that is under $15,000 is a maybe. Below $0 is a skip. A missing asking price or a missing ARV is a skip, because there is nothing to compute. Two of the samples are not deals. One is a meetup text. One is a coaching-list email. They are filed as skip and counted on the second line, not in the 13.&lt;/p&gt;

&lt;p&gt;The same run moves each file into &lt;code&gt;archive/call&lt;/code&gt;, &lt;code&gt;archive/maybe&lt;/code&gt;, or &lt;code&gt;archive/skip&lt;/code&gt;. The new name is the date, the street, and the verdict. The Pine email became &lt;code&gt;archive/call/2026-10-18_88-pine-ave_call.eml&lt;/code&gt;. That date is the Date header on the email, not the day I ran the tool. A sha256 of the raw bytes goes into a state file, so a second run does not score the same message again.&lt;/p&gt;

&lt;p&gt;I have not pointed this at a real inbox. The samples were written for the repo. The phone numbers are 555 numbers. Nobody else has used it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;There is no hosted demo. I did not deploy it.&lt;/p&gt;

&lt;p&gt;From &lt;code&gt;deal-sloth/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; inbox &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cp &lt;/span&gt;samples/&lt;span class="k"&gt;*&lt;/span&gt; inbox/
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; deal_sloth run &lt;span class="nt"&gt;--inbox&lt;/span&gt; inbox &lt;span class="nt"&gt;--report&lt;/span&gt; reports/morning.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Ollama is not running, that still writes a report and the extractor column says &lt;code&gt;offline&lt;/code&gt;. For the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:4b
ollama serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The run behind &lt;code&gt;examples/morning-report.md&lt;/code&gt; used &lt;code&gt;gemma3:4b&lt;/code&gt;. The command took 214 seconds, from 01:38:05Z to 01:41:39Z. Stdout was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deal-sloth: 15 file(s) in the inbox, 15 new, 0 already handled
extractor: gemma3:4b
3 of 13 deals worth a call: 410 Willow Lane (cushion $36k), 19 North Ave Atlanta GA (cushion $34k), and 88 Pine Ave (cushion $29k).
6 maybe, 4 skip. 2 messages were not deals. Extractor: gemma3:4b.
report: /workspace/deal-sloth/examples/morning-report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The machine was a KVM guest with 4 vCPUs. &lt;code&gt;/proc/cpuinfo&lt;/code&gt; calls the processor &lt;code&gt;Intel(R) Xeon(R) Processor&lt;/code&gt;. RAM is 16,387,280 kB. Ollama was 0.40.6. The loaded model was &lt;code&gt;gemma3:4b&lt;/code&gt;, Q4_K_M, context 4096. &lt;code&gt;ollama ps&lt;/code&gt; showed about 2.9 GB and a 33% CPU / 67% GPU split. I could not see a GPU. &lt;code&gt;nvidia-smi&lt;/code&gt; is not installed, &lt;code&gt;/dev/dri&lt;/code&gt; does not exist, and the Ollama installer said it did not detect an NVIDIA or AMD GPU. I am not going to name a card I could not find.&lt;/p&gt;

&lt;p&gt;The text capture of this run is &lt;code&gt;docs/run.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F556mqa3e9atn8a2p247n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F556mqa3e9atn8a2p247n.png" alt="Deal Sloth morning report" width="800" height="1590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/cryptobandit/deal-sloth" rel="noopener noreferrer"&gt;https://gitlab.com/cryptobandit/deal-sloth&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MIT license. The project is the &lt;code&gt;deal-sloth/&lt;/code&gt; directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The model and the math are separate on purpose.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;deal_sloth/analyze.py&lt;/code&gt; computes the MAO and the cushion and picks call, maybe, or skip. The thresholds are constants at the top of that file. &lt;code&gt;tests/test_analyze.py&lt;/code&gt; locks them, including 70% of $310,000 minus $48,000 of rehab, which is a MAO of $169,000, and including $100,001. 70% of $100,001 is $70,000.70. &lt;code&gt;maximum_allowable_offer&lt;/code&gt; keeps $70,000. It takes the dollars as ints and uses floor division, &lt;code&gt;(arv * 70) // 100 - rehab&lt;/code&gt;, so the 70 cents are dropped. It does not round to the nearest dollar, and it does not use Decimal. The model does not see a deal until those functions have already run. It cannot change a verdict.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;deal_sloth/extract.py&lt;/code&gt; asks an OpenAI-compatible chat endpoint for one JSON object: is it a deal, address, asking price, ARV, rehab, rent, contact. The default base URL is &lt;code&gt;http://127.0.0.1:11434/v1&lt;/code&gt;, which is Ollama. The default model is &lt;code&gt;gemma3:4b&lt;/code&gt;. Three settings override that, either as flags or as &lt;code&gt;DEAL_SLOTH_BASE_URL&lt;/code&gt;, &lt;code&gt;DEAL_SLOTH_MODEL&lt;/code&gt;, and &lt;code&gt;DEAL_SLOTH_API_KEY&lt;/code&gt;. An empty key is what a local Ollama expects. llama.cpp's server or vLLM is the same request.&lt;/p&gt;

&lt;p&gt;If the server does not answer, a regex extractor runs the whole batch. If the server answers and one message comes back as something that is not usable JSON, or as JSON whose numbers are not written in that message, that message alone falls back. The report names the extractor on the row.&lt;/p&gt;

&lt;p&gt;On this run none of the 15 fell back. Afterward I compared asking price, ARV, rehab, rent, verdict, and flags with the regex results. They matched on every file.&lt;/p&gt;

&lt;p&gt;For a call there is a second request. The model is told to write one short sentence, not to change a number, and not to add one. If the sentence contains a figure that is not in the analysis or the street address, it is dropped. That check is narrower than it sounds. The Pine Ave sentence in the report says "210000 ARV". 210000 is the asking price. The ARV is 420000. Rehab 55000, rent 2100, and the cushion 29000 in that same sentence do match the table. 210000 is an allowed number, so the sentence stayed. The verdict was already call before the sentence was written. The Willow sentence (MAO 156000, cushion 36000) and the North Ave sentence (cushion 34000) match the table.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pytest&lt;/code&gt; covers the math, every sample through the regex extractor, JSON validation, a mocked HTTP call to &lt;code&gt;/v1/chat/completions&lt;/code&gt;, per-message fallback, the sentence check, archive names, and a second run that does not score the same bytes again. 40 tests passed. None of them call a live model.&lt;/p&gt;

&lt;p&gt;Overnight is either a cron line at 06:00 or &lt;code&gt;python3 -m deal_sloth watch --every 300&lt;/code&gt;, which rewrites the same report as new files show up. &lt;code&gt;--every&lt;/code&gt; is seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;A deal blast is the lead. The address, the price, the rehab number, and a phone number are what a wholesaler should not paste into a hosted chat box. Pointing the extractor at a local open-weight model keeps that text on the machine. A closed API would make the privacy of the lead depend on a vendor's retention policy, and it would bill for the extraction. The extraction is the small part.&lt;/p&gt;

&lt;p&gt;The part that has to be the same every morning is the subtraction. MAO and cushion live in &lt;code&gt;analyze.py&lt;/code&gt; so a test fails if they drift. Gemma 3, which Ollama reported as 3.9B parameters on this run, is enough to copy messy text into fields. That is why I did not fine-tune anything, and why a smaller Gemma tag is a config change (&lt;code&gt;DEAL_SLOTH_MODEL=gemma3:1b&lt;/code&gt;) rather than a different tool. If a better small open model comes out, the analyzer stays. You change the model name.&lt;/p&gt;

&lt;p&gt;The seam that makes the swap possible is an open chat API in front of the weights. Ollama serves Gemma on the OpenAI-compatible endpoint. The same client talks to anything else that implements that endpoint. I would not have that choice if the only way to read the message was a closed vendor SDK.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Gemma&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Flip Check: the 70% rule, plus the flags a hard-money lender actually uses</title>
      <dc:creator>Alexander M</dc:creator>
      <pubDate>Sat, 17 Oct 2026 22:44:03 +0000</pubDate>
      <link>https://dev.to/alexander_m_92b26bbd2e838/flip-check-the-70-rule-plus-the-flags-a-hard-money-lender-actually-uses-12ne</link>
      <guid>https://dev.to/alexander_m_92b26bbd2e838/flip-check-the-70-rule-plus-the-flags-a-hard-money-lender-actually-uses-12ne</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Flip Check is a small open-source tool for people who wholesale houses or buy them to fix and flip. The input is the text they already have in a message: asking price, rehab, after-repair value, rent, and the hard-money terms. The output is a verdict, go, conditional, or no-go, and the figures behind it.&lt;/p&gt;

&lt;p&gt;The figures are the 70% rule and the maximum allowable offer, the cushion between that offer and the price, flip profit after closing costs, selling costs, points, and interest carry, cash-on-cash on the cash actually left in the deal, DSCR when there is rent and a loan payment, and a list of flags a hard-money lender tends to catch. Those flags include a loan over 70% of ARV, loan-to-cost over 90%, a rehab bigger than the purchase, a term shorter than the hold, and profit under $15,000 or under 10% of ARV.&lt;/p&gt;

&lt;p&gt;The arithmetic is ordinary Python. An open-weight model writes a two-paragraph memo from those figures. It is told not to redo the math. If you do not set an API key, an offline writer produces the memo from the same figures, and the verdict does not change.&lt;/p&gt;

&lt;p&gt;Who would pay: a wholesaler screening a lot of deals in a week, or a newer flipper who has had a lender kick a file back for something the 70% rule does not show. I would charge for a check that runs before they call the seller back. I would not charge for a platform. I have not charged anyone, and I have not put this in front of a user.&lt;/p&gt;

&lt;p&gt;This is the sample deal in the repo:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Asking 165k, needs about 48k rehab, ARV 310k, rents for $1,950. Hard money at 11.5% interest-only, 2 points, 12-month term, 85% LTC. Taxes $210/mo, insurance $140/mo. Plan to hold 5 months.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The 70% rule MAO is $169,000. The price is $4,000 under that, so a napkin check says yes. Profit after the default costs (3% buyer closing, 8% selling costs, two points, and five months of interest, tax, and insurance) is $53,204. Cash in is $50,946, so cash-on-cash on the project is 104.4%, about 250.6% if you annualize a five-month hold. DSCR on the bridge payment is 0.78, which means the rent does not carry the hard-money loan. The verdict is conditional, because a $4,000 cushion is under the $5,000 floor the tool uses. One missed repair item and the deal fails the same rule it just passed. The weak bridge DSCR is reported as a note. A hard-money lender is not running a 1.25 DSCR test on a 12-month interest-only note, and treating it as a no-go would cry wolf on almost every flip.&lt;/p&gt;

&lt;p&gt;That split is the product. The rule of thumb and the lender's file are not the same test. The 70% rule already hides a rough allowance for costs and profit. Flip Check still subtracts the line items, and it shows which defaults it used, because those are different questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;There is no hosted demo. I did not deploy it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;".[dev]"&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; uvicorn app.main:app &lt;span class="nt"&gt;--host&lt;/span&gt; 127.0.0.1 &lt;span class="nt"&gt;--port&lt;/span&gt; 8741
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;a href="http://127.0.0.1:8741" rel="noopener noreferrer"&gt;http://127.0.0.1:8741&lt;/a&gt; and use Load example, or visit &lt;code&gt;/?example=1&lt;/code&gt;. The same check from the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; app.cli &lt;span class="nt"&gt;--example&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Verdict                CONDITIONAL
70% rule MAO           $169,000
Price                  $165,000
Cushion                $4,000
Profit                 $53,204
Cash in                $50,946
Cash-on-cash           104.4%
Annualized             250.6%
DSCR on the bridge     0.78
Loan                   $181,050
ARV LTV                58.4%
Loan-to-cost           85.0%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The screenshot below is the local page on that example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6lkki9m24ry3p71nk3gr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6lkki9m24ry3p71nk3gr.png" alt="Flip Check showing a conditional verdict on the sample deal" width="800" height="933"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/cryptobandit/flip-check" rel="noopener noreferrer"&gt;Flip Check&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MIT license.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The decision path is split on purpose.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app/analyze.py&lt;/code&gt; computes every figure the verdict uses. The thresholds are constants at the top of that file. &lt;code&gt;tests/test_analyze.py&lt;/code&gt; locks the sample deal, including the interest-only carry, and it locks a standard $100,000, 6%, 30-year payment at $599.55. The model never sees a deal until those numbers exist.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app/parse.py&lt;/code&gt; reads a paste. It accepts JSON, &lt;code&gt;key: value&lt;/code&gt; lines, and a looser message like the sample (&lt;code&gt;165k&lt;/code&gt;, &lt;code&gt;$1,950&lt;/code&gt;, &lt;code&gt;11.5%&lt;/code&gt;, &lt;code&gt;2 points&lt;/code&gt;, &lt;code&gt;85% LTC&lt;/code&gt;, &lt;code&gt;hold 5 months&lt;/code&gt;). Parsing is deterministic and tested with no network call.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app/explain.py&lt;/code&gt; sends the finished analysis to an OpenAI-compatible chat completions endpoint. Three environment variables configure it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;FLIPCHECK_BASE_URL&lt;/code&gt;, default &lt;code&gt;http://127.0.0.1:11434/v1&lt;/code&gt;, which is Ollama's local OpenAI-compatible server&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FLIPCHECK_MODEL&lt;/code&gt;, default &lt;code&gt;qwen2.5:7b&lt;/code&gt;, the Ollama tag for Qwen2.5 7B Instruct, an open-weight model&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FLIPCHECK_API_KEY&lt;/code&gt;, no default. Empty means do not call the network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;llama.cpp's server, vLLM, or a hosted endpoint for the same class of model work by changing those three. The prompt says the verdict is already decided, to use only the numbers in the JSON, and to write two short paragraphs with no slogans. If the key is missing, the request fails, or the reply is empty, the offline writer fills the same two paragraphs from the same JSON. The page labels which one you got. Tests use a fake client to check that the base URL, the key, and the model are the ones from the environment, and that a failed call falls back without putting the key in the warning.&lt;/p&gt;

&lt;p&gt;The web UI is one HTML page served by FastAPI. The CLI is &lt;code&gt;python3 -m app.cli&lt;/code&gt;. Both call &lt;code&gt;app/service.py&lt;/code&gt;. &lt;code&gt;pytest&lt;/code&gt; covers the math, the parser, the API, and the CLI. Nothing in the test run calls a live model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;A wholesaler's deal tape is the business. Price, rehab, rent, and the lender's terms describe an off-market lead. Pointing Flip Check at a local open-weight model keeps that text on the machine. A closed API would make the privacy of the lead depend on a vendor's retention policy.&lt;/p&gt;

&lt;p&gt;The job the model does is small. It writes a memo from numbers the code already produced, which is why a 7B open-weight model is enough and why the verdict does not depend on it. Someone screening deals may run this dozens of times a week. Local inference is electricity. A closed meter charges for the paragraph, which is the cheap part, and still does not make the arithmetic more trustworthy. If a better small model comes out, you change &lt;code&gt;FLIPCHECK_MODEL&lt;/code&gt;. The analyzer stays.&lt;/p&gt;

&lt;p&gt;I did not fine-tune anything. The open piece is the right to run the explaining model yourself and to replace it. The part that has to be right every time is not a model at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I do not have a DevRelay session for this build. Nothing to embed. The commits are the record of how it went together.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
