quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
156 stars 23 forks source link

Match style guide step #3428

Closed OAGr closed 1 week ago

OAGr commented 2 weeks ago

Thinking through this:

We have steps for GenerateCode, FixCodeUntilItRuns, AdjustToFeedback, MatchStyleGuide.

The order is GenerateCode --> FixCodeUntilItRuns --> AdjustToFeedback --> MatchStyleGuide.

At each of the latter 3 stages, if the code changes, it should go back to a pipeline to make sure that the code runs, then run it through AdjustToFeedback.

In addition, we'd ideally have rules like:

  1. Each workflow "branch" could only go through the AdjustToFeedback and MatchStyleGuide stages ~2x each.
  2. If FixCodeUntilItRuns has to run more than ~4 times, it rolls back to the last [working version, or makes a new GenerateCode or similar]

We have templates for CreateSquiggle and FixSquiggle.

We want CreateSquiggle WorkflowTemplate to go through all the steps. We want FixSquiggle to only do FixCodeUntilItRuns and AdjustToFeedback. We will soon want a "StyleSquiggle" WorkflowTemplate that just does the MatchStyleGuide step, maybe configured to be very likely to actually run (as opposed to rejecting, saying that the style guide is already good enough).

Claude made this diagram. I think this diagram has some problems, but I think it's not too bad at giving a rough idea for how this could work.

image
vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview Nov 13, 2024 0:31am
squiggle-website ✅ Ready (Inspect) Visit Preview Nov 13, 2024 0:31am
2 Skipped Deployments | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **quri-ui** | ⬜️ Ignored ([Inspect](https://vercel.com/quantified-uncertainty/quri-ui/HrHW78SXNbN2a2TMFiM1Tpvx1vDZ)) | [Visit Preview](https://quri-ui-git-matchstyleguidestep-quantified-uncertainty.vercel.app) | Nov 13, 2024 0:31am | | **squiggle-components** | ⬜️ Ignored ([Inspect](https://vercel.com/quantified-uncertainty/squiggle-components/DZqsdcQtiEsUuBsZamxZbxPffaWg)) | [Visit Preview](https://squiggle-components-git-matchstyl-10c683-quantified-uncertainty.vercel.app) | Nov 13, 2024 0:31am |
changeset-bot[bot] commented 2 weeks ago

⚠️ No Changeset found

Latest commit: 90f205f924057a63d3f4a17ee3fa0b7d215f121e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR