Skip to content

Commit 75d00ea

Browse files
emcdGPT-5.2
andcommitted
Add project Codex rules file.
Co-Authored-By: GPT-5.2 <no-reply@openai.com>
1 parent 4c28ee6 commit 75d00ea

1 file changed

Lines changed: 97 additions & 0 deletions

File tree

  • .auxiliary/configuration/coders/codex/rules
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Codex rules (Starlark): allow safe development commands outside the sandbox.
2+
#
3+
# Managed by the emcd-agents project template.
4+
#
5+
# Notes:
6+
# - Rules match an argv *prefix* (not globs). For example:
7+
# pattern=["git", "diff"] matches "git diff --stat".
8+
# - We intentionally do NOT allow `git commit` or `git push` here.
9+
10+
# Common filesystem and text utilities.
11+
prefix_rule(pattern=["awk"], decision="allow")
12+
prefix_rule(pattern=["cat"], decision="allow")
13+
prefix_rule(pattern=["cut"], decision="allow")
14+
prefix_rule(pattern=["df"], decision="allow")
15+
prefix_rule(pattern=["du"], decision="allow")
16+
prefix_rule(pattern=["echo"], decision="allow")
17+
prefix_rule(pattern=["file"], decision="allow")
18+
prefix_rule(pattern=["find"], decision="allow")
19+
prefix_rule(pattern=["grep"], decision="allow")
20+
prefix_rule(pattern=["head"], decision="allow")
21+
prefix_rule(pattern=["ls"], decision="allow")
22+
prefix_rule(pattern=["ps"], decision="allow")
23+
prefix_rule(pattern=["pwd"], decision="allow")
24+
prefix_rule(pattern=["rg"], decision="allow")
25+
prefix_rule(pattern=["sed"], decision="allow")
26+
prefix_rule(pattern=["sort"], decision="allow")
27+
prefix_rule(pattern=["tail"], decision="allow")
28+
prefix_rule(pattern=["uniq"], decision="allow")
29+
prefix_rule(pattern=["wc"], decision="allow")
30+
prefix_rule(pattern=["which"], decision="allow")
31+
32+
# Git commands used by normal development workflows.
33+
prefix_rule(
34+
pattern=["git", ["add", "branch", "diff", "log", "show", "status"]],
35+
decision="allow",
36+
justification="Common git inspection/staging commands.",
37+
)
38+
prefix_rule(
39+
pattern=["git", ["fetch", "rebase", "rev-parse"]],
40+
decision="allow",
41+
justification="Common git maintenance commands.",
42+
)
43+
prefix_rule(
44+
pattern=["git", "stash", "list"],
45+
decision="allow",
46+
justification="List git stashes.",
47+
)
48+
49+
# GitHub CLI (read-oriented operations).
50+
prefix_rule(
51+
pattern=["gh", "browse"],
52+
decision="allow",
53+
justification="Open browser for GitHub resources.",
54+
)
55+
prefix_rule(
56+
pattern=["gh", "status"],
57+
decision="allow",
58+
justification="Show GitHub auth and repo status.",
59+
)
60+
prefix_rule(
61+
pattern=["gh", "issue", ["list", "view"]],
62+
decision="allow",
63+
justification="Read GitHub issues.",
64+
)
65+
prefix_rule(
66+
pattern=["gh", "pr", ["checks", "list", "view"]],
67+
decision="allow",
68+
justification="Read GitHub pull requests.",
69+
)
70+
prefix_rule(
71+
pattern=["gh", "release", ["list", "view"]],
72+
decision="allow",
73+
justification="Read GitHub releases.",
74+
)
75+
prefix_rule(
76+
pattern=["gh", "repo", ["list", "view"]],
77+
decision="allow",
78+
justification="Read GitHub repository metadata.",
79+
)
80+
prefix_rule(
81+
pattern=["gh", "run", ["list", "view", "watch"]],
82+
decision="allow",
83+
justification="Read GitHub Actions runs.",
84+
)
85+
86+
# Python workflows.
87+
prefix_rule(
88+
pattern=["hatch", "run"],
89+
decision="allow",
90+
justification="Run Hatch-managed project tooling.",
91+
)
92+
prefix_rule(
93+
pattern=["hatch", "--env", "develop", "run"],
94+
decision="allow",
95+
justification="Run Hatch-managed tooling in the develop environment.",
96+
)
97+

0 commit comments

Comments
 (0)