{"modules":[{"id":"web","name":"Web server","whatItDoes":"Serves the landing page and the standard status endpoints; entry point with config, logging, error envelope and graceful shutdown.","dependsOn":["status-foundation"],"parent":null,"checks":[{"id":"process-alive","kind":"alive","expect":"a pid and uptime are reported"}]},{"id":"landing","name":"Landing page","whatItDoes":"The page a person sees when they open the app: the app's name, its state, and links to the status endpoints.","dependsOn":["web"],"parent":"web","checks":[{"id":"landing-renders","kind":"alive","expect":"non-empty HTML naming the app"}]},{"id":"gate","name":"Public lock (the app proves a stranger is refused)","whatItDoes":"Runs the same gate-check the deploy runs, against the app's own address on every status poll, so the monitor shows whether this app is readable from the internet while it is still being built.","dependsOn":["web"],"parent":null,"checks":[{"id":"public-lock","kind":"quality","expect":"a stranger is refused on every declared data route, or the app declares itself public with a reason"}]},{"id":"ranking","name":"Ranking engine (the arithmetic behind the order)","whatItDoes":"Turns factors weighted -10..+10 and the AI's 0-10 ratings of each candidate into a score, orders the candidates, demotes anything matching a veto (\"must never\"), and writes the one-sentence reason for each position. The AI never sorts the list.","dependsOn":[],"parent":null,"checks":[{"id":"ranking-engine-sound","kind":"quality","expect":"a vetoed candidate is demoted and explained, scores stay inside -100..100"}]},{"id":"storage","name":"Storage (decisions, factors, candidates, prices)","whatItDoes":"Remembers everything the app is for: who you are, your decisions, the factors and their weights, the candidates the AI found, how each candidate rates against each factor, and what every watched product used to cost. The schema is versioned SQL in the repo and rebuildable from it; every query lives in one file; the database enforces one admin and refuses to let one person read another's decision.","dependsOn":[],"parent":null,"checks":[{"id":"database-reachable","kind":"outcome","expect":"the database opens, the schema is applied, and the users and decisions tables answer"}]},{"id":"ai","name":"AI connection (OpenAI-compatible)","whatItDoes":"One connection for the whole app, set by the admin in Settings: base URL, key, model. Sends the prompts, reads the answer (including JSON wrapped in chatter), retries once or twice on a busy server, and turns a bad connection into a sentence a human can act on. The key never leaves the server.","dependsOn":[],"parent":null,"checks":[{"id":"ai-client-sound","kind":"quality","expect":"incomplete connections refused, key never shown, answers readable"}]},{"id":"design","name":"Design system (pinned from the kit)","whatItDoes":"Pins one version of the Build Kit stylesheet and serves this app's own identical copy of it, so the app looks like every other kit app and its pages still look right if the central stylesheet cannot be reached; the design checks run in the suite and in this catalog.","dependsOn":["web"],"parent":null,"checks":[{"id":"design-conformant","kind":"quality","expect":"the stylesheet and the landing page pass the design standard"}]},{"id":"screens","name":"Screens (every page and action)","whatItDoes":"One server, one port, no framework. Serves the sign-in screen, the two tabs, one decision's factors and results, and the admin's settings; handles every form; answers `/api/cases` as JSON for the owner only and `/api/login` for machines (the route the deploy gate proves a real login with); and answers the status endpoints and the landing page without asking for a session. A request body is read once and parsed once — the failure that made the JSON login return 401 is in `failure-register.md`.","dependsOn":["auth","storage","ranking","ai-flow","design","status-foundation"],"parent":null,"checks":[{"id":"pages-render","kind":"alive","expect":"the sign-in, home, decision and settings screens render with their forms, tabs, slider and empty states"}]},{"id":"auth","name":"Sign-in (passwords, sessions, invites)","whatItDoes":"Hashes passwords with scrypt and a random salt, signs the session cookie so it cannot be edited, keeps the session in the database so signing out really revokes it, rate-limits failed logins per client and globally, and turns an invite link into an account with an expiry.","dependsOn":[],"parent":null,"checks":[{"id":"sign-in-required","kind":"quality","expect":"a wrong password, an edited session, an expired session and an expired invite are all refused"}]},{"id":"ai-flow","name":"AI flow (what is asked, what is accepted)","whatItDoes":"Builds the two prompts — factors (with at most four questions) and candidates rated 0-10 per factor — carrying every weight and naming a veto as a veto, then reads the answer strictly: ratings clamped to 0-10, ratings for factors that do not exist dropped, a link that is not http(s) refused, and an answer with no factors refused rather than stored.","dependsOn":["ai"],"parent":null,"checks":[{"id":"ai-flow-sound","kind":"quality","expect":"prompts carry the weights and the veto rule, answers are clamped and capped"}]},{"id":"prices","name":"Price watching (daily, no email)","whatItDoes":"Once a day, reads the price a watched shop publishes for machines (schema.org or Open Graph) off the page, records every reading, records an unreadable page as a miss with a reason, and flags a jump of more than 80% as probably a different product.","dependsOn":["storage"],"parent":null,"checks":[{"id":"price-reading-sound","kind":"quality","expect":"five price formats and two page formats are read, and a page with no price produces no price"}]},{"id":"status-foundation","name":"Status engine (vendored from modules/status-foundation)","whatItDoes":"Tiers, catalog runner with push-on-change, state, the hierarchy, and the /status/summary, /status/modules and /status/onboarding endpoints. Every state change is also POSTed to the monitor's `/push` with this app's own token (`src/monitor-push.js`), so the monitor hears about a change instead of waiting for its next poll; a monitor that is down is logged and swallowed, because polling is the backstop.","dependsOn":[],"parent":null,"checks":[{"id":"module-map-valid","kind":"alive","expect":"no parse errors"},{"id":"standard-conformant","kind":"quality","expect":"no conformance errors"}]},{"id":"tests","name":"Test suite","whatItDoes":"Verifies config, errors, logging, the landing page, the running status endpoints, and the app boot + SIGTERM shutdown; it runs the same catalog the monitor consumes.","dependsOn":["web","status-foundation"],"parent":null,"checks":[{"id":"standard-conformant","kind":"quality","expect":"map and catalog agree"}]}],"tree":[{"id":"web","name":"Web server","whatItDoes":"Serves the landing page and the standard status endpoints; entry point with config, logging, error envelope and graceful shutdown.","dependsOn":["status-foundation"],"parent":null,"checks":[{"id":"process-alive","kind":"alive","expect":"a pid and uptime are reported"}],"depth":0,"children":[{"id":"landing","name":"Landing page","whatItDoes":"The page a person sees when they open the app: the app's name, its state, and links to the status endpoints.","dependsOn":["web"],"parent":"web","checks":[{"id":"landing-renders","kind":"alive","expect":"non-empty HTML naming the app"}],"depth":1,"children":[]}]},{"id":"gate","name":"Public lock (the app proves a stranger is refused)","whatItDoes":"Runs the same gate-check the deploy runs, against the app's own address on every status poll, so the monitor shows whether this app is readable from the internet while it is still being built.","dependsOn":["web"],"parent":null,"checks":[{"id":"public-lock","kind":"quality","expect":"a stranger is refused on every declared data route, or the app declares itself public with a reason"}],"depth":0,"children":[]},{"id":"ranking","name":"Ranking engine (the arithmetic behind the order)","whatItDoes":"Turns factors weighted -10..+10 and the AI's 0-10 ratings of each candidate into a score, orders the candidates, demotes anything matching a veto (\"must never\"), and writes the one-sentence reason for each position. The AI never sorts the list.","dependsOn":[],"parent":null,"checks":[{"id":"ranking-engine-sound","kind":"quality","expect":"a vetoed candidate is demoted and explained, scores stay inside -100..100"}],"depth":0,"children":[]},{"id":"storage","name":"Storage (decisions, factors, candidates, prices)","whatItDoes":"Remembers everything the app is for: who you are, your decisions, the factors and their weights, the candidates the AI found, how each candidate rates against each factor, and what every watched product used to cost. The schema is versioned SQL in the repo and rebuildable from it; every query lives in one file; the database enforces one admin and refuses to let one person read another's decision.","dependsOn":[],"parent":null,"checks":[{"id":"database-reachable","kind":"outcome","expect":"the database opens, the schema is applied, and the users and decisions tables answer"}],"depth":0,"children":[]},{"id":"ai","name":"AI connection (OpenAI-compatible)","whatItDoes":"One connection for the whole app, set by the admin in Settings: base URL, key, model. Sends the prompts, reads the answer (including JSON wrapped in chatter), retries once or twice on a busy server, and turns a bad connection into a sentence a human can act on. The key never leaves the server.","dependsOn":[],"parent":null,"checks":[{"id":"ai-client-sound","kind":"quality","expect":"incomplete connections refused, key never shown, answers readable"}],"depth":0,"children":[]},{"id":"design","name":"Design system (pinned from the kit)","whatItDoes":"Pins one version of the Build Kit stylesheet and serves this app's own identical copy of it, so the app looks like every other kit app and its pages still look right if the central stylesheet cannot be reached; the design checks run in the suite and in this catalog.","dependsOn":["web"],"parent":null,"checks":[{"id":"design-conformant","kind":"quality","expect":"the stylesheet and the landing page pass the design standard"}],"depth":0,"children":[]},{"id":"screens","name":"Screens (every page and action)","whatItDoes":"One server, one port, no framework. Serves the sign-in screen, the two tabs, one decision's factors and results, and the admin's settings; handles every form; answers `/api/cases` as JSON for the owner only and `/api/login` for machines (the route the deploy gate proves a real login with); and answers the status endpoints and the landing page without asking for a session. A request body is read once and parsed once — the failure that made the JSON login return 401 is in `failure-register.md`.","dependsOn":["auth","storage","ranking","ai-flow","design","status-foundation"],"parent":null,"checks":[{"id":"pages-render","kind":"alive","expect":"the sign-in, home, decision and settings screens render with their forms, tabs, slider and empty states"}],"depth":0,"children":[]},{"id":"auth","name":"Sign-in (passwords, sessions, invites)","whatItDoes":"Hashes passwords with scrypt and a random salt, signs the session cookie so it cannot be edited, keeps the session in the database so signing out really revokes it, rate-limits failed logins per client and globally, and turns an invite link into an account with an expiry.","dependsOn":[],"parent":null,"checks":[{"id":"sign-in-required","kind":"quality","expect":"a wrong password, an edited session, an expired session and an expired invite are all refused"}],"depth":0,"children":[]},{"id":"ai-flow","name":"AI flow (what is asked, what is accepted)","whatItDoes":"Builds the two prompts — factors (with at most four questions) and candidates rated 0-10 per factor — carrying every weight and naming a veto as a veto, then reads the answer strictly: ratings clamped to 0-10, ratings for factors that do not exist dropped, a link that is not http(s) refused, and an answer with no factors refused rather than stored.","dependsOn":["ai"],"parent":null,"checks":[{"id":"ai-flow-sound","kind":"quality","expect":"prompts carry the weights and the veto rule, answers are clamped and capped"}],"depth":0,"children":[]},{"id":"prices","name":"Price watching (daily, no email)","whatItDoes":"Once a day, reads the price a watched shop publishes for machines (schema.org or Open Graph) off the page, records every reading, records an unreadable page as a miss with a reason, and flags a jump of more than 80% as probably a different product.","dependsOn":["storage"],"parent":null,"checks":[{"id":"price-reading-sound","kind":"quality","expect":"five price formats and two page formats are read, and a page with no price produces no price"}],"depth":0,"children":[]},{"id":"status-foundation","name":"Status engine (vendored from modules/status-foundation)","whatItDoes":"Tiers, catalog runner with push-on-change, state, the hierarchy, and the /status/summary, /status/modules and /status/onboarding endpoints. Every state change is also POSTed to the monitor's `/push` with this app's own token (`src/monitor-push.js`), so the monitor hears about a change instead of waiting for its next poll; a monitor that is down is logged and swallowed, because polling is the backstop.","dependsOn":[],"parent":null,"checks":[{"id":"module-map-valid","kind":"alive","expect":"no parse errors"},{"id":"standard-conformant","kind":"quality","expect":"no conformance errors"}],"depth":0,"children":[]},{"id":"tests","name":"Test suite","whatItDoes":"Verifies config, errors, logging, the landing page, the running status endpoints, and the app boot + SIGTERM shutdown; it runs the same catalog the monitor consumes.","dependsOn":["web","status-foundation"],"parent":null,"checks":[{"id":"standard-conformant","kind":"quality","expect":"map and catalog agree"}],"depth":0,"children":[]}]}