Skip to content

Polish downstream features for marketing readiness#87

Draft
DealPatrol wants to merge 3 commits into
mainfrom
claude/repofuse-marketing-readiness-ys1u2v
Draft

Polish downstream features for marketing readiness#87
DealPatrol wants to merge 3 commits into
mainfrom
claude/repofuse-marketing-readiness-ys1u2v

Conversation

@DealPatrol

Copy link
Copy Markdown
Owner

Summary

  • Wire repo creation: "Generate Scaffold" button now prompts for a GitHub repo name and streams file generation + repo creation via /api/build-app (SSE), showing live progress in the UI. The old silent TODO is gone.
  • Code-completion DB fallback: When no codebaseSnippets are passed to /api/code-completion, the endpoint now queries repo_files by language extension (top 20 by reusability score) so completions have real project context. Covers both POST and PUT (batch) endpoints.
  • Real scaffold code: Fixed the /api/generate-scaffold prompt example so it shows functional code instead of // TODO: implement main logic, steering the AI to generate working implementations rather than stubs.

Test plan

  • Connect a GitHub repo, run an analysis, open Results page
  • Click "Generate Scaffold" on a discovered app — should prompt for repo name
  • Confirm progress panel appears and streams build steps
  • Verify repo link appears on completion and opens the new GitHub repo
  • Call POST /api/code-completion without codebaseSnippets — confirm it pulls snippets from DB (check selectedSnippets in response)
  • Call POST /api/generate-scaffold — confirm generated files contain real code, not TODO stubs

https://claude.ai/code/session_01Ujk2cGApHNmqYiokLy8PWx


Generated by Claude Code

…l scaffold code

- Wire "Generate Scaffold" button to /api/build-app (SSE) so clicking it
  prompts for a repo name then streams file generation + GitHub repo creation
  with live progress displayed in the UI. Removes the silent TODO.

- Implement DB fallback in /api/code-completion: when no codebaseSnippets
  are passed, query repo_files by language extension (top 20 by reusability
  score) and map them to CodeSnippet so completions have real project context.
  Covers both POST and PUT (batch) endpoints.

- Fix /api/generate-scaffold prompt example to use real functional code
  instead of "// TODO: implement main logic" so the AI generates working
  implementations rather than stub placeholders.

https://claude.ai/code/session_01Ujk2cGApHNmqYiokLy8PWx
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
repo-app-architect Ready Ready Preview, Comment Jun 12, 2026 5:28am
repofuse Ready Ready Preview, Comment, Open in v0 Jun 12, 2026 5:28am
v0-repo-app-architect Ready Ready Preview, Comment, Open in v0 Jun 12, 2026 5:28am

New feature: Projects — a persistent workspace for every app a user
builds through RepoFuse, from first idea to deployed product.

Database (scripts/02-create-projects.sql):
- `projects` table: name, description, status (planning/building/deployed/
  paused/archived), tech_stack, frontend_status, backend_status,
  repo_url, deployment_url, notes, linked blueprint
- `project_milestones` table: phase-grouped checklist items
  (planning/backend/frontend/integration/deployment)
- Auto-seeded default milestones on project creation (19 items covering
  the full SDLC)

API (/api/projects/**):
- GET/POST /api/projects — list and create projects
- GET/PATCH/DELETE /api/projects/[id] — project CRUD
- POST /api/projects/[id]/milestones — add milestone
- PATCH/DELETE /api/projects/[id]/milestones/[milestoneId] — toggle/delete

Dashboard (/dashboard/projects/**):
- Projects list: filter by status, stat counts, project cards with progress
  bars, tech stack pills, repo/deploy links
- Project detail with 3 tabs:
  - Overview: inline-editable description, notes, tech stack, links
  - Progress & Build: phase-grouped milestone checklist + AI Build panel
    that streams /api/build-app and auto-sets repo_url on completion
  - Settings: change status, frontend/backend status, edit all fields,
    delete project

Sidebar: Added "Projects" nav item (FolderOpen icon) between Overview
and Repos so it's immediately discoverable.

The A-Z loop: Discover app via Analysis → Start Project from blueprint →
Track milestones → Build with AI → Repo created → Deploy → Live link.

https://claude.ai/code/session_01Ujk2cGApHNmqYiokLy8PWx
Discovery prompt overhaul (run/route.ts, lib/app-discovery.ts):
- Add EXISTING PRODUCTS block to the prompt so the model explicitly sees
  what the user has already built and is forbidden from re-suggesting it
  or minor variants of it.
- Force cross-domain reuse: suggestions must target a different market/
  audience than the repos they borrow code from. Examples given so the
  model understands the concept (auth + billing from dev tool → gym portal).
- Capability-first framing: model must first inventory transferable
  capabilities (auth, payments, scraping, dashboards, AI, etc.) before
  proposing products, so it reasons from primitives rather than from
  surface-level similarity.
- Diversity constraint: no two suggestions may be in the same product
  category (spread across B2B SaaS, consumer, internal tool, marketplace,
  API-as-product, automation).
- Honest reuse: explicitly call out that a 40-60% reuse genuinely-new app
  beats a 95% reuse near-clone. Penalise inflated reuse scores.
- Distribution requirement: at most 1 quick win, at least 2 ambitious
  cross-domain products.
- Explanation now required to name which capabilities transfer and from
  which repos, plus first build step.

Model upgrades (5 files):
- lib/app-discovery.ts: was hardcoded to claude-3-5-sonnet-20241022,
  now uses getAnthropicModel() via central anthropic-model.ts helper.
- lib/cross-platform-scanner.ts: same old model → getAnthropicModel().
- lib/code-completion.ts: both call sites updated (POST + PUT endpoints).
- app/api/mcp/route.ts: env fallback updated from old sonnet to 4-5.
- app/api/analyze/route.ts: same fallback update.

https://claude.ai/code/session_01Ujk2cGApHNmqYiokLy8PWx
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.

2 participants