remove grok.md support (#181)

This commit is contained in:
Ismail Pelaseyed authored and GitHub committed 2026-03-20 21:46:39 +01:00
1 parent bdeccafada
commit 053cecb5a2
3 files changed
+2 -11

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@ src/
├── utils/
│ ├── settings.ts # User and project settings
│ ├── git-root.ts # Resolve git repository root for AGENTS.md discovery
│ └── instructions.ts # AGENTS.md (ecosystem) + .grok/GROK.md
│ └── instructions.ts # AGENTS.md (ecosystem) custom instructions
└── types/
└── index.ts # Shared TypeScript types
```
@@ -48,7 +48,7 @@ src/
- **Bash-only tools**: The agent uses bash for everything (file editing, searching, git, builds, etc.).
- **X Search & Web Search**: Integrated via the xAI Responses API for real-time information.
- **Settings hierarchy**: Environment variables → User-level (`~/.grok/user-settings.json`) → Project-level (`.grok/settings.json`).
- **Custom instructions**: `~/.grok/AGENTS.md`, then `AGENTS.override.md` / `AGENTS.md` per directory from git root through the workspace cwd (Codex-style merge), then `.grok/GROK.md` or `~/.grok/GROK.md` last.
- **Custom instructions**: `~/.grok/AGENTS.md`, then `AGENTS.override.md` / `AGENTS.md` per directory from git root through the workspace cwd (Codex-style merge).
- **ESM only**: The project uses `"type": "module"` — all imports use `.js` extensions for compiled output.
## Latest Grok Models
-1
View File
@@ -136,7 +136,6 @@ Treat the bot token like a password.
## Instructions & project brain
- **`AGENTS.md`** — merged from git root down to your cwd (Codex-style; see repo docs). **`AGENTS.override.md`** wins per directory when present.
- **`.grok/GROK.md`** or **`~/.grok/GROK.md`** — Grok-only rules, applied last.
---
-8
View File
@@ -29,12 +29,6 @@ function directoryChain(fromRoot: string, toCwd: string): string[] {
return chain;
}
function loadGrokMd(cwd: string): string | null {
const projectPath = path.join(cwd, ".grok", "GROK.md");
const globalPath = path.join(os.homedir(), ".grok", "GROK.md");
return readNonEmptyFile(projectPath) ?? readNonEmptyFile(globalPath);
}
function loadAgentsSegments(canonicalCwd: string): string[] {
const segments: string[] = [];
@@ -65,8 +59,6 @@ export function loadCustomInstructions(cwd: string): string | null {
}
const parts: string[] = [...loadAgentsSegments(canonical)];
const grok = loadGrokMd(canonical);
if (grok) parts.push(grok);
if (parts.length === 0) return null;
return parts.join("\n\n");