Skip to content

feat: agent harness can run arbitrary workflows#385

Merged
gewenyu99 merged 16 commits intomainfrom
skill-runner
Apr 15, 2026
Merged

feat: agent harness can run arbitrary workflows#385
gewenyu99 merged 16 commits intomainfrom
skill-runner

Conversation

@gewenyu99
Copy link
Copy Markdown
Collaborator

@gewenyu99 gewenyu99 commented Apr 13, 2026

Once again I suggest looking at this in graphite

Run the workflow locally with:

node /<PATH>/wizard/dist/bin.js revenue --local-mcp 
Screenshot 2026-04-13 at 12 52 28 PM Screenshot 2026-04-12 at 12 51 21 PM Screenshot 2026-04-13 at 11 28 22 AM

@github-actions
Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci android
  • /wizard-ci angular
  • /wizard-ci astro
  • /wizard-ci django
  • /wizard-ci fastapi
  • /wizard-ci flask
  • /wizard-ci javascript-node
  • /wizard-ci javascript-web
  • /wizard-ci laravel
  • /wizard-ci next-js
  • /wizard-ci nuxt
  • /wizard-ci python
  • /wizard-ci rails
  • /wizard-ci react-native
  • /wizard-ci react-router
  • /wizard-ci sveltekit
  • /wizard-ci swift
  • /wizard-ci tanstack-router
  • /wizard-ci tanstack-start
  • /wizard-ci vue

Test an individual app:

  • /wizard-ci android/Jetchat
  • /wizard-ci angular/angular-saas
  • /wizard-ci astro/astro-hybrid-marketing
Show more apps
  • /wizard-ci astro/astro-ssr-docs
  • /wizard-ci astro/astro-static-marketing
  • /wizard-ci astro/astro-view-transitions-marketing
  • /wizard-ci django/django3-saas
  • /wizard-ci fastapi/fastapi3-ai-saas
  • /wizard-ci flask/flask3-social-media
  • /wizard-ci javascript-node/express-todo
  • /wizard-ci javascript-node/fastify-blog
  • /wizard-ci javascript-node/hono-links
  • /wizard-ci javascript-node/koa-notes
  • /wizard-ci javascript-node/native-http-contacts
  • /wizard-ci javascript-web/saas-dashboard
  • /wizard-ci laravel/laravel12-saas
  • /wizard-ci next-js/15-app-router-saas
  • /wizard-ci next-js/15-app-router-todo
  • /wizard-ci next-js/15-pages-router-saas
  • /wizard-ci next-js/15-pages-router-todo
  • /wizard-ci nuxt/movies-nuxt-3-6
  • /wizard-ci nuxt/movies-nuxt-4
  • /wizard-ci python/meeting-summarizer
  • /wizard-ci rails/fizzy
  • /wizard-ci react-native/expo-react-native-hacker-news
  • /wizard-ci react-native/react-native-saas
  • /wizard-ci react-router/react-router-v7-project
  • /wizard-ci react-router/rrv7-starter
  • /wizard-ci react-router/saas-template
  • /wizard-ci react-router/shopper
  • /wizard-ci sveltekit/CMSaasStarter
  • /wizard-ci swift/hackers-ios
  • /wizard-ci tanstack-router/tanstack-router-code-based-saas
  • /wizard-ci tanstack-router/tanstack-router-file-based-saas
  • /wizard-ci tanstack-start/tanstack-start-saas
  • /wizard-ci vue/movies

Results will be posted here when complete.

Copy link
Copy Markdown
Collaborator Author

gewenyu99 commented Apr 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gewenyu99 gewenyu99 changed the title Draft of revenue analytics workflow feat: revenue analytics workflow Apr 13, 2026
@gewenyu99 gewenyu99 requested a review from a team April 13, 2026 17:44
Copy link
Copy Markdown
Collaborator

@sarahxsanders sarahxsanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worked locally!! and other wizard runs are working as well :)

a few things:
- didn't realized I needed the feat/revenue-analytics-setup-skillbranch in context-mill checked out to test, might want to add to description!
- wizard remarks flagged this which should be fixed: the skill's SKILL.MD has no greenfield path so the wizard actually just used it's claude brain and improvised to create stripe.js. there's only guidance in the skill for when code exists in the first place, not when it doesn't exist at all

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

didn't realized I needed the feat/revenue-analytics-setup-skillbranch in context-mill checked out to test, might want to add to description!

OOoo I think this should work with latest main? It is merged 👀

wizard remarks flagged this which should be fixed: the skill's SKILL.MD has no greenfield path so the wizard actually just used it's claude brain and improvised to create stripe.js. there's only guidance in the skill for when code exists in the first place, not when it doesn't exist at all

What do you mean by this? Like when there is no stripe integration or no stripe.js specifically? This shouldn't even run without both a PostHog integration and stripe integration already in place :O

Copy link
Copy Markdown
Collaborator

it didn't work in main :hmmmm I'll retry though

for the wizard remarks: I ran it on a tmp app claude made that didn't have stripe set up correctly (didn't realize until after the fact lol) but it detected the presence of the folder it should have been in. so it set Stripe up for me before correctly setting up rev analytics too 👀 wasn't sure if this was intended

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

so it set Stripe up for me before correctly setting up rev analytics too 👀 wasn't sure if this was intended

yikes we gotta tell it not to do that omg

Copy link
Copy Markdown
Collaborator

replicated it: detection checks only package.json for stripe not whether stripe is actually used in any code. so any project with stripe installed will trigger it and the agent sets up from scratch. we should def limit this. fix would be in src/lib/workflows/revenue-analytics.ts and we'd need it to check for Stripe imports in source files, not just package.json

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

@sarahxsanders Try with this workbench branch and main on context mill!
PostHog/wizard-workbench#1115

I'm gonna address the other concern through the context mill

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-04-14 at 11 18 45 AM

Added an abort signal when we find invalid posthog or stripe integrations we can use, gonna push it up @sarahxsanders

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

Abort on wizard: https://app.graphite.com/github/pr/PostHog/wizard/389?mode=tour

Abort logic just added to context mill guardrails

@edwinyjlim
Copy link
Copy Markdown
Member

edwinyjlim commented Apr 14, 2026

@gewenyu99 big PR, but it's mostly organization and wrapper abstractions

#388

graphite link

edwinyjlim and others added 4 commits April 14, 2026 12:27
## Problem

chasing the 🐇 down the 🕳️ 

[graphite link](https://app.graphite.com/github/pr/PostHog/wizard/388?mode=tour)

tl;dr 

- **One runner** (`agent-runner.ts`) with a configurable pipeline
- **One config type** (`WorkflowRun`) that controls what varies between workflows
- **Extracted detection modules** that any workflow can call
- **A workflow registry** that auto-wires CLI subcommands and TUI flows
- **Prompt assembly** that can run a custom prompt, a skill, or both

```bash
wizard                    // core integration workflow
wizard integrate          // core integration workflow
wizard revenue            // revenue analytics workflow
wizard skill={skill-id}   // runs any skill from context mill
```


<img width="3046" height="2303" alt="image" src="https://github.com/user-attachments/assets/ba0000d6-ec70-46da-99b9-7a3774eba9a9" />
@gewenyu99 gewenyu99 marked this pull request as ready for review April 14, 2026 17:40
@gewenyu99 gewenyu99 requested review from a team and sarahxsanders April 14, 2026 18:50
@edwinyjlim edwinyjlim changed the title feat: revenue analytics workflow feat: agent harness can run arbitrary workflows Apr 14, 2026
@edwinyjlim edwinyjlim requested a review from joshsny April 15, 2026 15:09
Copy link
Copy Markdown
Collaborator

@sarahxsanders sarahxsanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the stripe detection thing is all fixed!

definitely add the abort boundaries for the core wizard run, but lgtm

Comment thread .claude/skills/adding-skill-workflow/SKILL.md
Comment thread .claude/skills/adding-skill-workflow/references/WORKFLOW-GUIDE.md
Comment thread src/lib/workflows/revenue-analytics/detect.ts
@daniloc
Copy link
Copy Markdown
Collaborator

daniloc commented Apr 15, 2026

big question: how does this interact with the mainline integration? everyone new should be getting this treatment too right?

@gewenyu99
Copy link
Copy Markdown
Collaborator Author

big question: how does this interact with the mainline integration? everyone new should be getting this treatment too right?

Mainline is using workflows, but on the outside will be functionally identical

Copy link
Copy Markdown
Collaborator Author

gewenyu99 commented Apr 15, 2026

Merge activity

  • Apr 15, 5:30 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 15, 5:34 PM UTC: Graphite couldn't merge this PR because it had merge conflicts.
  • Apr 15, 5:53 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 15, 5:53 PM UTC: @gewenyu99 merged this pull request with Graphite.

@gewenyu99 gewenyu99 changed the base branch from big-refactor-1 to graphite-base/385 April 15, 2026 17:31
@gewenyu99 gewenyu99 changed the base branch from graphite-base/385 to main April 15, 2026 17:33
@gewenyu99 gewenyu99 merged commit 34aa648 into main Apr 15, 2026
18 checks passed
@gewenyu99 gewenyu99 deleted the skill-runner branch April 15, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants