Repository navigation
Description
Problem
When developers point a coding agent (Claude, Cursor, Codex, etc.) at a task involving Mellea, the generated code tends to be subpar. They invent APIs that don't exist, reach for antipatterns, don't do things the "melleaic way", etc.
This matters most for new users: their first experience is often mediated through an agent, and a bad first result reads as "Mellea doesn't work" rather than "the agent didn't know how to use Mellea." We need something a developer can drop into their own project's agent with minimal effort.
What we already have
docs/AGENTS_TEMPLATE.md: a genuinely good, opinionated guide (the@generativepattern, anti-patterns section, common errors table). But it lives in our repo and requires the developer to know it exists and copy it manually.agents/skills/: we already use the agentskills.io skill standard internally.m serve/mellea/stdlib/tools/mcp.py: Mellea can already expose generative programs as MCP tools. We don't yet have an MCP server that teaches an agent to write Melleadocs/examples/: a large corpus of runnable, idiomatic examples
Areas to investigate
These are the sub-tasks to evaluate and break out; the epic is about picking the right mix, not committing to all of them.
- Distributable agent skill(s): publish a "writing Mellea code" skill following the agentskills.io standard so any compatible agent can pick it up. Reuses
AGENTS_TEMPLATE.mdcontent; likely the lowest-friction path - MCP server for authoring: an MCP server the developer points their agent at, exposing tools like: search idiomatic examples, look up the correct API for a task, validate a snippet against current APIs, surface anti-pattern warnings
- Published, versioned
AGENTS.mdsnippet: a canonical, copy-pasteable block (oruvx-installable command that writes it) kept in sync with each release, so "the melleaic way" travels with the version the developer is actually on - Context/docs optimized for retrieval: a compact, agent-oriented docs bundle (not the full repo), shippable via
llms.txtor similar
Open questions
- Prioritization: which surface(s) do we ship for the next release, and which are follow-ups?
- Version sync: how do we keep guidance aligned with the version the developer actually has installed? Antipattern advice rots fast — stale guidance may be worse than none.
- Measurement: how do we know it's working? A likely approach: an eval harness that gives an agent N Mellea tasks with and without the enablement package and scores idiomaticity + correctness. (Scope TBD, could be its own sub-task.)
- Distribution: bundled with the
melleapip package? A separate install (mellea-agent-kit)? A hosted MCP endpoint?
Success criteria
A developer using a mainstream coding agent can, with a single low-friction step, get their agent to reliably produce idiomatic, correct, and current Mellea code, without hand-holding and without pasting the repo into context.
Activity
planetf1 commentedon Jul 24, 2026
We need to define some representative tasks that reflect what a real developer will try and do with mellea, help them understand the best approach in mellea (including balancing trade-offs). This could then be followed by devising an evaluation approach to try and get quantative metrics that we could then target for improvement.
We could also do the same at an earlier stage (discovery) which touches on SEO - that may belong better with our website work, though it is related. How does a developer even know mellea exists, or can address certain classes of problems
jakelorocco commentedon Jul 24, 2026
Some things I've noticed about trying to get agents to code Mellea:
planetf1 commentedon Jul 27, 2026
If you are working with any specific examples you could ask the agent why it chose to do those things….
antheducation commentedon Aug 6, 2026
Understood on #1506 — happy for it to wait on this discussion.
One thing from building it that may be useful for the "version sync" open question: the map in that PR wasn't hand-written, it was generated from a pinned commit — a script walks the
mellea/package, extracts the public import surface (140 modules,__all__-aware), and renders the pages deterministically. Regenerated per release in CI, that class of guidance can't rot: it always describes exactly what the installed version exports, which is also the failure mode @jakelorocco describes (agents inventing APIs that don't exist — an authoritative surface map is the cheapest counter to that).The same snapshot could just as easily emit a compact
llms.txt-style bundle for area 4 instead of (or alongside) human-facing pages, so the generator is reusable whichever surface you prioritize. If the discussion lands anywhere near area 3/4, #1506 is there as raw material — no attachment to its current form.