Skip to content
Agentmart
Submit a tool

homebot-defect-patterns

Repo-specific defect patterns for HomeBot/SADIE that pass every automated check and only fail in a built, running app — dead IPC channels, relative require()…

Skill by kingithegreat

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying homebot-defect-patterns?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kingithegreat-homebot-defect-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Repo-specific defect patterns for HomeBot/SADIE that pass every automated check and only fail in a built, running app — dead IPC channels, relative require() in the bundled main process, silent config fallbacks, duplicated boolean gates, and unmounted UI. Use when adding an IPC channel, a settings-driven feature, a renderer panel, or anything routed between local and cloud models; and when asked why something "works in tests but not in the app".

Use cases: design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/homebot-defect-patterns

What's inside

Skill name
homebot-defect-patterns
Description
Repo-specific defect patterns for HomeBot/SADIE that pass every automated check and only fail in a built, running app — dead IPC channels, relative require() in the bundled main process, silent config fallbacks, duplicated boolean gates, and unmounted UI. Use when adding an IPC channel, a settings-driven feature, a renderer panel, or anything routed between local and cloud models; and when asked why something "works in tests but not in the app".
License
MIT
Instructions
202 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# HomeBot defect patterns

Five failure shapes found in this codebase, all of which pass `tsc`, pass Jest,
build green, and still do nothing in the real app. Each is recorded because it
already shipped at least once — three of them shipped twice.

They share one root cause: **the automated checks verify the pieces, not the
wiring between them.** A test imports a module directly; a bundler resolves an
import that a runtime `require` will not; a renderer hydrates a value the main
process never sees. Nothing is red, and the feature is dead.

## Before you finish any change here, ask

1. **Can a human reach this?** Trace from a click to the code. If no path
   exists, it does not ship.
2. **Does the built bundle behave like the source?** Especially for the main
   process, which is bundled into one file.
3. **If this silently falls back, does anyone find out?**
4. **Is this decision already computed somewhere else?**

---

## 1. Relative `require()` never survives bundling

**Shape.** `electron-vite` bundles the whole main process into one
`out/main/index.js`. A static `import` is inlined by rollup. A runtime
`require('./thing')` is emitted verbatim, and at runtime there is no `./thing`
beside the bundle — `MODULE_NOT_FOUND`.

**Why nothing catches it.** `tsc` resolves the path. Unit tests import the
module directly. The build emits no warning. It fails only in a built app.

**How it presented.** Four instances shipped, three of them *silently* because
the `require` sat inside a `try/catch` that fell back to a default:

| Site | Symptom |
|---|---|
| `index.ts` | Morning briefing threw on every launch — listed as "Shipped", had never run |
| `permission-requester.ts` | Prompt timeout pinned to 60 s, silently disabling a configurable setting |
| `tools/vision.ts` | User's `visionModel` and `ollamaUrl` ignored |
| `tools/system.ts` | `open_in_browser` threw outright |

`tools/vision.ts` is the tell: it *already* imported from the same module
statically two lines above. The lazy `require` bought nothing and broke
everything.

**Rule.** Never use a relative `require()` in `widget/src/main/`. Node builtins
(`require('fs')`, `require('electron')`) are fine — they resolve at runtime.
Guarded by `widget/src/main/__tests__/bundle-integrity.test.ts`; if you think
you need an exception, you are re-introducing this bug.

---

## 2. Capability with no surface

**Shape.** Working, tested code that nothing can reach.

**Instances.** CRM had 20 tools and zero UI. Batch preview was fully
implemented with no call sites. `homebot:assistant-tool-activity` was emitted
from main with no preload whitelist entry and no listener. The terminal panel
was mounted behind a header that widget mode hides with
`display: none !important`.

**Rule.** When auditing "is X done", **grep for callers, not implementations.**
A new IPC channel is not done until it exists in *all four* places:

```
main: ipcMain.handle / webContents.send
  → preload: ALLOWED_CHANNELS entry
    → preload: bridge method
      → renderer: a component that calls it
```

If you cannot finish the chain, delete the orphan half or leave the control
hidden — never ship a dead button. `TerminalPanel`'s "Send to chat" is
deliberately hidden for exactly this reason.

---

## 3. Silent fallback hides misconfiguration

**Shape.** A feature is configured but unusable, so the code quietly does
something else. No error, no log the user reads, wrong behaviour forever.

**Instance.** Cloud chat: `useCustomLLM` was true with a Gemini model selected,
but the API key lived in the `geminiApiKey` vault while the router read
`customLLM.apiKey`. The gate evaluated false and every message went to local
qwen. The code's own comment read `// Silently fall back to Ollama`.

**Rule.** Distinguish *inactive by choice* from *intended but broken*. Only the
first is silent. If the user turned something on and it cannot run, say so on
the surface they are looking at — `resolveCloudLLM()` returns a
`misconfiguration` string precisely so callers cannot swallow it.

---

## 4. The same decision, computed in many places

**Shape.** One boolean expression copied across files, drifting apart.

**Instance.** "Is cloud chat active?" existed as **eleven** hand-rolled
expressions across `message-router.ts` and `ipc-handlers.ts`, with subtly
different logic — and none did the key hydration the renderer did. Same class:
the "direct path" logged `Cloud LLM active` then called a **local-only**
wrapper, so cloud requests ran on the local model with no badge and no error.

**Rule.** A routing decision gets exactly one function. When you find a copy,
replace all of them and delete any helper whose name invites misuse — the
local-only `streamFromOllama` wrapper was removed with a tombstone comment,
because leaving it next to cloud call sites is how the bug returns.

---

## 5. Renderer-only hydration (split brain)

**Shape.** The renderer massages a value for display; the main process reads
the raw one. The UI shows a configured feature that the backend considers
unset.

From kingithegreat/Sadie, MIT.

More from kingithegreat/Sadie

Signals

Stars
1
Forks
0
Open issues
1
Last commit (this folder)
Oct 20, 2026 (11 days ago)
Last release
Dec 14, 2025 (10 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from kingithegreat

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get homebot-defect-patterns running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying homebot-defect-patterns?

CallGet help
Cite this page

homebot-defect-patterns skill. Agent Mart. https://agentmart.dev/skills/kingithegreat-homebot-defect-patterns (last updated 2026-10-24)