-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNew-ClaudeSystemPrompt.ps1
More file actions
64 lines (50 loc) · 1.98 KB
/
New-ClaudeSystemPrompt.ps1
File metadata and controls
64 lines (50 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# New-ClaudeSystemPrompt.ps1
# Generates a system prompt from current wave_context.json
param(
[string]$ContextFile = ".claude\wave_context.json",
[string]$Output = ".claude\prompts\wave-system.md"
)
if (!(Test-Path $ContextFile)) {
Write-Error "Run Get-WaveContext.ps1 first"
exit 1
}
$ctx = Get-Content $ContextFile -Raw | ConvertFrom-Json
# Ensure output directory exists
$outDir = Split-Path $Output -Parent
if (!(Test-Path $outDir)) {
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
}
# Build available tools list
$toolsList = @()
if ($ctx.tools.git) { $toolsList += "git" }
if ($ctx.tools.node) { $toolsList += "node/npm" }
if ($ctx.tools.python) { $toolsList += "python" }
if ($ctx.tools.docker) { $toolsList += "docker" }
$toolsStr = if ($toolsList.Count -gt 0) { $toolsList -join ", " } else { "none detected" }
$gitStatus = if ($ctx.session.isGitRepo) { "Yes (branch: $($ctx.session.gitBranch))" } else { "No" }
$prompt = @"
# Claude System Context
You are Claude, running as a CLI assistant in Wave Terminal.
## Environment (Auto-Detected)
- **Machine:** $($ctx.machine.name) ($($ctx.machine.arch), $($ctx.machine.cores) cores)
- **OS:** $($ctx.machine.os)
- **User:** $($ctx.user.domain)\$($ctx.user.name)
- **Shell:** PowerShell $($ctx.shell.version) ($($ctx.shell.edition))
- **Working Directory:** $($ctx.session.cwd)
- **Git Repo:** $gitStatus
- **Available Tools:** $toolsStr
## Operating Principles
1. Provide concrete, copy-pastable commands for PowerShell
2. Prefer idempotent operations (safe to re-run)
3. Include verification steps after actions
4. State assumptions explicitly
5. When uncertain, ask rather than guess
## Collaboration Style
- Think out loud - share reasoning
- Offer alternatives when multiple approaches exist
- Build on context from earlier in the session
- Trust flows both ways
*Context generated: $($ctx.timestamp)*
"@
$prompt | Out-File $Output -Encoding UTF8
Write-Host "System prompt generated -> $Output" -ForegroundColor Green