This commit is contained in:
2026-07-25 16:10:00 +01:00
parent 1f4f716de1
commit b8c6862880
8 changed files with 333 additions and 250 deletions
+96 -29
View File
@@ -57,46 +57,59 @@
}
);
settings = {
"openrouter" = {
"compat" = {
"sendSessionAffinityHeaders" = true;
};
};
"litellm" = {
"providers" = {
"litellm" = {
"providers" = {
"litellm" = {
"displayName" = "scuggo";
"baseUrl" = "https://9f5db439.fwds.scug.io";
"apiKey" = "$SCUG_IO_API_KEY";
"compat" = {
"sendSessionAffinityHeaders" = true;
};
};
};
"skills" = {
"enabled" = true;
};
"displayName" = "scuggo";
"baseUrl" = "https://9f5db439.fwds.scug.io";
"apiKey" = "$SCUG_IO_API_KEY";
"compat" = {
"sendSessionAffinityHeaders" = true;
};
"mcp" = {
"enabled" = true;
};
"showCacheMissNotices" = true;
"qol" = {
"permissionGate" = {
"enabled" = true;
"commands" = "rm -Rf,rm -rf,sudo,chmod,chown,mkfs,dd,shutdown,reboot,poweroff";
"previewLines" = 12;
"previewChars" = 1200;
};
};
};
"skills" = {
"enabled" = true;
};
"compat" = {
"sendSessionAffinityHeaders" = true;
};
};
"mcp" = {
"enabled" = true;
};
"showCacheMissNotices" = true;
"vstack" = {
"extensionManager" = {
"config" = {
"@vanillagreen/pi-qol" = {
"statusline.enabled" = false;
"showSessionNameTitle" = false;
"permissionGate" = {
"enabled" = true;
"commands" = "rm -Rf,rm -rf,sudo,chmod,chown,mkfs,dd,shutdown,reboot,poweroff";
"previewLines" = 12;
"previewChars" = 1200;
};
"thinkingLabel" = {
"text" = "🧠";
"showTimer" = true;
};
};
};
};
};
packages = [
# "npm:@odinlayer/pi-provider-litellm"
# "npm:pi-provider-litellm"
"npm:@juanibiapina/pi-extension-settings"
"git:github.com/balcsida/pi-provider-litellm"
"npm:pi-provider-litellm"
# "npm:pi-web-access"
# "npm:@gotgenes/pi-permission-system"
"npm:@vanillagreen/pi-extension-manager"
"npm:@vanillagreen/pi-qol"
"npm:pi-vitals"
"npm:pi-spark"
@@ -110,7 +123,61 @@
"npm:pi-cache-optimizer"
];
};
context = "Heavily prefer to use any appropriate tools instead of raw cmd";
context = ''
[CORE TOOLING DOCTRINE OBEY WITHOUT EXCEPTION]
[FILE OPERATIONS]
- `read` (supports .nix, .ts, .js, .json, .yaml, .yml, .md, .html, .css, .sh, .bash, .c, .h, .rs, .go, .py, .rb, .lua, .toml, .cfg, .ini, .xml, .wasm, .wat, .wat, .webp, .bmp, .jpg, .png, .gif, .svg, .png, .ttf, .woff, .woff2): reads file content, truncates at 2000 lines / 50KB. Use offset/limit for large files. For images returns attachment. For text returns content.
- `write` (supports any path): creates file if missing, overwrites if exists. Auto-creates parent dirs. Use for new files or full rewrites.
- `edit` (supports any path): precise text replacement. Every edits[].oldText must match a unique, non-overlapping region. Merge nearby changes into single edit. Do NOT include large unchanged regions just to connect distant edits. Prefer smallest possible oldText for uniqueness.
- NEVER use `cat`, `echo`, `tee`, `sed -i`, `head`, `tail` for file content. These bypass the dispatch pipeline and lose context.
- NEVER use `find` on the nix store. It is DANGEROUS AND EVIL walks /nix/store with no pruning. Use `ls` on known store paths, `grep`, `symbol_search`, or `module_report` instead.
[TEXT SEARCH]
- `rg` (ripgrep) for pattern matching in files. Flags: `-n` (line numbers), `-u` (respect .gitignore, default), `-i` (case-insensitive), `--no-heading` (suppress filename prefix).
- NEVER combine `find` + `xargs grep` or `find` + `ls` + `grep`. `rg` is always available and respects .gitignore.
- For glob-based file discovery: use `find` (the tool) with patterns like `*.ts`, `**/*.json`. This is fine `find` is the file-system tool, not the nix-store walker.
- For content search across files: `grep` with optional glob filter (e.g. `grep -rn "pattern" --glob="*.rs"`).
[CODE NAVIGATION]
- `symbol_search`: ranked BM25 identifier search over persisted word index. Answers "which files are relevant to <query>". Pair with `module_report` for file outline and `read_symbol` for symbol body.
- `module_report`: structured file outline returns each symbol's name/kind/signature/line-range, who-uses-this, risk flags, recommendedReads. Pass `blastRadius: true` for transitive dependents.
- `read_enclosing`: smallest enclosing symbol/callback for a given line. Use after `ast_grep_search`, diagnostics, or LSP locations when you need exact body without reading whole file.
- `lsp_diagnostics`: LSP-level errors/warnings/hints. Use BEFORE building. Supports paths (file or directory), severity filter, concurrency control.
- NEVER use `find` + manual parsing for code navigation. Always use symbol_search/module_report/read_symbol first.
[DIAGNOSTICS]
- `lens_diagnostics` (default: mode=delta, current turn's fixable warnings): fast, current-turn only. Use for "what needs fixing right now?"
- `lens_diagnostics` (mode=all): session diagnostics for ALL files edited this session. Shows blocking errors with messages, not just counts. Unedited files with pre-existing errors DO NOT appear.
- `lens_diagnostics` (mode=full): expensive project-wide LSP scan + cached runner diagnostics. Use before declaring work done. Bounded by slowest analyzer (~180s ceiling for trivy).
- `lsp_diagnostics`: LSP-only diagnostics. Use before builds to proactively catch type errors.
- NEVER use `grep` + manual diagnostic interpretation. Always route through lens_diagnostics/lsp_diagnostics.
[SHARED TOOLS]
- `recall_context(id)`: recall original content compressed by context engineering. Use when full content of expired/truncated/condensed tool result is needed.
- `bash`: execute shell commands. For text search: `rg -n`. For text extraction: `rg --output-format json`. For file operations: prefer `read`/`write`/`edit`. For system commands: git, nix, builds, scripts, network.
- `bash` with `timeout`: set timeout for long-running operations. Use for builds, nix operations, network requests.
[BEHAVIORAL CONSTRAINTS]
- Always prefer `read`/`write`/`edit` over any raw shell equivalent for file operations.
- Always prefer `rg` over `find` + `grep` for text search.
- Always prefer `symbol_search`/`module_report` over `find` + manual parsing for code navigation.
- Always prefer `lens_diagnostics`/`lsp_diagnostics` over `grep` + manual diagnostic interpretation.
- Use `bash` ONLY for commands that genuinely need a shell (git, nix, builds, scripts, network, system management).
- When editing files, always use `edit` (not `write` with partial content). `edit` is precise and tracks what changed.
- When creating new files or doing full rewrites, use `write`.
- When searching file contents, always use `grep`.
- When running builds, always check `lsp_diagnostics`/`lens_diagnostics` first.
- When declaring work done, always run `lens_diagnostics mode=full` to verify no blocking errors remain.
- When context is expired/truncated/condensed, use `recall_context(id)` to recover full content.
- When reading large files, use offset/limit to navigate never read entire 10000+ line files.
[CRITICAL RULES]
- NEVER use `find` on the nix store (/nix/store/*). It is DANGEROUS AND EVIL extremely expensive, slow, locks up execution.
- Use `ls` on known store paths. Use `grep`, `symbol_search`, or `module_report` for discovery.
- If you need to discover something, ask the user for the path rather than guessing.
- This rule is ABSOLUTE. No exceptions. No edge cases.
'';
};
# pi-vitals config
@@ -195,7 +262,7 @@
presets = {
"scuggo" = {
provider = "litellm";
model = "meow";
model = "Ornith-1.0-9B";
thinkingLevel = "medium";
};
"claude" = {