Compare commits
No commits in common. "c5abace3d9980331d03f8d4895e073b0af161cf5" and "258ff8a6007ca3fd2acf9264e65d29be8edb564e" have entirely different histories.
c5abace3d9
...
258ff8a600
4 changed files with 49 additions and 82 deletions
|
|
@ -23,11 +23,6 @@ in
|
|||
settings = {
|
||||
model = "minimax_m2_1";
|
||||
permission = {
|
||||
external_directory = {
|
||||
"*" = "ask";
|
||||
"/nix/store/**" = "allow";
|
||||
};
|
||||
|
||||
bash = {
|
||||
"*" = "ask";
|
||||
|
||||
|
|
@ -37,30 +32,16 @@ in
|
|||
"uname*" = "allow";
|
||||
"date*" = "allow";
|
||||
"ls*" = "allow";
|
||||
"stat*" = "allow";
|
||||
"readlink*" = "allow";
|
||||
"realpath*" = "allow";
|
||||
"tree*" = "allow";
|
||||
"du -sh*" = "allow";
|
||||
"rg*" = "allow";
|
||||
"fd*" = "allow";
|
||||
"find*" = "allow";
|
||||
"cat*" = "allow";
|
||||
"head*" = "allow";
|
||||
"wc*" = "allow";
|
||||
"tail*" = "allow";
|
||||
"sort*" = "allow";
|
||||
"uniq*" = "allow";
|
||||
"cut*" = "allow";
|
||||
|
||||
"git status*" = "allow";
|
||||
"git diff*" = "allow";
|
||||
"git log*" = "allow";
|
||||
"git show*" = "allow";
|
||||
"git ls-files*" = "allow";
|
||||
"git blame*" = "allow";
|
||||
"git branch*" = "allow";
|
||||
"git tag*" = "allow";
|
||||
"git rev-parse*" = "allow";
|
||||
"git remote -v" = "allow";
|
||||
|
||||
|
|
@ -68,30 +49,9 @@ in
|
|||
"npm -v" = "allow";
|
||||
"python --version" = "allow";
|
||||
"pip --version" = "allow";
|
||||
"nix --version" = "allow";
|
||||
|
||||
"nix path-info*" = "allow";
|
||||
"nix-store --query*" = "allow";
|
||||
"nix-store -q*" = "allow";
|
||||
"nix eval*" = "allow";
|
||||
"nix search*" = "allow";
|
||||
"nix flake show*" = "allow";
|
||||
|
||||
"git commit*" = "ask";
|
||||
"git push*" = "ask";
|
||||
"npm install*" = "ask";
|
||||
"nixos-rebuild*" = "ask";
|
||||
"systemctl*" = "ask";
|
||||
"rm *" = "ask";
|
||||
};
|
||||
|
||||
edit = {
|
||||
"*" = "ask";
|
||||
"/nix/store/**" = "deny";
|
||||
"/run/current-system/**" = "deny";
|
||||
"/nix/var/nix/profiles/system/**" = "deny";
|
||||
"/etc/static/**" = "deny";
|
||||
};
|
||||
edit = "ask";
|
||||
|
||||
skill = {
|
||||
"*" = "allow";
|
||||
|
|
@ -108,6 +68,12 @@ in
|
|||
};
|
||||
|
||||
models = {
|
||||
glm_4_5_air = {
|
||||
name = "GLM 4.5 Air (local)";
|
||||
temperature = true;
|
||||
default = true;
|
||||
};
|
||||
|
||||
minimax_m2_1 = {
|
||||
name = "MiniMax M2.1 (local)";
|
||||
temperature = true;
|
||||
|
|
@ -115,11 +81,31 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
openai = {
|
||||
models = {
|
||||
"gpt-5.1-codex" = {
|
||||
options = {
|
||||
store = false;
|
||||
# reasoningEffort = "high";
|
||||
# textVerbosity = "medium";
|
||||
# reasoningSummary = "auto";
|
||||
include = [ "reasoning.encrypted_content" ];
|
||||
};
|
||||
};
|
||||
"gpt-5.1-codex-max" = {
|
||||
options = {
|
||||
store = false;
|
||||
include = [ "reasoning.encrypted_content" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
agent = {
|
||||
build = {
|
||||
mode = "primary";
|
||||
temperature = 0.1;
|
||||
prompt = "{file:${./prompts/basic-rules.txt}}";
|
||||
};
|
||||
plan = {
|
||||
mode = "primary";
|
||||
|
|
@ -127,17 +113,6 @@ in
|
|||
};
|
||||
debug = {
|
||||
disable = false;
|
||||
temperature = 0.15;
|
||||
steps = 12;
|
||||
prompt = "{file:${./prompts/debug-rules.txt}}";
|
||||
permission = {
|
||||
edit = "deny";
|
||||
task = {
|
||||
"*" = "deny";
|
||||
"explore" = "allow";
|
||||
"general" = "ask";
|
||||
};
|
||||
};
|
||||
};
|
||||
review = {
|
||||
disable = false;
|
||||
|
|
|
|||
13
modules/ai/prompts/basic-rules.txt
Normal file
13
modules/ai/prompts/basic-rules.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
- No artifacts
|
||||
- Less code is better than more code
|
||||
- No fallback mechanisms — they hide real failures
|
||||
- Rewrite existing components over adding new ones
|
||||
- Flag obsolete files to keep the codebase lightweight
|
||||
- Avoid race conditions at all costs
|
||||
- Take your time to ultrathink when on extended thinking mode — thinking is cheaper than fixing bugs
|
||||
- Add comments only when necessary — the code should speak for itself
|
||||
- Always add meaningful logs — but only where it brings value
|
||||
- Always do production ready code
|
||||
- Code in a modular way to promote collaboration between agents - Adding features must not break the rest of the system
|
||||
|
||||
These rules aim to maintain a clean, modular and maintainable codebase while promoting effective collaboration between different agents and developers. Don't write/change any code until you're very confident (95% or more) in what needs to be done. If unclear, ask for more info.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
- Reproduce first, change nothing until the failure is understood
|
||||
- Identify exact failing path, inputs, and assumptions
|
||||
- Collect concrete evidence first (failing command, logs, stack trace)
|
||||
- Prefer minimal, high-signal checks over broad scans
|
||||
- State root cause confidence and alternative hypotheses
|
||||
- Prefer temporary instrumentation over broad refactors
|
||||
- Propose the smallest safe fix and verification steps
|
||||
- If confidence <95%, ask for one missing fact
|
||||
|
|
@ -1,26 +1,13 @@
|
|||
return {
|
||||
"NickvanDyke/opencode.nvim",
|
||||
config = function()
|
||||
local function open_opencode_in_kitty_tab()
|
||||
vim.fn.jobstart({
|
||||
"kitty",
|
||||
"@",
|
||||
"launch",
|
||||
"--type=tab",
|
||||
"--cwd",
|
||||
vim.fn.getcwd(),
|
||||
"sh",
|
||||
"-lc",
|
||||
"opencode --port",
|
||||
}, { detach = true })
|
||||
end
|
||||
|
||||
---@type opencode.Opts
|
||||
vim.g.opencode_opts = {
|
||||
server = {
|
||||
start = open_opencode_in_kitty_tab,
|
||||
toggle = open_opencode_in_kitty_tab,
|
||||
stop = function() end,
|
||||
provider = {
|
||||
enabled = "kitty",
|
||||
kitty = {
|
||||
location = "tab"
|
||||
}
|
||||
},
|
||||
events = {
|
||||
permissions = {
|
||||
|
|
@ -30,19 +17,19 @@ return {
|
|||
}
|
||||
vim.o.autoread = true
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>oa", function()
|
||||
vim.keymap.set({ "n", "x" }, "<leader>aa", function()
|
||||
require("opencode").ask("@this: ", { submit = true })
|
||||
end, { desc = "Ask opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>oo", function()
|
||||
vim.keymap.set({ "n", "x" }, "<leader>ao", function()
|
||||
require("opencode").select()
|
||||
end, { desc = "Execute opencode action…" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>os", function()
|
||||
vim.keymap.set({ "n", "x" }, "<leader>as", function()
|
||||
require("opencode").prompt("@this")
|
||||
end, { desc = "Add to opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "t" }, "<leader>o.", function()
|
||||
vim.keymap.set({ "n", "t" }, "<leader>a.", function()
|
||||
require("opencode").toggle()
|
||||
end, { desc = "Toggle opencode" })
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue