Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
345 commits
Select commit Hold shift + click to select a range
39af929
simplify projects
ctate Nov 10, 2025
f017c7a
local projects
ctate Nov 10, 2025
8e91e35
new project / new workflow
ctate Nov 10, 2025
e0013c9
fix error
ctate Nov 10, 2025
e881076
auto-sign-in
ctate Nov 10, 2025
5d775ba
better naming
ctate Nov 10, 2025
6ec07ef
better dropdown
ctate Nov 10, 2025
5809aa7
add icon
ctate Nov 10, 2025
febfa25
handle unsaved changes
ctate Nov 10, 2025
7da00b9
fix errors
ctate Nov 10, 2025
355fd3a
project integrations
ctate Nov 10, 2025
4e2592f
better env var
ctate Nov 10, 2025
152d09a
fix build
ctate Nov 11, 2025
3ce8863
fix: infinite re-renders
adriandlam Nov 13, 2025
0641b35
ui tweaks
adriandlam Nov 13, 2025
519fac9
fix ui
adriandlam Nov 13, 2025
813b7e5
fix 401, panel doesn't cover minimap
ctate Nov 17, 2025
4cf4bf5
fixes
ctate Nov 17, 2025
9d60b7d
fixes
ctate Nov 17, 2025
1d5ef22
conditions
ctate Nov 17, 2025
55c8788
outputs
ctate Nov 17, 2025
569834a
fixes
ctate Nov 17, 2025
9b8086e
remove outputs
ctate Nov 17, 2025
64b0444
input outputs
ctate Nov 17, 2025
36c7806
fix spacebar
ctate Nov 17, 2025
b6071af
fixes
ctate Nov 17, 2025
d342fb7
fixes
ctate Nov 17, 2025
9aec965
fixes
ctate Nov 17, 2025
8f01986
better @
ctate Nov 17, 2025
8732151
fixes
ctate Nov 17, 2025
1170bf5
fixes
ctate Nov 17, 2025
82c6009
simple workflow
ctate Nov 17, 2025
76dc4ab
fixes
ctate Nov 17, 2025
ad40050
logos
ctate Nov 17, 2025
66f6baa
fixes
ctate Nov 17, 2025
75e9812
fixes
ctate Nov 17, 2025
aac0799
fixes
ctate Nov 17, 2025
f7f3bfe
fix code syntax
ctate Nov 17, 2025
bff943a
fixes
ctate Nov 17, 2025
c9fff0d
fix header
ctate Nov 17, 2025
fd45ec0
fix mobile
ctate Nov 18, 2025
c388243
fixes
ctate Nov 18, 2025
fa04d29
fixes
ctate Nov 18, 2025
52e107f
fixes
ctate Nov 18, 2025
2f03d1c
fixes
ctate Nov 18, 2025
20e2e7e
fixes
ctate Nov 18, 2025
09608c9
fixes
ctate Nov 18, 2025
07990dc
fixes
ctate Nov 18, 2025
852d454
fixes
ctate Nov 18, 2025
9b8a000
fixes
ctate Nov 18, 2025
4e670f0
cleanup
ctate Nov 18, 2025
552fe5e
simplify
ctate Nov 18, 2025
a311f96
better flow
ctate Nov 18, 2025
716e231
better ux
ctate Nov 18, 2025
4ba8ce4
simple node
ctate Nov 18, 2025
2b7f78a
better edges
ctate Nov 18, 2025
d126a4f
fix labels
ctate Nov 18, 2025
c3c5ab5
props
ctate Nov 18, 2025
c0b0f99
fixes
ctate Nov 18, 2025
78f8db5
custom controls
ctate Nov 18, 2025
30f65d6
starter
ctate Nov 18, 2025
b592986
dark mode
ctate Nov 18, 2025
2b0028a
fixes
ctate Nov 18, 2025
e312618
colors
ctate Nov 18, 2025
20fc4da
multi-select
ctate Nov 18, 2025
0c8302b
fixes
ctate Nov 18, 2025
ee490c1
step gen
ctate Nov 18, 2025
5af55e2
templates
ctate Nov 18, 2025
c4f2934
file path
ctate Nov 18, 2025
9f720d0
fixes
ctate Nov 18, 2025
8ba8246
syntax
ctate Nov 18, 2025
6fc0482
better gen
ctate Nov 18, 2025
9327f8f
better workflow gen
ctate Nov 18, 2025
266b0c7
better template strings
ctate Nov 18, 2025
08383a8
fix cmd+enter
ctate Nov 18, 2025
7c1b89c
shared codegen
ctate Nov 18, 2025
f6a53a4
safer test runs
ctate Nov 18, 2025
98c57cb
fixes
ctate Nov 18, 2025
0142c08
fixes
ctate Nov 18, 2025
48f146a
ui tweaks
adriandlam Nov 19, 2025
077885e
show notice to configuration integration
ctate Nov 19, 2025
1a13d4b
Merge remote-tracking branch 'refs/remotes/origin/main'
ctate Nov 19, 2025
e4420d2
fix `pnpm fix`
ctate Nov 19, 2025
b1256bd
add pre-commit hook
ctate Nov 19, 2025
fbe2bd6
don't allow trigger nodes to be deleted
ctate Nov 19, 2025
c18397e
remove data sources
ctate Nov 19, 2025
cec3535
combine projects/workflows
ctate Nov 19, 2025
9ea503f
consistent tables
ctate Nov 19, 2025
cc7a5e0
remove chars
ctate Nov 19, 2025
f0f4669
update
ctate Nov 19, 2025
0afa0a9
generate id
ctate Nov 19, 2025
fdebb98
simplify project selector
ctate Nov 19, 2025
57688c9
ui
adriandlam Nov 19, 2025
f411a63
remove label
ctate Nov 19, 2025
c12ad0c
Merge remote-tracking branch 'refs/remotes/origin/main'
ctate Nov 19, 2025
55337f2
simplify account settings
ctate Nov 19, 2025
14f139f
update ui
adriandlam Nov 19, 2025
6556e64
Merge branch 'main' of github.com:vercel-labs/workflow-builder-template
adriandlam Nov 19, 2025
3cf2e81
show/hide minimap
ctate Nov 19, 2025
5606324
format
ctate Nov 19, 2025
3f68ad9
remove "This action requires..."
ctate Nov 19, 2025
804ea92
ui
adriandlam Nov 19, 2025
758f789
merge conflict
adriandlam Nov 19, 2025
169508e
simple integrations dialog
ctate Nov 19, 2025
9058611
Merge remote-tracking branch 'refs/remotes/origin/main'
ctate Nov 19, 2025
5e53473
remove "Resend (Email)"
ctate Nov 19, 2025
72d8bcf
format
ctate Nov 19, 2025
8d6f57a
integrations section, fix icons
ctate Nov 19, 2025
1da963c
add next boilerplate
ctate Nov 19, 2025
0e94e62
remove sandbox
ctate Nov 19, 2025
9466767
download zip
ctate Nov 19, 2025
61e572e
correct code
ctate Nov 19, 2025
d395fb5
fix env var values
ctate Nov 19, 2025
4e4e9e7
removes dynamic logs
ctate Nov 19, 2025
371d94f
fixes resend from email
ctate Nov 19, 2025
3ca139c
workflow trigger
ctate Nov 19, 2025
e839914
format
ctate Nov 19, 2025
36411a1
gpt-5
ctate Nov 19, 2025
45f6d84
copy env vars
ctate Nov 19, 2025
7f6ecca
runs
ctate Nov 19, 2025
29de041
format
ctate Nov 20, 2025
cb81f00
status
ctate Nov 20, 2025
021c0c0
fixes status
ctate Nov 20, 2025
1887de9
set trigger to running status immediately
ctate Nov 20, 2025
f9d12fd
fix colors
ctate Nov 20, 2025
22c53e4
better loading
ctate Nov 20, 2025
e02b076
better animation
ctate Nov 20, 2025
45616b0
increase delay
ctate Nov 20, 2025
ff1fc10
better runs refresh
ctate Nov 20, 2025
3df8d85
better runs ux
ctate Nov 20, 2025
698ece5
improve integrations
ctate Nov 20, 2025
18d0dfd
add trusted origins
ctate Nov 20, 2025
5e31386
fix auth origin
ctate Nov 20, 2025
dfdd940
deploy button
ctate Nov 20, 2025
15a54b2
cleaner arch
ctate Nov 20, 2025
b4ab500
knip
ctate Nov 20, 2025
b3b81cd
fix run data
ctate Nov 20, 2025
3ae3ec9
add directives
ctate Nov 20, 2025
8492dea
add workflow
ctate Nov 20, 2025
0600eec
format
ctate Nov 20, 2025
167afa4
fix build
ctate Nov 20, 2025
a3f6ac2
fix errors
ctate Nov 20, 2025
876a8ba
fixes workflow
ctate Nov 20, 2025
69808c7
fix outputs
ctate Nov 20, 2025
205ba55
cred fetcher
ctate Nov 20, 2025
6de52f1
hide deploy on workflow details page
ctate Nov 20, 2025
53249d1
fix monaco theming
ctate Nov 20, 2025
49976ab
fixes
ctate Nov 20, 2025
9efccf5
fixes
ctate Nov 20, 2025
5dc60f8
hide resizable panel on mobile
ctate Nov 20, 2025
fba7c97
remove deploy button
ctate Nov 20, 2025
5a27919
webhook runs
ctate Nov 20, 2025
3c3863b
remove success
ctate Nov 20, 2025
c3b825b
Revert "hide resizable panel on mobile"
ctate Nov 20, 2025
37cfe7c
fixes
ctate Nov 20, 2025
4e27375
fix new nodes on mobile
ctate Nov 20, 2025
062d149
add a step
ctate Nov 20, 2025
bbf40c1
remove precommit hooks (#6)
ctate Nov 21, 2025
ce38ebb
integrations (#7)
ctate Nov 21, 2025
12918d6
improvements (#8)
ctate Nov 21, 2025
0cb40d9
more improvements (#9)
ctate Nov 21, 2025
217a666
fix cursor position, cors (#10)
ctate Nov 24, 2025
6300b64
fix mobile sizing (#11)
ctate Nov 24, 2025
ac28d21
text-to-workflow (#12)
ctate Nov 24, 2025
8756b80
github/deploy buttons (#13)
ctate Nov 24, 2025
3e1af42
add auth to workflow log route (#14)
ctate Nov 24, 2025
96a0e08
fix env vars (#15)
ctate Nov 24, 2025
4987d2a
add screenshot to readme (#16)
ctate Nov 24, 2025
94508e8
add vercel-template.json (#17)
ctate Nov 24, 2025
637970d
add deploy badge (#18)
ctate Nov 24, 2025
9a098d0
fix deploy on mobile (#19)
ctate Nov 24, 2025
6183bac
Revert "add auth to workflow log route (#14)" (#20)
ctate Nov 24, 2025
b201dfc
fix buttons on mobile (#21)
ctate Nov 24, 2025
4cffb3a
fix stars on mobile (#22)
ctate Nov 24, 2025
a86b85c
Fix image generation using FLUX.2 via AI Gateway (#23)
ctate Nov 25, 2025
406459a
surface errors (#24)
ctate Nov 25, 2025
ddb14f2
show image (#25)
ctate Nov 25, 2025
d6b4561
fix text generation (#26)
ctate Nov 25, 2025
a38317b
run steps in parallel (#27)
ctate Nov 25, 2025
124f9c4
fix node state after clearing runs (#28)
ctate Nov 25, 2025
2702421
show model badge (#29)
ctate Nov 25, 2025
b1c1b28
show image on node (#30)
ctate Nov 25, 2025
083f0c7
add context menu (#31)
ctate Nov 25, 2025
866b465
image zoom (#32)
ctate Nov 25, 2025
040e602
deselect run (#33)
ctate Nov 25, 2025
f868da4
ai workflow builder (#34)
ctate Nov 25, 2025
a8902cc
Update URL for Workflow DevKit documentation (#35)
hashimwarren Nov 26, 2025
245d733
fix integration tests (#38)
ctate Nov 26, 2025
7baf449
sign in with vercel (#39)
ctate Nov 26, 2025
499455c
Feature: Add Firecrawl Scrape and Search Actions (#36)
ericciarla Nov 26, 2025
3a94265
homepage transition improvements (#40)
ctate Nov 26, 2025
a29a3b3
firecrawl improvements (#41)
ctate Nov 26, 2025
16f42d8
more models (#42)
ctate Nov 26, 2025
4c7ca6a
Add Firecrawl to README (#43)
ericciarla Nov 26, 2025
faeeef3
plugin system (#44)
ctate Nov 26, 2025
1b7f171
fix wb naming (#46)
ctate Nov 26, 2025
82cbca6
Fix UX bug where selecting 'Condition' action type traps the user (#45)
ankshvayt Nov 26, 2025
ea8d77c
enable/disable steps (#47)
ctate Nov 26, 2025
383039d
fix sign in bug (#48)
ctate Nov 26, 2025
e4591df
Fix sign in glitch (#49)
ctate Nov 26, 2025
54d8bfc
switch to props on new step (#50)
ctate Nov 27, 2025
ddb90bb
update deploy link (#51)
ctate Nov 27, 2025
3dfab34
fix http request step (#55)
ctate Nov 27, 2025
58c4046
Add vercel speed insights (#58)
ctate Nov 27, 2025
e319cdb
Add vercel analytics (#59)
ctate Nov 27, 2025
0a87990
Fix search actions label spacing to match others (#60)
ctate Nov 27, 2025
d2bc2b2
docs: update README to use correct lint and format commands (#64)
ishaksebsib Nov 28, 2025
20d789d
Fix sidebar close button visibility logic (#62)
akashwarrior Nov 28, 2025
b9201d2
Refactor action config components to use dynamic plugin system (#63)
bensabic Nov 28, 2025
656168b
migrate linear find issues (#65)
ctate Nov 28, 2025
4240089
rename discover-plugins to mjs for backward compat (#67)
ctate Nov 28, 2025
663b976
feat(ai-elements): prompt input style (#54)
antlio Nov 28, 2025
bcc80ef
add node version (#69)
ctate Nov 28, 2025
a90e559
add v0 (#70)
ctate Nov 28, 2025
fb8b6aa
improve fcp (#72)
ctate Nov 28, 2025
7b788ee
smoother integration detection (#71)
ctate Nov 28, 2025
5f919c1
ai improvements (#73)
ctate Nov 28, 2025
ef6549e
step handler (#56)
ctate Nov 28, 2025
a84f7f8
check integrations before running (#75)
ctate Nov 29, 2025
a74203b
export code dialog (#77)
ctate Nov 29, 2025
ce18157
Make plugin system fully dynamic with auto-generated registries (#78)
bensabic Nov 29, 2025
f6c1a4b
improve condition sanitization (#83)
ctate Nov 29, 2025
5467547
improve plugin registry (#84)
ctate Nov 30, 2025
804aa7c
Update plugin templates and add create-plugin script (#87)
bensabic Nov 30, 2025
f02ca71
remove emojis (#90)
ctate Nov 30, 2025
e4999d6
feat: add optional email fields to resend plugin (#85)
bensabic Dec 1, 2025
8f5c758
add group field type (#93)
ctate Dec 1, 2025
85df369
unify step code for app and export (#96)
ctate Dec 1, 2025
79665c5
feat: add Superagent Guard and Redact plugin (#92)
homanp Dec 1, 2025
ca07235
unify codegen for superagent (#97)
ctate Dec 1, 2025
f560aa6
verifies integration ownership before saving workflow (#98)
ctate Dec 1, 2025
62d950c
default to fetch (#100)
ctate Dec 1, 2025
3b5134a
feat: use plugin test functions dynamically, delete old icons, update…
bensabic Dec 2, 2025
fca2fe5
add vercel blob (#102)
ctate Dec 2, 2025
d57139d
add output fields to other plugins (#103)
ctate Dec 2, 2025
5b0a304
github plugin (#104)
ctate Dec 2, 2025
fe19a9f
ignore generated files (#106)
ctate Dec 2, 2025
12fd677
stripe plugin (#105)
ctate Dec 2, 2025
0acf5f6
add perplexity
ctate Dec 2, 2025
330024c
fal plugin
ctate Dec 2, 2025
fca834c
fix logos (#112)
ctate Dec 2, 2025
2b170fe
fix fal timeout (#113)
ctate Dec 2, 2025
77f35db
output config, result, link urls in input/output (#114)
ctate Dec 2, 2025
fbf2f8a
fix: Update readme with useworkflow.dev link (#120)
ctate Dec 2, 2025
b2dd3dd
public workflows + api keys (#121)
ctate Dec 2, 2025
3e6c9f1
fix url (#122)
ctate Dec 2, 2025
76338f2
fix condition node (#124)
ctate Dec 2, 2025
82c28c7
hide code tab for condition node (#127)
ctate Dec 2, 2025
dc73064
ux fixes/improvements for integrations (#132)
ctate Dec 3, 2025
2536d2a
Fix mobile: shrink dropdown place duplicate with sign in move read-on…
ctate Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .cursor/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": 1,
"hooks": {
"afterFileEdit": [
{
"command": "npx ultracite fix"
}
]
}
}
129 changes: 129 additions & 0 deletions .cursor/rules/ultracite.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
description: Ultracite Rules - AI-Ready Formatter and Linter
globs: "**/*.{ts,tsx,js,jsx,json,jsonc,html,vue,svelte,astro,css,yaml,yml,graphql,gql,md,mdx,grit}"
alwaysApply: false
---

# Ultracite Code Standards

This project uses **Ultracite**, a zero-config Biome preset that enforces strict code quality standards through automated formatting and linting.

## Quick Reference

- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`

Biome (the underlying engine) provides extremely fast Rust-based linting and formatting. Most issues are automatically fixable.

---

## Core Principles

Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity.

### Type Safety & Explicitness

- Use explicit types for function parameters and return values when they enhance clarity
- Prefer `unknown` over `any` when the type is genuinely unknown
- Use const assertions (`as const`) for immutable values and literal types
- Leverage TypeScript's type narrowing instead of type assertions
- Use meaningful variable names instead of magic numbers - extract constants with descriptive names

### Modern JavaScript/TypeScript

- Use arrow functions for callbacks and short functions
- Prefer `for...of` loops over `.forEach()` and indexed `for` loops
- Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access
- Prefer template literals over string concatenation
- Use destructuring for object and array assignments
- Use `const` by default, `let` only when reassignment is needed, never `var`

### Async & Promises

- Always `await` promises in async functions - don't forget to use the return value
- Use `async/await` syntax instead of promise chains for better readability
- Handle errors appropriately in async code with try-catch blocks
- Don't use async functions as Promise executors

### React & JSX

- Use function components over class components
- Call hooks at the top level only, never conditionally
- Specify all dependencies in hook dependency arrays correctly
- Use the `key` prop for elements in iterables (prefer unique IDs over array indices)
- Nest children between opening and closing tags instead of passing as props
- Don't define components inside other components
- Use semantic HTML and ARIA attributes for accessibility:
- Provide meaningful alt text for images
- Use proper heading hierarchy
- Add labels for form inputs
- Include keyboard event handlers alongside mouse events
- Use semantic elements (`<button>`, `<nav>`, etc.) instead of divs with roles

### Error Handling & Debugging

- Remove `console.log`, `debugger`, and `alert` statements from production code
- Throw `Error` objects with descriptive messages, not strings or other values
- Use `try-catch` blocks meaningfully - don't catch errors just to rethrow them
- Prefer early returns over nested conditionals for error cases

### Code Organization

- Keep functions focused and under reasonable cognitive complexity limits
- Extract complex conditions into well-named boolean variables
- Use early returns to reduce nesting
- Prefer simple conditionals over nested ternary operators
- Group related code together and separate concerns

### Security

- Add `rel="noopener"` when using `target="_blank"` on links
- Avoid `dangerouslySetInnerHTML` unless absolutely necessary
- Don't use `eval()` or assign directly to `document.cookie`
- Validate and sanitize user input

### Performance

- Avoid spread syntax in accumulators within loops
- Use top-level regex literals instead of creating them in loops
- Prefer specific imports over namespace imports
- Avoid barrel files (index files that re-export everything)
- Use proper image components (e.g., Next.js `<Image>`) over `<img>` tags

### Framework-Specific Guidance

**Next.js:**
- Use Next.js `<Image>` component for images
- Use `next/head` or App Router metadata API for head elements
- Use Server Components for async data fetching instead of async Client Components

**React 19+:**
- Use ref as a prop instead of `React.forwardRef`

**Solid/Svelte/Vue/Qwik:**
- Use `class` and `for` attributes (not `className` or `htmlFor`)

---

## Testing

- Write assertions inside `it()` or `test()` blocks
- Avoid done callbacks in async tests - use async/await instead
- Don't use `.only` or `.skip` in committed code
- Keep test suites reasonably flat - avoid excessive `describe` nesting

## When Biome Can't Help

Biome's linter will catch most issues automatically. Focus your attention on:

1. **Business logic correctness** - Biome can't validate your algorithms
2. **Meaningful naming** - Use descriptive names for functions, variables, and types
3. **Architecture decisions** - Component structure, data flow, and API design
4. **Edge cases** - Handle boundary conditions and error states
5. **User experience** - Accessibility, performance, and usability considerations
6. **Documentation** - Add comments for complex logic, but prefer self-documenting code

---

Most formatting and common issues are automatically fixed by Biome. Run `npx ultracite fix` before committing to ensure compliance.
12 changes: 6 additions & 6 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -38,15 +38,15 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run lint
run: pnpm lint
- name: Generate plugin registry
run: pnpm discover-plugins

- name: Run check
run: pnpm check

- name: Run type check
run: pnpm type-check

- name: Run format check
run: pnpm format:check

- name: Run build
run: pnpm build

10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# next.js
/.next/
/out/
/.swc/

# production
/build
Expand All @@ -39,3 +40,12 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env*.local

tmp/

# generated files
lib/types/integration.ts
lib/codegen-registry.ts
lib/step-registry.ts
lib/output-display-configs.ts
2 changes: 2 additions & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
22

23 changes: 0 additions & 23 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

35 changes: 35 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[graphql]": {
"editor.defaultFormatter": "biomejs.biome"
},
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"emmet.showExpandedAbbreviation": "never",
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
56 changes: 43 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@ Never use npm or yarn for this project.

When working on this project, always follow these steps before completing your work:

## 1. Format Code
```bash
pnpm format
```
This will format all TypeScript and TSX files using Prettier with Tailwind CSS class sorting.

## 2. Type Check
## 1. Type Check
```bash
pnpm type-check
```
Run TypeScript compiler to check for type errors. Fix any type errors that appear.

## 3. Lint
## 2. Fix Code
```bash
pnpm lint
pnpm fix
```
Check for linting errors using ESLint. Fix any linting issues.
This will automatically format and lint all code using Ultracite (combines formatting and linting with auto-fixes).

## 4. Fix Issues
## 3. Fix Issues
If any of the above commands fail or show errors:
- Read the error messages carefully
- Fix the issues in the relevant files
Expand All @@ -41,15 +35,51 @@ If any of the above commands fail or show errors:

## Important Notes
- Never commit code with type errors or linting issues
- Format code before making commits
- All three checks must pass before work is considered complete
- Run `pnpm fix` before making commits to ensure code is properly formatted and linted
- All checks must pass before work is considered complete

## Documentation Guidelines
- **No Emojis**: Do not use emojis in any code, documentation, or README files
- **No File Structure**: Do not include file/folder structure diagrams in README files
- **No Random Documentation**: Do not create markdown documentation files unless explicitly requested by the user. This includes integration guides, feature documentation, or any other .md files

## Component Guidelines
- **Use shadcn/ui**: Always use shadcn/ui components when available. Do not create custom components that duplicate shadcn functionality
- **Add Components**: Use `pnpm dlx shadcn@latest add <component>` to add new shadcn components as needed
- **No Native Dialogs**: Never use native `alert()` or `confirm()` dialogs. Always use shadcn AlertDialog, Dialog, or Sonner toast components instead

## Database Migrations
- **Generate Migrations**: Use `pnpm db:generate` to automatically generate database migrations from schema changes
- **Never Write Manual Migrations**: Do not manually create SQL migration files in the `drizzle/` directory
- **Workflow**:
1. Update the schema in `lib/db/schema.ts`
2. Run `pnpm db:generate` to generate the migration
3. Run `pnpm db:push` to apply the migration to the database
- The migration generator will create properly formatted SQL files based on your schema changes

## Code Cleanliness
- **Remove Unused Code**: If a variable, import, or function is unused, remove it entirely. Do not prefix with underscore unless it's intentionally unused but required (e.g., function parameters)
- **Use Correct Jotai Hooks**: When working with Jotai atoms, use the appropriate hook based on usage:
- `useAtom(atom)` - Use when you need both the value and setter
- `useAtomValue(atom)` - Use when you only need to read the value
- `useSetAtom(atom)` - Use when you only need the setter function
- Never use `useAtom` if you're only using one part (getter or setter)

## API Architecture
- **Use API Routes**: This project uses API routes instead of Next.js server actions
- **API Client**: Always use the type-safe API client from `@/lib/api-client` for all backend calls
- **No Server Actions**: Do not create or use server actions (files with `"use server"` directive)
- **Import Pattern**: Import the API client as `import { api } from "@/lib/api-client"`
- **Available APIs**:
- `api.ai.*` - AI operations (generate workflows)
- `api.integration.*` - Test integration connections
- `api.user.*` - User operations (get, update)
- `api.vercelProject.*` - Vercel project integrations
- `api.workflow.*` - Workflow CRUD and operations (create, update, delete, deploy, execute, etc.)
- **No Barrel Files**: Do not create barrel/index files that re-export from other files

## Plugin Guidelines
- **No SDK Dependencies**: Plugin step files must use `fetch` directly instead of SDK client libraries. Do not add npm package dependencies for API integrations.
- **No dependencies field**: Do not use the `dependencies` field in plugin `index.ts` files. All API calls should use native `fetch`.
- **Why**: Using `fetch` instead of SDKs reduces supply chain attack surface. SDKs have transitive dependencies that could be compromised.

Loading