Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a131100
Merge pull request #1 from MatheusBBarni/codex/update-layout-for-prd-…
MatheusBBarni Apr 11, 2026
6165d94
Add project-scoped setup and document settings flow
MatheusBBarni Apr 11, 2026
dfb8369
Refactor Tauri lib into focused Rust modules
MatheusBBarni Apr 11, 2026
cafcf5e
Add tauri dev script and require Context7 for docs
MatheusBBarni Apr 11, 2026
14c9c39
Polish settings layout and unify workspace path display
MatheusBBarni Apr 12, 2026
549d87f
Implement project-scoped multi-session chat workspace
MatheusBBarni Apr 12, 2026
3a31698
perf(app): skip redundant agent resets on session change
MatheusBBarni Apr 12, 2026
c5b1cce
chore(workspace): add AI assistant configuration files
MatheusBBarni Apr 12, 2026
7aab492
Convert chat topics to HeroUI cards with action dropdown
MatheusBBarni Apr 12, 2026
2b3d004
Ignore .specforge in Tailwind and Vite watch
MatheusBBarni Apr 12, 2026
dd08d73
Make Caveman built in and fix project settings persistence
MatheusBBarni Apr 12, 2026
8793145
Fix model selection and workspace tree state resets
MatheusBBarni Apr 12, 2026
58fe5b5
refactor: comprehensive project improvements
MatheusBBarni Apr 14, 2026
9e9377b
Merge pull request #2 from MatheusBBarni/b/116a37e2
MatheusBBarni Apr 14, 2026
b8ed74a
refactor: move PRD/spec generation to Cursor SDK
MatheusBBarni Apr 29, 2026
a2d31e8
feat: add review-first Dracula workspace UI
MatheusBBarni Apr 30, 2026
4cb2598
refactor: align review workspace and model settings
MatheusBBarni Apr 30, 2026
765dff5
feat: move review UI state to zustand
MatheusBBarni Apr 30, 2026
1ed7c0e
Refactor settings screens to read from stores
MatheusBBarni Apr 30, 2026
4eb98b6
Refactor chat screen layout
MatheusBBarni Apr 30, 2026
94cf3dd
Add chat-local model controls and compact context chips
MatheusBBarni Apr 30, 2026
04b2efe
Refine chat suggestions and select controls
MatheusBBarni Apr 30, 2026
8b254a6
Refine chat composer suggestions overlay
MatheusBBarni Apr 30, 2026
014c4de
Merge chat model and reasoning into compact dropdown
MatheusBBarni Apr 30, 2026
35e9e7a
Refactor cursor SDK sidecar and normalize project paths
MatheusBBarni Apr 30, 2026
ad4dba5
Refine review layout and project open flow
MatheusBBarni Apr 30, 2026
222e7ec
Allow empty states to expand in PRD view
MatheusBBarni Apr 30, 2026
91cf0df
Refine settings and PRD empty states
MatheusBBarni Apr 30, 2026
7e991da
Refine settings layout and chat session actions
MatheusBBarni Apr 30, 2026
dd18cf7
Refine settings header and chat rename label
MatheusBBarni Apr 30, 2026
1b81ef5
Expand PRD empty state and tab settings panels
MatheusBBarni Apr 30, 2026
e0fc762
Add syntax highlighting to file previews
MatheusBBarni Apr 30, 2026
37e96e5
Add built-in grill-me PRD and spec actions
MatheusBBarni Apr 30, 2026
d51c8ef
Merge origin/main into refactor/cursor-sdk
MatheusBBarni Apr 30, 2026
6876bda
Preserve dynamic Cursor model IDs
MatheusBBarni Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ src-tauri/gen/
*.log
Thumbs.db
.DS_Store

src-tauri/binaries/*
29 changes: 22 additions & 7 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
# Handoff

## Current Task
- Capture the current task, branch, and the user-facing outcome here before clearing context.
- Branch: `refactor/cursor-sdk`.
- Refactor PRD/spec generation from Codex/Claude ACP-backed Rust commands to Cursor SDK-backed generation.
- Current slice focuses on PRD/spec generation and settings, not chat migration.

## Key Decisions
- List the decisions that would be expensive to rediscover.
- `@cursor/sdk` cannot be bundled into the Vite webview because it imports Node/Bun runtime modules and native dependencies.
- React composes Cursor PRD/spec prompts and drives the existing generation flow.
- `src/cursorAgentRunner.ts` is the Bun-only SDK entry point; do not import it from webview code.
- Rust delegates Cursor generation to the Bun runner, stores the Cursor API key via OS credential storage, and saves generated Markdown.
- Cursor API keys are never written to `.specforge/settings.json` or localStorage.
- Chat execution still has the legacy Codex/Claude CLI path and is outside this slice.

## Open Questions
- List the questions that still need user input or follow-up implementation.
- Packaged app strategy for the Bun runner and `@cursor/sdk` dependency still needs a deliberate follow-up.
- Chat/execution migration to Cursor SDK remains pending.

## Files Modified
- Record the files changed in the current slice of work.
- Added Cursor SDK runtime files: `src/cursorAgentRunner.ts`, `src/lib/cursorAgentRuntime.ts`, `src-tauri/src/cursor_agent.rs`, `src-tauri/src/secrets.rs`.
- Updated settings/project state, config screens, PRD/spec handlers, runtime bridge, Rust models/project normalization, docs, and dependency manifests.

## Verification
- `bun run build`:
- `cargo check --manifest-path .\src-tauri\Cargo.toml`:
- `bun test`: passed, 77 tests.
- `bunx tsc --noEmit`: passed.
- `bun run lint`: passed with existing warnings.
- `bun run build`: passed.
- `cargo fmt --manifest-path .\src-tauri\Cargo.toml`: ran.
- `cargo check --manifest-path .\src-tauri\Cargo.toml`: passed.

## Next Steps
- List the next 1-3 concrete actions.
- Decide how the Bun Cursor runner should be bundled for packaged desktop builds.
- Migrate chat/execution off legacy Codex/Claude CLI runtime when ready.
- Address existing Biome warnings separately if a clean lint output is desired.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# SpecForge

SpecForge is a Tauri desktop app for spec-driven development. It helps you load a PRD or technical spec from each document pane, review the source and generated documents side by side, inspect the workspace, and hand an approved spec off to an AI coding agent with configurable autonomy.
SpecForge is a Tauri desktop app for spec-driven development. It helps you configure a project, generate and review PRD/spec documents with Cursor SDK agents, inspect the workspace, and keep approved implementation work visible through the desktop shell.

The current codebase is an MVP shell built with React, Zustand, Tailwind, HeroUI, Tauri, and Rust. It includes a browser-safe demo path for the web UI and a desktop runtime path for real filesystem, git, and CLI access.
The current codebase is an MVP shell built with React, Zustand, Tailwind, HeroUI, Tauri, and Rust. It includes a browser-safe demo path for the web UI and a desktop runtime path for real filesystem, git, secure Cursor API key storage, and document persistence.

## What It Does

- Imports PRD/spec content from Markdown and PDF files.
- Bundles `docs/PRD.md` and `docs/SPEC.md` into the app as the default startup documents.
- Scans a workspace folder while respecting `.gitignore`.
- Lets you review and edit PRD/spec documents in a split workspace.
- Shows environment health for Claude CLI, Codex CLI, and Git.
- Saves the Cursor API key in the OS credential store, not in `.specforge/settings.json`.
- Shows environment health for Cursor SDK key access and Git.
- Generates PRD/spec Markdown with editable Cursor agent descriptions.
- Streams agent output and supports stepped, milestone, and full-autonomy execution modes.
- Surfaces git diff review data before approvals.
- Falls back to simulated workspace and diff data when running outside the Tauri desktop shell.
Expand Down Expand Up @@ -39,7 +41,7 @@ The current codebase is an MVP shell built with React, Zustand, Tailwind, HeroUI
- Rust toolchain
- Tauri desktop prerequisites for your OS
- Git
- Optional: local `codex` and `claude` CLIs if you want environment detection and agent handoff to use real binaries
- Cursor API key for PRD/spec generation

## Getting Started

Expand All @@ -64,7 +66,7 @@ bun run tauri dev
Important:

- `bun run dev` is useful for UI work, but it uses fallback workspace/diff behavior when Tauri is not present.
- `bun run tauri dev` is required for real file access, workspace scanning, PDF parsing, git diffing, and CLI execution.
- `bun run tauri dev` is required for real file access, workspace scanning, PDF parsing, git diffing, secure Cursor key storage, and document saving.

## Common Commands

Expand All @@ -87,7 +89,8 @@ bun install --force

- The React app never talks to the shell or filesystem directly.
- All desktop/runtime operations flow through `src/lib/runtime.ts`.
- Rust commands in `src-tauri/src/lib.rs` own filesystem access, workspace walking, PDF parsing, git diffing, and CLI process control.
- Rust commands in `src-tauri/src/lib.rs` own filesystem access, workspace walking, PDF parsing, git diffing, OS credential storage, and document saving.
- PRD/spec generation is run through a Bun TypeScript runner using `@cursor/sdk`; Rust delegates to that runner and saves the generated Markdown after the frontend receives it.
- Payloads crossing the Tauri boundary use camelCase.
- The desktop app preserves a demo path in browser mode so the UI can still be explored without native services.

Expand All @@ -102,4 +105,4 @@ If you change the review flow, model options, import flow, or autonomy behavior,

## Current Status

This repository is an active MVP. The review workspace, import flow, environment scan, diff preview, and simulated execution loop are implemented. Some product ideas documented in `docs/SPEC.md` are still aspirational and should be treated as roadmap material unless they are reflected in the current code.
This repository is an active MVP. The review workspace, import flow, Cursor SDK PRD/spec generation path, environment scan, diff preview, and simulated execution loop are implemented. Chat execution still has legacy CLI runtime code and is intentionally outside the current Cursor SDK refactor scope.
Loading