Vector - AI-Powered Feedback to Code Pipeline

Inspiration

We love building in public. Initially, we got our start by posting reels on Instagram and TikTok, but recently, we made the switch to X due to one very simple reason: community engagement. It's not just us; thousands of other developers, from indie hackers to co-founders of major AI labs, rely on X as a means of garnering user feedback, gauging interest in products/features, and hashing out bugs.

Though X's core mission is to raise the voice of the people above all else, no solution exists that makes end users feel as though they're able to make meaningful contributions to the apps and websites they love. To restore ownership of our products to the millions of valued consumers on X, we created Vector.

What it does

Vector is an integrated feedback collector, bug fixer, and code developer that saves developers hours of grunt work and simultaneously makes users feel like they have a voice.

Vector Pipeline

When a developer posts on X, Vector deploys a Grok agent to monitor replies. For high-traction requests, the agent follows up via DMs (appearing as the original developer) to gather deeper feedback, including multimodal inputs like screenshots.

As tweets arrive, Vector generates embeddings using Grok-1 and uses Supabase's pgvector to cluster similar feedback. The system calculates severity scores (tweet count × 10 + likes × 2 + retweets × 5) to prioritize what matters most.

Vector classifies tweets with Grok-4-1-Fast-Reasoning and aggregates feedback into coherent issue descriptions. When the developer approves, Vector creates a sandbox environment, clones the repository, and analyzes its structure (language, test framework, build system). It then creates a GitHub issue enriched with specific file references and generates an implementation plan.

Vector takes a test-first approach, generating test cases with Grok before writing any code. It feeds these tests and the plan to Grok Code CLI, which runs in headless auto-approve mode to implement changes across the codebase.

Automated verification runs the test suite (pytest/jest/go test/cargo test), build commands, linters, type checkers, and a Grok self-review (scored 0-100). If any check fails, Vector generates a detailed fix prompt and iterates up to 3 times.

Once all checks pass, Vector commits the changes with a descriptive message, pushes the branch, and opens a PR with test results, build status, lint results, and review scores. After developer review and merge, it DMs the user about their implemented request.

How we built it

X Integration:

  • Account Activity API webhooks for monitoring replies
  • Python XDK for DM interactions
  • Grok-4-1-Fast-Reasoning for generating DM responses and summarizing multimodal inputs

Backend (Flask):

  • grok.py - xAI API integration
  • coder.py - Grok Code workflow orchestration
  • sandbox.py - Isolated git environments
  • testing.py - Automated verification suite
  • github_client.py - GitHub integration via gh CLI

AI Models:

  • Grok-1 - Generating embeddings for clustering
  • Grok-4-1-Fast-Reasoning - Plan generation and issue enrichment
  • Grok-Code-Fast-1 - Code implementation via CLI (headless mode with NDJSON streaming)

Frontend + Database (Supabase):

  • PostgreSQL + pgvector for vector similarity search
  • NextJS + TailwindCSS

Challenges we ran into

At first, the OAuth of the X API was giving us trouble, but thanks to some office hours trips, we eventually learned about the XDK, which was much easier to work with. The added code examples in the github were also helpful.

Accomplishments that we're proud of

We're proud of the immense value we're able to create by making users feel like they actually own the product. Their changes, if validated by the support of the community, are integrated into the products they use on a day-to-day basis. It's a major win-win since the developers also don't have to spend nearly as much time coding or scouring the web for scattered feedback.

What we learned

This was our first time using the X and xAI API/SDK, so it was cool to see how powerful they are when they work in tandem.

What's next for Vector

We intend to continue developing Vector to support more complex workflows and integrate with additional platforms beyond X.

Built With

  • flask
  • grok
  • nextjs
  • supabase
  • tailwindcss
  • x
  • xai
+ 7 more
Share this project:

Updates