Skip to content

Commit 6ffd953

Browse files
committed
feat: refine AI instruction paths for Cursor, Copilot, and Claude
1 parent 225477d commit 6ffd953

5 files changed

Lines changed: 67 additions & 8 deletions

File tree

.agents/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Reference AGENTS.md for core principles.
88
- Up: efctl env up
99
- Down: efctl env down
1010
- Status: efctl env status
11-
- Publish Extension: efctl env extension publish [path]
11+
- Publish Extension: efctl env extension publish [contract-path]
1212
- Query World: efctl world query [object_id]
1313
<!-- EFCTL_INSTRUCTIONS_END -->
1414
Extra text

.cursor/rules/efctl.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- EFCTL_INSTRUCTIONS_START -->
2+
---
3+
description: efctl usage instructions
4+
globs: **/*
5+
---
6+
7+
# efctl Context
8+
You are working on a project using 'efctl', the EVE Frontier CLI.
9+
Reference AGENTS.md for core principles.
10+
11+
## efctl Commands
12+
- Init: efctl init
13+
- Up: efctl env up
14+
- Down: efctl env down
15+
- Status: efctl env status
16+
- Publish Extension: efctl env extension publish [contract-path]
17+
- Query World: efctl world query [object_id]
18+
<!-- EFCTL_INSTRUCTIONS_END -->

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,16 @@ Preferred replacements:
3232
- `ctx stats`
3333
- `ctx doctor`
3434
- `ctx upgrade`
35+
<!-- EFCTL_INSTRUCTIONS_START -->
36+
# efctl Context
37+
You are working on a project using 'efctl', the EVE Frontier CLI.
38+
Reference AGENTS.md for core principles.
39+
40+
## efctl Commands
41+
- Init: efctl init
42+
- Up: efctl env up
43+
- Down: efctl env down
44+
- Status: efctl env status
45+
- Publish Extension: efctl env extension publish [contract-path]
46+
- Query World: efctl world query [object_id]
47+
<!-- EFCTL_INSTRUCTIONS_END -->

CLAUDE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- EFCTL_INSTRUCTIONS_START -->
2+
# efctl Context
3+
You are working on a project using 'efctl', the EVE Frontier CLI.
4+
Reference AGENTS.md for core principles.
5+
6+
## efctl Commands
7+
- Init: efctl init
8+
- Up: efctl env up
9+
- Down: efctl env down
10+
- Status: efctl env status
11+
- Publish Extension: efctl env extension publish [contract-path]
12+
- Query World: efctl world query [object_id]
13+
<!-- EFCTL_INSTRUCTIONS_END -->

pkg/builder/ai.go

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@ func SetupAIInstructions(agentName string, workspace string) error {
2020
agentName = strings.ToLower(agentName)
2121

2222
switch agentName {
23-
case "copilot", "cursor":
24-
targetFile = ".cursorrules"
23+
case "copilot":
24+
targetFile = filepath.Join(".github", "copilot-instructions.md")
2525
instructions = getCopilotInstructions()
26+
case "cursor":
27+
targetFile = filepath.Join(".cursor", "rules", "efctl.md")
28+
instructions = getCursorInstructions()
2629
case "claude":
27-
targetFile = ".clauderules"
30+
targetFile = "CLAUDE.md"
2831
instructions = getClaudeInstructions()
2932
case "gemini":
3033
targetFile = filepath.Join(".agents", "instructions.md")
3134
instructions = getGeminiInstructions()
3235
default:
33-
return fmt.Errorf("unsupported agent: %s; supported agents are: copilot, claude, gemini", agentName)
36+
return fmt.Errorf("unsupported agent: %s; supported agents are: copilot, cursor, claude, gemini", agentName)
3437
}
3538

3639
absPath := filepath.Join(workspace, targetFile)
@@ -64,7 +67,7 @@ func SetupAIInstructions(agentName string, workspace string) error {
6467
return os.WriteFile(absPath, []byte(newContent), 0600) // #nosec G306 G703
6568
}
6669

67-
func getCopilotInstructions() string {
70+
func getSharedInstructions() string {
6871
return `
6972
# efctl Context
7073
You are working on a project using 'efctl', the EVE Frontier CLI.
@@ -80,10 +83,22 @@ Reference AGENTS.md for core principles.
8083
`
8184
}
8285

86+
func getCopilotInstructions() string {
87+
return getSharedInstructions()
88+
}
89+
90+
func getCursorInstructions() string {
91+
return `---
92+
description: efctl usage instructions
93+
globs: **/*
94+
---
95+
` + getSharedInstructions()
96+
}
97+
8398
func getClaudeInstructions() string {
84-
return getCopilotInstructions()
99+
return getSharedInstructions()
85100
}
86101

87102
func getGeminiInstructions() string {
88-
return getCopilotInstructions()
103+
return getSharedInstructions()
89104
}

0 commit comments

Comments
 (0)