prjct-cli 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/README.md +84 -37
  3. package/bin/prjct.ts +11 -1
  4. package/core/index.ts +53 -26
  5. package/core/infrastructure/ai-provider.ts +157 -1
  6. package/core/infrastructure/setup.ts +225 -7
  7. package/core/types/provider.ts +18 -1
  8. package/dist/bin/prjct.mjs +3607 -1050
  9. package/dist/core/infrastructure/command-installer.js +458 -47
  10. package/dist/core/infrastructure/setup.js +728 -211
  11. package/package.json +1 -1
  12. package/templates/antigravity/SKILL.md +39 -0
  13. package/templates/cursor/commands/bug.md +8 -0
  14. package/templates/cursor/commands/done.md +4 -0
  15. package/templates/cursor/commands/pause.md +6 -0
  16. package/templates/cursor/commands/resume.md +4 -0
  17. package/templates/cursor/commands/ship.md +8 -0
  18. package/templates/cursor/commands/sync.md +4 -0
  19. package/templates/cursor/commands/task.md +8 -0
  20. package/templates/cursor/router.mdc +6 -6
  21. package/templates/global/ANTIGRAVITY.md +256 -0
  22. package/templates/global/CLAUDE.md +30 -0
  23. package/templates/global/CURSOR.mdc +60 -25
  24. package/templates/global/GEMINI.md +30 -0
  25. package/templates/global/WINDSURF.md +268 -0
  26. package/templates/windsurf/router.md +28 -0
  27. package/templates/windsurf/workflows/bug.md +8 -0
  28. package/templates/windsurf/workflows/done.md +4 -0
  29. package/templates/windsurf/workflows/pause.md +4 -0
  30. package/templates/windsurf/workflows/resume.md +4 -0
  31. package/templates/windsurf/workflows/ship.md +8 -0
  32. package/templates/windsurf/workflows/sync.md +4 -0
  33. package/templates/windsurf/workflows/task.md +8 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,113 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.39.0] - 2026-01-24
4
+
5
+ ### Feature: Windsurf IDE Support (PRJ-66)
6
+
7
+ prjct now works with **Windsurf IDE** as a project-level integration.
8
+
9
+ **Architecture:**
10
+ - Windsurf uses `.md` files (not `.mdc` like Cursor) with YAML frontmatter
11
+ - Uses `trigger: always_on` instead of `alwaysApply: true`
12
+ - Uses "workflows" directory instead of "commands"
13
+ - Character limits: 6000 per file, 12000 total
14
+
15
+ **New Files:**
16
+ - `templates/windsurf/router.md` - Minimal router with YAML frontmatter
17
+ - `templates/global/WINDSURF.md` - Full prjct instructions for Windsurf
18
+ - `templates/windsurf/workflows/*.md` - Individual workflow files (sync, task, done, ship, bug, pause, resume)
19
+
20
+ **Modified:**
21
+ - `core/types/provider.ts` - Added `'windsurf'` to AIProviderName, added `WindsurfProjectDetection`
22
+ - `core/infrastructure/ai-provider.ts` - Added WindsurfProvider, detectWindsurfProject(), branding
23
+ - `core/infrastructure/setup.ts` - Added installWindsurfProject(), hasWindsurfProject()
24
+ - `bin/prjct.ts` - Added Windsurf to --version display
25
+
26
+ **Project Structure:**
27
+ ```
28
+ .windsurf/
29
+ ├── rules/
30
+ │ └── prjct.md # Router (auto-generated)
31
+ └── workflows/
32
+ ├── sync.md
33
+ ├── task.md
34
+ ├── done.md
35
+ ├── ship.md
36
+ ├── bug.md
37
+ ├── pause.md
38
+ └── resume.md
39
+ ```
40
+
41
+ ---
42
+
43
+ ## [0.38.1] - 2026-01-24
44
+
45
+ ### Docs: Complete Antigravity documentation
46
+
47
+ - Added Antigravity badge to README
48
+ - Added Antigravity Quick Start section
49
+ - Updated "How It Works" table with Antigravity column
50
+ - Updated Requirements to include Antigravity
51
+ - Fixed version display to show all providers consistently
52
+
53
+ ---
54
+
55
+ ## [0.38.0] - 2026-01-24
56
+
57
+ ### Feature: Google Antigravity Support (PRJ-64)
58
+
59
+ prjct now works with **Google Antigravity** as a skill (not MCP server).
60
+
61
+ **Why Skills over MCP:**
62
+ - Zero overhead (just SKILL.md files)
63
+ - Cross-compatible with Claude Code skills
64
+ - No daemon process needed
65
+ - Aligned with prjct as "context layer"
66
+
67
+ **New Files:**
68
+ - `templates/global/ANTIGRAVITY.md` - Full prjct instructions
69
+ - `templates/antigravity/SKILL.md` - Skill router for Antigravity
70
+
71
+ **Modified:**
72
+ - `core/infrastructure/ai-provider.ts` - Added AntigravityProvider, detectAntigravity()
73
+ - `core/infrastructure/setup.ts` - Added installAntigravitySkill()
74
+ - `core/index.ts` - Show Antigravity in --version
75
+
76
+ **Skills Location:**
77
+ ```
78
+ ~/.gemini/antigravity/skills/prjct/SKILL.md
79
+ ```
80
+
81
+ **Critical Rule Added:**
82
+ All agent templates (CLAUDE.md, GEMINI.md, CURSOR.mdc, ANTIGRAVITY.md) now include:
83
+ - Rule #0: Plan Before Action (NON-NEGOTIABLE)
84
+ - Agent must create plan and get user approval before ANY execution
85
+
86
+ ---
87
+
88
+ ## [0.37.1] - 2026-01-24
89
+
90
+ ### Fix: Cursor Command Syntax (PRJ-65)
91
+
92
+ Fixed Cursor IDE commands not working. Cursor uses `/command` syntax, not `p. command`.
93
+
94
+ **Changes:**
95
+ - Created individual command files: `/sync`, `/task`, `/done`, `/ship`, `/bug`, `/pause`, `/resume`
96
+ - Updated `CURSOR.mdc` with correct `/command` syntax documentation
97
+ - Updated `router.mdc` with new syntax examples
98
+ - Updated `README.md` with Cursor-specific syntax section
99
+ - Fixed `installCursorProject()` to install all individual command files
100
+
101
+ **Cursor Syntax:**
102
+ ```
103
+ /sync # Analyze project
104
+ /task "description" # Start task
105
+ /done # Complete subtask
106
+ /ship # Ship feature
107
+ ```
108
+
109
+ ---
110
+
3
111
  ## [0.37.0] - 2026-01-24
4
112
 
5
113
  ### Feature: Cursor IDE Support (PRJ-63)
package/README.md CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  **Context layer for AI coding agents.**
4
4
 
5
- Works with Claude Code, Gemini CLI, Cursor IDE, and more.
5
+ Works with Claude Code, Gemini CLI, Antigravity, Cursor IDE, and more.
6
6
 
7
7
  [![Claude Code](https://img.shields.io/badge/Claude%20Code-Ready-6366f1)](CLAUDE.md)
8
8
  [![Gemini CLI](https://img.shields.io/badge/Gemini%20CLI-Ready-4285F4)]()
9
+ [![Antigravity](https://img.shields.io/badge/Antigravity-Ready-EA4335)]()
9
10
  [![Cursor IDE](https://img.shields.io/badge/Cursor%20IDE-Ready-00D4AA)]()
10
11
  [![npm](https://img.shields.io/npm/v/prjct-cli)](https://www.npmjs.com/package/prjct-cli)
11
12
 
@@ -14,67 +15,113 @@ Works with Claude Code, Gemini CLI, Cursor IDE, and more.
14
15
  prjct gives AI coding agents the context they need about your project. It maintains state between sessions, tracks progress, and ensures agents understand your codebase.
15
16
 
16
17
  ```
17
- Your AI Agent (Claude/Gemini/Cursor) prjct
18
-
19
- "What am I working on?"
20
- ───────────────────────────────►
21
- Reads project context
22
- Task: "Add user auth" │
23
- Branch: feature/auth │
24
- Subtask 2/5: API routes
25
- ◄───────────────────────────────
26
-
27
-
28
- Writes code with full context
18
+ Your AI Agent prjct
19
+ (Claude/Gemini/Antigravity/Cursor)
20
+
21
+ "What am I working on?"
22
+ ────────────────────────────────►
23
+ Reads project context
24
+ Task: "Add user auth"
25
+ Branch: feature/auth
26
+ Subtask 2/5: API routes
27
+ ◄────────────────────────────────
28
+
29
+
30
+ Writes code with full context │
29
31
  ```
30
32
 
31
33
  ## Install
32
34
 
33
35
  ```bash
34
36
  npm install -g prjct-cli
35
- prjct start
36
37
  ```
37
38
 
38
- ## Usage
39
+ ## Quick Start
40
+
41
+ ### Claude Code / Gemini CLI
42
+
43
+ ```bash
44
+ # 1. One-time global setup
45
+ prjct start
39
46
 
40
- Inside Claude Code, Gemini CLI, or Cursor IDE, use the `p.` prefix:
47
+ # 2. Initialize your project
48
+ cd my-project
49
+ prjct init
41
50
 
51
+ # 3. Open in Claude Code or Gemini CLI and use:
52
+ p. sync # Analyze project
53
+ p. task "add user auth" # Start a task
54
+ p. done # Complete subtask
55
+ p. ship # Ship with PR
42
56
  ```
43
- p. sync # Analyze project, generate agents
57
+
58
+ ### Google Antigravity
59
+
60
+ ```bash
61
+ # 1. One-time global setup (installs prjct as a skill)
62
+ prjct start
63
+
64
+ # 2. Initialize your project
65
+ cd my-project
66
+ prjct init
67
+
68
+ # 3. Open in Antigravity and use:
69
+ p. sync # Analyze project
44
70
  p. task "add user auth" # Start a task
45
- p. done # Complete current subtask
46
- p. ship "user auth" # Ship with PR + version bump
71
+ p. done # Complete subtask
72
+ p. ship # Ship with PR
47
73
  ```
48
74
 
75
+ > **Note:** prjct integrates as a Skill (not MCP server) for zero-overhead operation.
76
+
77
+ ### Cursor IDE
78
+
79
+ ```bash
80
+ # 1. Initialize your project (no global setup needed)
81
+ cd my-project
82
+ prjct init
83
+
84
+ # 2. Open in Cursor and use:
85
+ /sync # Analyze project
86
+ /task "add user auth" # Start a task
87
+ /done # Complete subtask
88
+ /ship # Ship with PR
89
+ ```
90
+
91
+ > **Note:** Cursor uses `/command` syntax. Commands are installed per-project in `.cursor/commands/`. If deleted, run `/sync` to regenerate.
92
+
49
93
  ### Core Workflow
50
94
 
51
95
  ```
52
- p. sync → p. task "..." → [code] → p. done → p. ship
96
+ Claude/Gemini/Antigravity: p. sync → p. task "..." → [code] → p. done → p. ship
97
+ Cursor: /sync → /task "..." → [code] → /done → /ship
53
98
  ```
54
99
 
55
100
  ## How It Works
56
101
 
57
- | Component | Claude Code | Gemini CLI | Cursor IDE |
58
- |-----------|-------------|------------|------------|
59
- | Router | `~/.claude/commands/p.md` | `~/.gemini/commands/p.toml` | `.cursor/commands/p.md` |
60
- | Config | `~/.claude/CLAUDE.md` | `~/.gemini/GEMINI.md` | `.cursor/rules/prjct.mdc` |
61
- | Storage | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` |
62
- | Scope | Global | Global | Per-project |
102
+ | Component | Claude Code | Gemini CLI | Antigravity | Cursor IDE |
103
+ |-----------|-------------|------------|-------------|------------|
104
+ | Router | `~/.claude/commands/p.md` | `~/.gemini/commands/p.toml` | Skill | `.cursor/commands/*.md` |
105
+ | Config | `~/.claude/CLAUDE.md` | `~/.gemini/GEMINI.md` | `~/.gemini/antigravity/skills/prjct/` | `.cursor/rules/prjct.mdc` |
106
+ | Storage | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` | `~/.prjct-cli/projects/` |
107
+ | Scope | Global | Global | Global | Per-project |
108
+ | Syntax | `p. command` | `p. command` | `p. command` | `/command` |
63
109
 
64
110
  All agents share the same project storage, so you can switch between them freely.
65
111
 
66
112
  ## Commands
67
113
 
68
- | Command | Description |
69
- |---------|-------------|
70
- | `p. sync` | Analyze project, generate domain agents |
71
- | `p. task "desc"` | Start task with auto-classification |
72
- | `p. done` | Complete current subtask |
73
- | `p. ship "name"` | Ship feature with PR + version bump |
74
- | `p. pause` | Pause current task |
75
- | `p. resume` | Resume paused task |
76
- | `p. linear` | Linear integration |
77
- | `p. github` | GitHub Issues integration |
114
+ | Claude/Gemini | Cursor | Description |
115
+ |---------------|--------|-------------|
116
+ | `p. sync` | `/sync` | Analyze project, generate domain agents |
117
+ | `p. task "desc"` | `/task "desc"` | Start task with auto-classification |
118
+ | `p. done` | `/done` | Complete current subtask |
119
+ | `p. ship "name"` | `/ship "name"` | Ship feature with PR + version bump |
120
+ | `p. pause` | `/pause` | Pause current task |
121
+ | `p. resume` | `/resume` | Resume paused task |
122
+ | `p. bug "desc"` | `/bug "desc"` | Report a bug |
123
+ | `p. linear` | - | Linear integration |
124
+ | `p. github` | - | GitHub Issues integration |
78
125
 
79
126
  ## CLI Commands
80
127
 
@@ -88,7 +135,7 @@ prjct --help # Show help
88
135
  ## Requirements
89
136
 
90
137
  - Node.js 18+ or Bun 1.0+
91
- - One of: Claude Code, Gemini CLI, or Cursor IDE
138
+ - One of: Claude Code, Gemini CLI, Antigravity, or Cursor IDE
92
139
 
93
140
  ## Links
94
141
 
package/bin/prjct.ts CHANGED
@@ -94,6 +94,8 @@ if (args[0] === 'start' || args[0] === 'setup') {
94
94
  const geminiConfigured = fs.existsSync(path.join(home, '.gemini', 'commands', 'p.toml'))
95
95
  const cursorDetected = fs.existsSync(path.join(cwd, '.cursor'))
96
96
  const cursorConfigured = fs.existsSync(path.join(cwd, '.cursor', 'rules', 'prjct.mdc'))
97
+ const windsurfDetected = fs.existsSync(path.join(cwd, '.windsurf'))
98
+ const windsurfConfigured = fs.existsSync(path.join(cwd, '.windsurf', 'rules', 'prjct.md'))
97
99
 
98
100
  const GREEN = '\x1b[32m'
99
101
 
@@ -129,9 +131,17 @@ ${DIM}Providers:${RESET}`)
129
131
  console.log(` Cursor IDE ${DIM}○ not detected${RESET}`)
130
132
  }
131
133
 
134
+ // Windsurf status (project-level)
135
+ if (windsurfDetected) {
136
+ const status = windsurfConfigured ? `${GREEN}✓ ready${RESET}` : `${YELLOW}● detected${RESET}`
137
+ console.log(` Windsurf IDE ${status}${DIM} (project)${RESET}`)
138
+ } else {
139
+ console.log(` Windsurf IDE ${DIM}○ not detected${RESET}`)
140
+ }
141
+
132
142
  console.log(`
133
143
  ${DIM}Run 'prjct start' to configure (CLI providers)${RESET}
134
- ${DIM}Run 'prjct init' to configure (Cursor IDE)${RESET}
144
+ ${DIM}Run 'prjct init' to configure (Cursor/Windsurf IDE)${RESET}
135
145
  ${CYAN}https://prjct.app${RESET}
136
146
  `)
137
147
  } else {
package/core/index.ts CHANGED
@@ -9,7 +9,7 @@ import { commandRegistry } from './commands/registry'
9
9
  import './commands/register' // Ensure commands are registered
10
10
  import out from './utils/output'
11
11
  import type { CommandMeta } from './commands/registry'
12
- import { detectAllProviders, Providers } from './infrastructure/ai-provider'
12
+ import { detectAllProviders, detectAntigravity, Providers } from './infrastructure/ai-provider'
13
13
  import fs from 'fs'
14
14
  import path from 'path'
15
15
  import os from 'os'
@@ -198,6 +198,10 @@ function displayVersion(version: string): void {
198
198
  const claudeConfigured = fs.existsSync(claudeCommandPath)
199
199
  const geminiConfigured = fs.existsSync(geminiCommandPath)
200
200
 
201
+ // Check current project for Cursor
202
+ const cursorConfigured = fs.existsSync(path.join(process.cwd(), '.cursor', 'commands', 'sync.md'))
203
+ const cursorExists = fs.existsSync(path.join(process.cwd(), '.cursor'))
204
+
201
205
  console.log(`
202
206
  ${CYAN}p/${RESET} prjct v${version}
203
207
  ${DIM}Context layer for AI coding agents${RESET}
@@ -222,8 +226,27 @@ ${DIM}Providers:${RESET}`)
222
226
  console.log(` Gemini CLI ${DIM}○ not installed${RESET}`)
223
227
  }
224
228
 
229
+ // Antigravity status (global, skills-based)
230
+ const antigravityDetection = detectAntigravity()
231
+ if (antigravityDetection.installed) {
232
+ const status = antigravityDetection.skillInstalled ? `${GREEN}✓ ready${RESET}` : `${YELLOW}● detected${RESET}`
233
+ const hint = antigravityDetection.skillInstalled ? '' : ` ${DIM}(run prjct start)${RESET}`
234
+ console.log(` Antigravity ${status}${hint}`)
235
+ } else {
236
+ console.log(` Antigravity ${DIM}○ not installed${RESET}`)
237
+ }
238
+
239
+ // Cursor status (project-level, but shown in same format)
240
+ if (cursorConfigured) {
241
+ console.log(` Cursor IDE ${GREEN}✓ ready${RESET} ${DIM}(use /sync, /task)${RESET}`)
242
+ } else if (cursorExists) {
243
+ console.log(` Cursor IDE ${YELLOW}● detected${RESET} ${DIM}(run prjct init)${RESET}`)
244
+ } else {
245
+ console.log(` Cursor IDE ${DIM}○ no .cursor/ folder${RESET}`)
246
+ }
247
+
225
248
  console.log(`
226
- ${DIM}Run 'prjct start' to configure providers${RESET}
249
+ ${DIM}Run 'prjct start' for Claude/Gemini, 'prjct init' for Cursor${RESET}
227
250
  ${CYAN}https://prjct.app${RESET}
228
251
  `)
229
252
  }
@@ -234,45 +257,49 @@ ${CYAN}https://prjct.app${RESET}
234
257
  function displayHelp(): void {
235
258
  console.log(`
236
259
  prjct - Context layer for AI coding agents
237
- Works with Claude Code, Gemini CLI, and more.
260
+ Works with Claude Code, Gemini CLI, Antigravity, Cursor IDE, and more.
238
261
 
239
262
  QUICK START
240
263
  -----------
241
- 1. prjct start Configure your AI provider (Claude/Gemini)
242
- 2. Open project in your AI coding agent
243
- 3. Type: p. sync Analyze project and generate context
244
- 4. Type: p. task "..." Start working on a task
245
-
246
- HOW IT WORKS
247
- ------------
248
- prjct gives AI agents the context they need about your project.
249
- Use "p." commands inside Claude Code or Gemini CLI:
250
-
251
- p. sync Analyze project, generate domain agents
252
- p. task "desc" Start task with auto-classification
253
- p. done Complete current subtask
254
- p. ship "name" Ship feature with PR + version
264
+ Claude/Gemini:
265
+ 1. prjct start Configure your AI provider
266
+ 2. cd my-project && prjct init
267
+ 3. Open in Claude Code or Gemini CLI
268
+ 4. Type: p. sync Analyze project
269
+
270
+ Cursor IDE:
271
+ 1. cd my-project && prjct init
272
+ 2. Open in Cursor
273
+ 3. Type: /sync Analyze project
274
+
275
+ COMMANDS (inside your AI agent)
276
+ -------------------------------
277
+ Claude/Gemini Cursor Description
278
+ ─────────────────────────────────────────────────────
279
+ p. sync /sync Analyze project
280
+ p. task "desc" /task "desc" Start a task
281
+ p. done /done Complete subtask
282
+ p. ship "name" /ship "name" Ship with PR
255
283
 
256
284
  TERMINAL COMMANDS (this CLI)
257
285
  ----------------------------
258
- prjct start First-time setup
286
+ prjct start First-time setup (Claude/Gemini global config)
287
+ prjct init Initialize project (required for Cursor)
259
288
  prjct setup Reconfigure installations
260
- prjct init Initialize project (creates .prjct/)
261
289
  prjct sync Sync project state
262
290
 
263
291
  EXAMPLES
264
292
  --------
265
- # First time setup
293
+ # Claude Code / Gemini CLI (global setup, then per-project)
266
294
  $ prjct start
267
-
268
- # Initialize a new project
269
295
  $ cd my-project && prjct init
270
-
271
- # Inside Claude Code or Gemini CLI
272
296
  > p. sync
273
297
  > p. task "add user authentication"
274
- > p. done
275
- > p. ship "user auth"
298
+
299
+ # Cursor IDE (per-project only)
300
+ $ cd my-project && prjct init
301
+ > /sync
302
+ > /task "add user authentication"
276
303
 
277
304
  MORE INFO
278
305
  ---------
@@ -5,14 +5,16 @@
5
5
  * - Claude Code (CLI): ~/.claude/, CLAUDE.md, .md commands
6
6
  * - Gemini CLI (CLI): ~/.gemini/, GEMINI.md, .toml commands
7
7
  * - Cursor IDE (GUI): .cursor/ (project-level), .mdc rules
8
+ * - Windsurf IDE (GUI): .windsurf/ (project-level), .md rules with YAML frontmatter
8
9
  *
9
10
  * Key differences:
10
11
  * - CLI providers (Claude/Gemini) have global config directories
11
- * - Cursor has project-level config only (no ~/.cursor/)
12
+ * - Cursor/Windsurf have project-level config only (no ~/.cursor/ or ~/.windsurf/)
12
13
  *
13
14
  * @see https://geminicli.com/docs/cli/gemini-md/
14
15
  * @see https://geminicli.com/docs/cli/skills/
15
16
  * @see https://cursor.com/docs/context/rules
17
+ * @see https://docs.windsurf.com/windsurf/cascade/memories
16
18
  */
17
19
 
18
20
  import { execSync } from 'child_process'
@@ -26,6 +28,7 @@ import type {
26
28
  ProviderSelectionResult,
27
29
  ProviderBranding,
28
30
  CursorProjectDetection,
31
+ WindsurfProjectDetection,
29
32
  } from '../types/provider'
30
33
 
31
34
  // =============================================================================
@@ -70,6 +73,29 @@ export const GeminiProvider: AIProviderConfig = {
70
73
  docsUrl: 'https://geminicli.com/docs',
71
74
  }
72
75
 
76
+ /**
77
+ * Google Antigravity provider configuration
78
+ *
79
+ * An "agent-first" platform that manages multiple agents.
80
+ * Config is located in ~/.gemini/antigravity/
81
+ * Uses SKILL.md for skills and mcp_config.json for tools.
82
+ */
83
+ export const AntigravityProvider: AIProviderConfig = {
84
+ name: 'antigravity',
85
+ displayName: 'Google Antigravity',
86
+ cliCommand: null, // Not a CLI command, but a platform/app
87
+ configDir: path.join(os.homedir(), '.gemini', 'antigravity'),
88
+ contextFile: 'ANTIGRAVITY.md',
89
+ skillsDir: path.join(os.homedir(), '.gemini', 'antigravity', 'global_skills'),
90
+ commandsDir: '.agent/skills', // Antigravity uses .agent/skills in projects
91
+ commandFormat: 'md', // Uses SKILL.md
92
+ settingsFile: 'mcp_config.json', // Uses MCP config
93
+ projectSettingsFile: null,
94
+ ignoreFile: '.agentignore', // Assumed
95
+ websiteUrl: 'https://gemini.google.com/app/antigravity',
96
+ docsUrl: 'https://gemini.google.com/app/antigravity',
97
+ }
98
+
73
99
  /**
74
100
  * Cursor IDE provider configuration
75
101
  *
@@ -99,6 +125,36 @@ export const CursorProvider: AIProviderConfig = {
99
125
  docsUrl: 'https://cursor.com/docs',
100
126
  }
101
127
 
128
+ /**
129
+ * Windsurf IDE provider configuration
130
+ *
131
+ * Key differences from Cursor:
132
+ * - Uses .md files (not .mdc) with YAML frontmatter
133
+ * - Uses "workflows" instead of "commands"
134
+ * - Frontmatter uses `trigger: always_on` instead of `alwaysApply: true`
135
+ * - Character limits: 6000 per file, 12000 total
136
+ *
137
+ * @see https://docs.windsurf.com/windsurf/cascade/memories
138
+ * @see https://docs.windsurf.com/windsurf/cascade/workflows
139
+ */
140
+ export const WindsurfProvider: AIProviderConfig = {
141
+ name: 'windsurf',
142
+ displayName: 'Windsurf IDE',
143
+ cliCommand: null, // Not a CLI - GUI app
144
+ configDir: null, // No global config directory
145
+ contextFile: 'prjct.md', // Uses .md format (not .mdc)
146
+ skillsDir: null, // No skills directory
147
+ commandsDir: '.windsurf/workflows', // Windsurf uses "workflows" not "commands"
148
+ rulesDir: '.windsurf/rules',
149
+ commandFormat: 'md',
150
+ settingsFile: null,
151
+ projectSettingsFile: null,
152
+ ignoreFile: '.windsurfignore',
153
+ isProjectLevel: true, // Config is project-level only
154
+ websiteUrl: 'https://windsurf.com',
155
+ docsUrl: 'https://docs.windsurf.com',
156
+ }
157
+
102
158
  /**
103
159
  * All available providers
104
160
  */
@@ -106,6 +162,8 @@ export const Providers: Record<AIProviderName, AIProviderConfig> = {
106
162
  claude: ClaudeProvider,
107
163
  gemini: GeminiProvider,
108
164
  cursor: CursorProvider,
165
+ antigravity: AntigravityProvider,
166
+ windsurf: WindsurfProvider,
109
167
  }
110
168
 
111
169
  // =============================================================================
@@ -243,6 +301,22 @@ Built with [Cursor](${config.websiteUrl})`,
243
301
  }
244
302
  }
245
303
 
304
+ if (provider === 'antigravity') {
305
+ return {
306
+ commitFooter: `🤖 Generated with [p/](https://www.prjct.app/)
307
+ Powered by [Antigravity](${config.websiteUrl})`,
308
+ signature: '⚡ prjct + Antigravity',
309
+ }
310
+ }
311
+
312
+ if (provider === 'windsurf') {
313
+ return {
314
+ commitFooter: `🤖 Generated with [p/](https://www.prjct.app/)
315
+ Built with [Windsurf](${config.websiteUrl})`,
316
+ signature: '⚡ prjct + Windsurf',
317
+ }
318
+ }
319
+
246
320
  // Default: Claude
247
321
  return {
248
322
  commitFooter: `🤖 Generated with [p/](https://www.prjct.app/)
@@ -287,6 +361,83 @@ export function needsCursorRouterRegeneration(projectRoot: string): boolean {
287
361
  return detection.detected && !detection.routerInstalled
288
362
  }
289
363
 
364
+ // =============================================================================
365
+ // Windsurf Project Detection
366
+ // =============================================================================
367
+
368
+ /**
369
+ * Detect if a project is configured for Windsurf IDE
370
+ *
371
+ * Windsurf has NO global config (~/.windsurf/ doesn't exist).
372
+ * Detection is based on project-level .windsurf/ directory.
373
+ */
374
+ export function detectWindsurfProject(projectRoot: string): WindsurfProjectDetection {
375
+ const windsurfDir = path.join(projectRoot, '.windsurf')
376
+ const rulesDir = path.join(windsurfDir, 'rules')
377
+ const routerPath = path.join(rulesDir, 'prjct.md')
378
+
379
+ const detected = fs.existsSync(windsurfDir)
380
+ const routerInstalled = fs.existsSync(routerPath)
381
+
382
+ return {
383
+ detected,
384
+ routerInstalled,
385
+ projectRoot: detected ? projectRoot : undefined,
386
+ }
387
+ }
388
+
389
+ /**
390
+ * Check if Windsurf routers need to be regenerated
391
+ */
392
+ export function needsWindsurfRouterRegeneration(projectRoot: string): boolean {
393
+ const detection = detectWindsurfProject(projectRoot)
394
+
395
+ // Only check if .windsurf/ exists (project uses Windsurf)
396
+ // and prjct router is missing
397
+ return detection.detected && !detection.routerInstalled
398
+ }
399
+
400
+ // =============================================================================
401
+ // Antigravity Detection
402
+ // =============================================================================
403
+
404
+ /**
405
+ * Result of Antigravity detection
406
+ */
407
+ export interface AntigravityDetection {
408
+ /** Whether ~/.gemini/antigravity/ exists */
409
+ installed: boolean
410
+
411
+ /** Whether prjct skill is installed */
412
+ skillInstalled: boolean
413
+
414
+ /** Path to config directory */
415
+ configPath?: string
416
+ }
417
+
418
+ /**
419
+ * Detect if Google Antigravity is installed
420
+ *
421
+ * Antigravity is NOT a CLI command - it's a GUI platform.
422
+ * Detection is based on ~/.gemini/antigravity/ directory.
423
+ */
424
+ export function detectAntigravity(): AntigravityDetection {
425
+ const configPath = AntigravityProvider.configDir
426
+ if (!configPath) {
427
+ return { installed: false, skillInstalled: false }
428
+ }
429
+
430
+ const installed = fs.existsSync(configPath)
431
+ const skillPath = path.join(configPath, 'skills', 'prjct', 'SKILL.md')
432
+ const skillInstalled = fs.existsSync(skillPath)
433
+
434
+ return {
435
+ installed,
436
+ skillInstalled,
437
+ configPath: installed ? configPath : undefined,
438
+ }
439
+ }
440
+
290
441
  // =============================================================================
291
442
  // Provider Paths
292
443
  // =============================================================================
@@ -398,8 +549,11 @@ export default {
398
549
  ClaudeProvider,
399
550
  GeminiProvider,
400
551
  CursorProvider,
552
+ AntigravityProvider,
553
+ WindsurfProvider,
401
554
  detectProvider,
402
555
  detectAllProviders,
556
+ detectAntigravity,
403
557
  getActiveProvider,
404
558
  hasProviderConfig,
405
559
  getProviderBranding,
@@ -411,4 +565,6 @@ export default {
411
565
  selectProvider,
412
566
  detectCursorProject,
413
567
  needsCursorRouterRegeneration,
568
+ detectWindsurfProject,
569
+ needsWindsurfRouterRegeneration,
414
570
  }