chore(project): adjust safety rules

This commit is contained in:
2026-05-15 10:30:06 +08:00
parent ab616528b4
commit 3203b2d9af
5 changed files with 28 additions and 47 deletions

1
.gitignore vendored
View File

@@ -220,7 +220,6 @@ outputs/
openspec/changes/ openspec/changes/
.logs/ .logs/
docs/superpowers docs/superpowers
.opencode/
# Devenv # Devenv
.devenv* .devenv*

4
.opencode/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
package.json
package-lock.json
bun.lock

View File

@@ -1,20 +1,16 @@
{ {
"$schema": "https://opencode.ai/config.json", "$schema": "https://opencode.ai/config.json",
"permission": { "permission": {
"bash": { "bash": {
"python": "deny", "python": "deny",
"python *": "deny", "python *": "deny",
"make": "deny", "just remote *": "ask"
"make *": "deny", },
"just remote *": "ask", "read": {
"verilator": "deny", ".env": "deny"
"verilator *": "deny" },
}, "edit": {
"read": { ".env": "deny"
".env": "deny" }
},
"edit": {
".env": "deny"
} }
}
} }

View File

@@ -1,30 +1,12 @@
{ {
"$schema": "https://raw.githubusercontent.com/kenryu42/claude-code-safety-net/main/assets/cc-safety-net.schema.json", "$schema": "https://raw.githubusercontent.com/kenryu42/claude-code-safety-net/main/assets/cc-safety-net.schema.json",
"version": 1, "version": 1,
"rules": [ "rules": [
{ {
"name": "block-uv-run", "name": "block-uv-sync",
"command": "uv", "command": "uv",
"subcommand": "run", "block_args": ["sync"],
"block_args": [ "reason": "The project is managed by micromamba and uv. Do not sync packages directly by uv. Use \"just sync-pkgs\" or \"uv sync --inexact\" instead."
"python", }
"python3", ]
"pytest",
"pip",
"-m",
"--module",
"--help",
"--version",
"-h",
"-v"
],
"reason": "Local Environment is not avaiable. Please use \"just remote <cmd>\" to run commands in the remote docker. "
},
{
"name": "block-uv-sync",
"command": "uv",
"block_args": ["sync"],
"reason": "The project is managed by micromamba and uv. Do not sync packages directly by uv. Use \"just sync-pkgs\" or \"uv sync --inexact\" instead."
}
]
} }

View File

@@ -40,7 +40,7 @@ dev = [
[tool.ty.environment] [tool.ty.environment]
python = "$UV_PROJECT_ENVIRONMENT" python = "$UV_PROJECT_ENVIRONMENT"
root = ["./mini-nav", "./notebooks", "./hw/sim"] root = ["./mini-nav", "./notebooks", "./hw/sim", "./scripts"]
[tool.basedpyright] [tool.basedpyright]
include = ["mini-nav", "notebooks"] include = ["mini-nav", "notebooks"]