metalworks.contract — the stable surface you can depend on.
Demand research
The research vertical turns a question into a grounded report.ResearchBrief— what you want to learn: the question, the subreddits to cover, success criteria, and a relevance rubric. The input. Build one by hand, letMetalworks().plan(prompt)walk the planner, or just pass a question string to.research().DemandReport— the output:ranked_clusters, webfindings, audience and market sizing, averdict, and apartial/caveatpair set when a best-effort stage degraded.InsightCluster— one ranked theme, scored bydemand_score(which weights distinct-author breadth above single-post virality). Carries aclaim,distinct_author_count,mention_count, asignalchip, and itsquotes.QuoteCitation— a real Reddit quote whosetextexact-matches a stored comment. A cluster with zero verified quotes is never shipped (no-quote-no-theme).WebFinding— a web claim whosesource_urlcomes from the grounding tool’s citation metadata, never from model prose.
Reddit engagement
The Reddit vertical searches, reads, and (carefully) acts.RedditPost/RedditComment— the corpus primitives (title, body, score, permalink, saltedauthor_hash).SubredditIntel— community metadata: description, subscribers, rules, top posts.Opportunity— a discovered thread + a drafted reply + its compliance verdict. The discovery loop emits these; nothing is ever posted from one without an explicit, gated action.ComplianceVerdict— the deterministic gate’s output:pass_,violations,confidence. Below a confidence threshold the caller escalates to the LLM judge.DiscoveryContext— the public seam you inject your knowledge through:voice_guidelines,winning_examples,pinned_notes,avoid, andpersonas.Persona/PersonaSet— voice profiles keyed by account type. Thebackgroundfield MUST be authentic; fabricated backstories are prohibited.
How they connect
Both verticals consume the same swappable protocols —ChatModel,
EmbeddingProvider, SearchProvider, CorpusReader, and the typed storage
repos. See Building blocks for the protocols, and the
Protocols reference for their exact shapes.