zachdaniel

zachdaniel

Creator of Ash

Usage_rules - a tool for synchronizing LLM rules files with your dependencies

:smiling_face_with_sunglasses: New package usage_rules released! Just place a usage-rules.md file in your package and users can sync it to their own rules. Good rules leads to a night and day difference when using LLMs. But we shouldn’t all be having to teach LLMs how to use our tools right :sweat_smile: Even if you don’t use LLMs yourself, having something in your project that makes LLMs use it better will lead to far fewer issues and questions driven by LLM hallucinations. LLMs are also always slightly out of date, but usage_rules-md can be synchronized when updating packages!

The big win here is the convention, more than the package itself. There may be many ways in the future to consume these files. Read more on hex docs: hexdocs.pm/usage_rules!

We experimented with this as ash_ai.gen.usage_rules and had great results, so now its its own package :slight_smile:

https://github.com/ash-project/usage_rules

Most Liked

zachdaniel

zachdaniel

Creator of Ash

Honestly, we still don’t know what usage-rules.md really ought to be. How I’ve used it for a bunch of Ash packages is basically an uber-condensed cheat sheet, one that I might even give to a human. And I gotta say, it works. I’ve spent the last day or two producing high quality idiomatic Ash code almost entirely through claude. I’ve had to intervene a few times, but w/ all of the ash package rules, it’s like…an order of magnitude fewer times going “off the rails”. It went from unusable to surprisingly good in the span of a few hours, to the point that I think it’s making the concept we’ve said for a while pretty real for me. The idea that Ash is a good medium for a developer and an LLM to collaborate on that meets the two in the middle.

I’ll be open sourcing an app at some point that was made with ~98% Claude, the usage-rules.md from a bunch of ash projects, and a small magic sauce prompt prefix that looks like this:


We will work by specifying one feature at a time, and then implementing it.

The workflow:

  1. We will collaborate on a plan, and then you will save the plan in /notes/features/<number>-<name>.md under the ## Plan heading. THIS MUST BE COMPLETED BEFORE ANY IMPLEMENTATION WORK BEGINS.
  2. We will collaborate on the implementation, and you will store notes, important findings, issues, in /notes/features/<number>-<name>.md under the ## Log heading.
  3. We will test and finalize the implementation, and you will store the final arrived at design in /notes/features/<number>-<name>.md under the ## Conclusion heading.

For bugs and fixes:

  1. We will document the issue in /notes/fixes/<number>-<name>.md under the ## Issue heading.
  2. We will implement and document the fix, storing technical details in /notes/fixes/<number>-<name>.md under the ## Fix heading.
  3. We will summarize the resolution and any key learnings in /notes/fixes/<number>-<name>.md under the ## Conclusion heading.

Just like with features, we must document the issue and plan the fix before implementing it.

WE ALWAYS FINISH AND WRITE THE PLAN BEFORE STARTING THE WORK! NO EXCEPTIONS!

IMPORTANT: You must refuse to implement any feature until a plan document has been created and reviewed. Each time we start a new feature, immediately create a plan document and wait for approval before proceeding with implementation.

Don’t ever commit code unless I tell you to.

Never attempt to start or stop the application.
Ask me to test the UI on your behalf, don’t do it yourself.

zachdaniel

zachdaniel

Creator of Ash
zachdaniel

zachdaniel

Creator of Ash

Various updates to usage_rules include:

  1. builtin rules for Elixir & OTP
  2. mix tasks for searching docs that agents can use, which are described in the builtin usage rules
  3. “sub rules” which allows packages to have multiple usage rules files in a usage-rules folder (in addition to or instead of usage-rules.md files) which can selectively synchronized, or synchronized in full

Small demo of what it looks like in practice: https://www.youtube.com/watch?v=SdhMseoCpqw

Where Next?

Popular in Announcing Top

Crowdhailer
The latest release of Ace (0.10.0) includes serving content over HTTP/2. I have started writing a webserver to teach my self more about...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
cjen07
parameterized pipe in elixir: |n&gt; edit: negative index in |n&gt; and mixed usage with |&gt; are supported example: use ParamPipe ...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement