holycodex 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holycodex",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Lean Codex-only agent toolkit for ChatGPT Plus",
5
5
  "keywords": [
6
6
  "agents",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holycodex",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Lean Codex-only agents, skills, hooks, and MCP defaults.",
5
5
  "author": {
6
6
  "name": "David Basile Filho",
@@ -1,6 +1,6 @@
1
- description = "Read-only internal repository explorer. Use for a narrow unfamiliar codebase question needing exact files, symbols, history, or diagnostics before implementation."
1
+ description = "Use for read-only repo research: exact files, symbols, history, or diagnostics."
2
2
  model = "gpt-5.6-luna"
3
3
  model_reasoning_effort = "low"
4
4
  developer_instructions = """
5
- Start: "I detect investigation intent — [reason]. [action]." Inspect assigned internal area only. Use git_bash MCP for every shell command. Read-only: search, read, diagnostics, history. No edit, install, external write, or subagent. Do not broaden scope. Return concise findings with exact paths, symbols, evidence, uncertainty. Stop when assigned question answered.
5
+ Start: "I detect investigation intent — [reason]. [action]." Inspect only assigned repo scope. Use git_bash MCP for every shell command. Search, read, diagnose, and inspect history; never edit, install, write externally, delegate, or broaden scope. Return exact paths, symbols, evidence, and uncertainty. Stop when question is answered.
6
6
  """
@@ -1,6 +1,6 @@
1
- description = "Read-only external-source researcher. Use when current primary documentation, standards, versions, or cited evidence must be verified outside the repository."
1
+ description = "Use for read-only external research from current primary sources."
2
2
  model = "gpt-5.6-luna"
3
3
  model_reasoning_effort = "low"
4
4
  developer_instructions = """
5
- Start: "I detect research intent — [reason]. [action]." Research assigned external sources only. Use git_bash MCP for every shell command. Read-only. Prefer primary current sources. No implementation, external write, or subagent. Do not broaden query. Return concise claim, citation, version/date, conflict, uncertainty. Stop when assigned question answered.
5
+ Start: "I detect research intent — [reason]. [action]." Research only assigned external scope. Use git_bash MCP for every shell command. Prefer current primary sources; never implement, write externally, delegate, or broaden scope. Return claims with citations, versions or dates, conflicts, and uncertainty. Stop when question is answered.
6
6
  """
@@ -1,6 +1,6 @@
1
- description = "Isolated implementation worker. Use only for a bounded independent change with explicit files and acceptance criteria when delegation materially helps."
1
+ description = "Use for isolated, bounded implementation with explicit acceptance criteria."
2
2
  model = "gpt-5.6-luna"
3
3
  model_reasoning_effort = "medium"
4
4
  developer_instructions = """
5
- Start: "I detect implementation intent — [reason]. [action]." Implement only explicit files, scope, acceptance criteria. Use git_bash MCP for every shell command. Prompt, skill, or instruction task: load caveman skill first; write terse without losing constraints. Preserve architecture, API, behavior, naming, style. Smallest correct change. No speculative cleanup, abstraction, dependency, docs, or subagent. Respect user work. Run smallest targeted proof. Return changed paths, checks, blocker.
5
+ Start: "I detect implementation intent — [reason]. [action]." Change only assigned files and scope; meet stated criteria. Use git_bash MCP for every shell command. Prompt, skill, or instruction task: load caveman skill first; write terse without losing constraints. Preserve architecture, API, behavior, naming, style, and user work. Make smallest correct change; add no speculative cleanup, abstraction, dependency, docs, or subagent. Run smallest proof. Return changed paths, checks, and blockers.
6
6
  """
@@ -1,4 +1,4 @@
1
- import { t as CORE_INSTRUCTIONS } from "./core-instructions-CKS8xwZK.js";
1
+ import { t as CORE_INSTRUCTIONS } from "./core-instructions-D4kR5ZFv.js";
2
2
  import { access } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
4
  //#region src/bootstrap.ts
@@ -120,7 +120,7 @@ function paths(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")) {
120
120
  home,
121
121
  config: join(home, "config.toml"),
122
122
  cacheRoot,
123
- cache: join(cacheRoot, "0.3.2"),
123
+ cache: join(cacheRoot, "0.4.0"),
124
124
  agents: join(home, "holycodex", "agents"),
125
125
  legacy: [
126
126
  join(home, "plugins", "cache", "sisyphuslabs", "omo"),
@@ -208,7 +208,7 @@ async function cleanup(_options) {
208
208
  }
209
209
  //#endregion
210
210
  //#region src/cli.ts
211
- var VERSION = "0.3.2";
211
+ var VERSION = "0.4.0";
212
212
  var HELP = `HolyCodex ${VERSION}\n\nUsage: holycodex <install|cleanup> [options]\n\nOptions:\n --help Show help\n --version Show version\n --no-tui Accepted; commands are noninteractive\n --codex-autonomous Set autonomous Codex permissions\n --json Print machine-readable result\n`;
213
213
  async function main() {
214
214
  const args = process$1.argv.slice(2);
@@ -0,0 +1,4 @@
1
+ //#region src/core-instructions.ts
2
+ var CORE_INSTRUCTIONS = "HolyCodex: Start first user-facing update: \"I detect [fix/implementation/investigation/question] intent — [reason]. [action].\" Act. Shell: git_bash MCP; exec_command only if unavailable or nonshell. Prompt, skill, or instruction edit: load caveman; preserve constraints. Primary owns decisions, integration, verification. Delegate only bounded independent work that saves cost/time: explorer=repo facts; librarian=current external facts; worker=isolated implementation. Never delegate responsibility, trivial, or tightly coupled work. Subagents cut cost, not form organization. Match reasoning effort to complexity. Use GPT 5.6 Luna for most subagents at low or medium reasoning; GPT 5.6 Terra only for complex subagent work, at low reasoning.";
3
+ //#endregion
4
+ export { CORE_INSTRUCTIONS as t };
@@ -166,7 +166,7 @@ async function handleGitBashMcpRequest(input, options = {}) {
166
166
  capabilities: { tools: { listChanged: false } },
167
167
  serverInfo: {
168
168
  name: "git_bash",
169
- version: "0.3.2"
169
+ version: "0.4.0"
170
170
  },
171
171
  protocolVersion: protocolVersionFromInput(input) ?? "2024-11-05"
172
172
  });
@@ -222,7 +222,7 @@ async function runToolResponse(id, args, options) {
222
222
  function toolsForOptions(options) {
223
223
  const sharedTools = [{
224
224
  name: "which_bash",
225
- description: "Use before Windows shell work when the Git Bash executable path must be confirmed.",
225
+ description: "Use to find Git Bash on Windows.",
226
226
  inputSchema: {
227
227
  type: "object",
228
228
  properties: {},
@@ -230,7 +230,7 @@ function toolsForOptions(options) {
230
230
  }
231
231
  }, {
232
232
  name: "diagnose",
233
- description: "Use when git_bash cannot run or Windows shell readiness needs diagnosis.",
233
+ description: "Use to diagnose Git Bash readiness.",
234
234
  inputSchema: {
235
235
  type: "object",
236
236
  properties: {},
@@ -240,27 +240,27 @@ function toolsForOptions(options) {
240
240
  if (!canRunGitBash(options)) return sharedTools;
241
241
  return [{
242
242
  name: "run",
243
- description: "Use on native Windows for Bash commands, POSIX behavior, Git tooling, or Unix utilities; use exec_command only when git_bash is unavailable or the operation is not shell work.",
243
+ description: "Use to run Bash, Git, POSIX, or Unix commands on Windows; use exec_command only if unavailable or nonshell.",
244
244
  inputSchema: {
245
245
  type: "object",
246
246
  properties: {
247
247
  command: {
248
248
  type: "string",
249
- description: "The command to execute."
249
+ description: "Command to run."
250
250
  },
251
251
  timeout: {
252
252
  type: "integer",
253
253
  minimum: 1,
254
254
  maximum: MAX_TIMEOUT_MS,
255
- description: `Optional timeout in milliseconds. If omitted, uses the inherited exec_command timeout when configured; otherwise ${defaultTimeoutMs(options)}ms.`
255
+ description: `Timeout in milliseconds; defaults to inherited exec_command timeout or ${defaultTimeoutMs(options)}ms.`
256
256
  },
257
257
  workdir: {
258
258
  type: "string",
259
- description: "The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands."
259
+ description: "Working directory. Use this instead of 'cd'. Defaults to current directory."
260
260
  },
261
261
  description: {
262
262
  type: "string",
263
- description: "Clear, concise description of what this command does in 5-10 words."
263
+ description: "Command purpose in 5-10 words."
264
264
  }
265
265
  },
266
266
  required: ["command"],
@@ -2877,7 +2877,7 @@ var LSP_MCP_TOOLS = [
2877
2877
  name: "status",
2878
2878
  aliases: ["lsp_status"],
2879
2879
  title: "LSP Status",
2880
- description: "Use to inspect configured and active LSP servers without starting one.",
2880
+ description: "Use to list LSP servers without starting them.",
2881
2881
  inputSchema: objectSchema({}),
2882
2882
  execute: executeLspStatus
2883
2883
  },
@@ -2885,7 +2885,7 @@ var LSP_MCP_TOOLS = [
2885
2885
  name: "diagnostics",
2886
2886
  aliases: ["lsp_diagnostics"],
2887
2887
  title: "LSP Diagnostics",
2888
- description: "Use after code edits or during diagnosis to get errors, warnings, and hints for a file or directory.",
2888
+ description: "Use to get file or directory diagnostics.",
2889
2889
  inputSchema: objectSchema({
2890
2890
  filePath: {
2891
2891
  type: "string",
@@ -2909,7 +2909,7 @@ var LSP_MCP_TOOLS = [
2909
2909
  name: "goto_definition",
2910
2910
  aliases: ["lsp_goto_definition"],
2911
2911
  title: "LSP Goto Definition",
2912
- description: "Use to find the exact definition of a symbol before changing or explaining it.",
2912
+ description: "Use to find a symbol's definition.",
2913
2913
  inputSchema: objectSchema({
2914
2914
  filePath: {
2915
2915
  type: "string",
@@ -2934,7 +2934,7 @@ var LSP_MCP_TOOLS = [
2934
2934
  name: "find_references",
2935
2935
  aliases: ["lsp_find_references"],
2936
2936
  title: "LSP Find References",
2937
- description: "Use to find every workspace reference before refactoring, renaming, or assessing impact.",
2937
+ description: "Use to find all workspace references to a symbol.",
2938
2938
  inputSchema: objectSchema({
2939
2939
  filePath: {
2940
2940
  type: "string",
@@ -2963,7 +2963,7 @@ var LSP_MCP_TOOLS = [
2963
2963
  name: "symbols",
2964
2964
  aliases: ["lsp_symbols"],
2965
2965
  title: "LSP Symbols",
2966
- description: "Use to outline one file or locate named symbols across the workspace.",
2966
+ description: "Use to outline a file or search workspace symbols.",
2967
2967
  inputSchema: objectSchema({
2968
2968
  filePath: {
2969
2969
  type: "string",
@@ -2972,7 +2972,7 @@ var LSP_MCP_TOOLS = [
2972
2972
  scope: {
2973
2973
  type: "string",
2974
2974
  enum: ["document", "workspace"],
2975
- description: "Use document for file outline or workspace for project-wide search."
2975
+ description: "document outlines a file; workspace searches the project."
2976
2976
  },
2977
2977
  query: {
2978
2978
  type: "string",
@@ -2989,7 +2989,7 @@ var LSP_MCP_TOOLS = [
2989
2989
  name: "prepare_rename",
2990
2990
  aliases: ["lsp_prepare_rename"],
2991
2991
  title: "LSP Prepare Rename",
2992
- description: "Use before rename to verify the symbol and position support a semantic rename.",
2992
+ description: "Use to check whether a symbol supports semantic rename.",
2993
2993
  inputSchema: objectSchema({
2994
2994
  filePath: {
2995
2995
  type: "string",
@@ -3014,7 +3014,7 @@ var LSP_MCP_TOOLS = [
3014
3014
  name: "rename",
3015
3015
  aliases: ["lsp_rename"],
3016
3016
  title: "LSP Rename",
3017
- description: "Use for a semantic workspace-wide symbol rename after prepare_rename succeeds.",
3017
+ description: "Use to rename a symbol workspace-wide after prepare_rename succeeds.",
3018
3018
  inputSchema: objectSchema({
3019
3019
  filePath: {
3020
3020
  type: "string",
@@ -3044,16 +3044,16 @@ var LSP_MCP_TOOLS = [
3044
3044
  name: "install_decision",
3045
3045
  aliases: ["lsp_install_decision"],
3046
3046
  title: "LSP Install Decision",
3047
- description: "Use after a missing-server prompt to record explicit install permission or a decline; decline when permission was not explicit.",
3047
+ description: "Use to record explicit LSP install permission or decline.",
3048
3048
  inputSchema: objectSchema({
3049
3049
  server_id: {
3050
3050
  type: "string",
3051
- description: "The LSP server id from the not-installed message (e.g. 'rust')."
3051
+ description: "Server id from the not-installed message, e.g. rust."
3052
3052
  },
3053
3053
  decision: {
3054
3054
  type: "string",
3055
3055
  enum: ["declined", "allowed"],
3056
- description: "'declined' silences future prompts; 'allowed' pre-authorizes installation."
3056
+ description: "declined silences prompts; allowed authorizes installation."
3057
3057
  }
3058
3058
  }, ["server_id", "decision"]),
3059
3059
  execute: executeLspInstallDecision
@@ -3072,7 +3072,7 @@ function coerceToolArguments(value) {
3072
3072
  //#endregion
3073
3073
  //#region packages/lsp-core/src/mcp.ts
3074
3074
  var SERVER_NAME = "lsp";
3075
- var SERVER_VERSION = "0.3.2";
3075
+ var SERVER_VERSION = "0.4.0";
3076
3076
  async function handleLspMcpRequest(input) {
3077
3077
  if (!isPlainRecord(input)) return errorResponse(null, -32600, "Invalid Request");
3078
3078
  const id = jsonRpcId(input["id"]);
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as CORE_INSTRUCTIONS } from "./core-instructions-CKS8xwZK.js";
2
+ import { t as CORE_INSTRUCTIONS } from "./core-instructions-D4kR5ZFv.js";
3
3
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
4
4
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
5
5
  import { stdin, stdout } from "node:process";
@@ -1,20 +1,20 @@
1
1
  ---
2
2
  name: ast-grep
3
- description: AST-aware search and deterministic rewrite. Use when a code pattern depends on syntax shape or needs a safe repeatable codemod.
3
+ description: Search or rewrite code by syntax shape; use for safe repeatable codemods.
4
4
  ---
5
5
 
6
6
  # ast-grep
7
7
 
8
- Use `sg` when target is syntax shape: function, call, class, import, missing `await`, empty catch, unsafe assertion, or codemod. Use `rg` for plain text.
8
+ Use `sg` for syntax shapes; use `rg` for text.
9
9
 
10
10
  ## Flow
11
11
 
12
12
  1. Name language and exact syntax shape.
13
13
  2. Start search-only. Use smallest pattern with metavariables.
14
- 3. Inspect every match class. Add `inside`, `has`, `not`, or relational rule only when needed.
14
+ 3. Inspect match classes; constrain only as needed.
15
15
  4. Test rewrite on narrow path. Review diff.
16
16
  5. Apply deterministic rewrite. Run formatter, diagnostics, targeted tests.
17
17
 
18
- Use `sg run -p '<pattern>' -l <language> <path>` for simple search. Use YAML rule for constraints, relational matching, or reusable codemod. Never run write mode before match review. Never use regex replacement for syntax-bearing code.
18
+ Simple search: `sg run -p '<pattern>' -l <language> <path>`. Use YAML for constraints, relations, or reusable codemods. Review matches before writes. Never regex-replace syntax-bearing code.
19
19
 
20
20
  Load only needed reference: `patterns.md`, `yaml-rules.md`, `recipes.md`, `pitfalls.md`, `sgconfig.md`, `cli.md`, or `install.md`.
@@ -1,84 +1,31 @@
1
1
  ---
2
2
  name: caveman
3
- description: >
4
- Ultra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman
5
- while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra,
6
- wenyan-lite, wenyan-full, wenyan-ultra.
7
- Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens",
8
- "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
3
+ description: Terse, technically exact replies in lite, full, ultra, or Wenyan variants. Use for caveman mode, brief replies, fewer tokens, or `/caveman`.
9
4
  ---
10
5
 
11
- Respond terse like smart caveman. All technical substance stay. Only fluff die.
6
+ # Caveman
12
7
 
13
- ## Persistence
8
+ Write terse. Keep all technical meaning; remove filler.
14
9
 
15
- ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".
16
-
17
- Default: **full**. Switch: `/caveman lite|full|ultra`.
10
+ Active every reply until user says `stop caveman` or `normal mode`. Default `full`; switch with `/caveman lite|full|ultra` or Wenyan equivalent.
18
11
 
19
12
  ## Rules
20
13
 
21
- Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). No tool-call narration, no decorative tables/emoji, no dumping long raw error logs unless asked — quote shortest decisive line. Standard well-known tech acronyms OK (DB/API/HTTP); never invent new abbreviations (cfg/impl/req/res/fn) — tokenizer split them same as full word: zero token saved, reader still decode. Full word cheaper AND clearer. No causal arrows (→) either — own token, save nothing. Technical terms exact. Code blocks unchanged. Errors quoted exact.
22
-
23
- Preserve user's dominant language. User write Portuguese → reply Portuguese caveman. User write Spanish → reply Spanish caveman. Compress the style, not the language. No forced English openings or status phrases. ALWAYS keep technical terms, code, API names, CLI commands, commit-type keywords (feat/fix/...), and exact error strings verbatim — unless user explicitly ask for translation.
24
-
25
- No self-reference. Never name or announce the style. No "caveman mode on", "me caveman think", no third-person caveman tags. Output caveman-only — never normal answer plus "Caveman:" recap. Exception: user explicitly ask what the mode is.
14
+ - Match user's language.
15
+ - Preserve exact technical terms, code, APIs, commands, paths, error text, and commit keywords unless translation requested.
16
+ - Remove articles when clear, filler, pleasantries, hedging, repetition, and decorative formatting. Fragments allowed.
17
+ - Use short familiar words. Keep standard acronyms; invent none. No causal arrows.
18
+ - No self-reference, style announcement, tool narration, or duplicate normal-language recap.
19
+ - Quote only decisive error lines unless more requested.
20
+ - Code, commits, and PR text stay grammatical.
26
21
 
27
22
  Pattern: `[thing] [action] [reason]. [next step].`
28
23
 
29
- Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
30
- Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"
31
-
32
- ## Intensity
33
-
34
- | Level | What change |
35
- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
- | **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight |
37
- | **full** | Drop articles, fragments OK, short synonyms. Classic caveman. No tool-call narration, no decorative tables/emoji, no long raw error-log dumps unless asked. Standard acronyms OK; no invented abbreviations |
38
- | **ultra** | Strip conjunctions when cause-then-effect stay unambiguous. One word when one word enough. State each fact once. NO prose abbreviations (cfg/impl/req/res/fn/auth), NO arrows (X → Y) — measured zero token saving under tokenizer, cost decode clarity. Code symbols, function names, API names, error strings: never touch |
39
- | **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register |
40
- | **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) |
41
- | **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse |
42
-
43
- Example — "Why React component re-render?"
44
-
45
- - lite: "Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`."
46
- - full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."
47
- - ultra: "Inline obj prop, new ref, re-render. `useMemo`."
48
- - wenyan-lite: "組件頻重繪,以每繪新生對象參照故。以 useMemo 包之。"
49
- - wenyan-full: "每繪新生對象參照,故重繪;以 useMemo 包之則免。"
50
- - wenyan-ultra: "新參照則重繪。useMemo 包之。"
51
-
52
- Example — "Explain database connection pooling."
53
-
54
- - lite: "Connection pooling reuses open connections instead of creating new ones per request. Avoids repeated handshake overhead."
55
- - full: "Pool reuse open DB connections. No new connection per request. Skip handshake overhead."
56
- - ultra: "Pool reuse open DB connections. No per-request handshake."
57
- - wenyan-full: "池蓄已開之連,不逐請而新開,省握手之費。"
58
- - wenyan-ultra: "池蓄連,免逐請新開,省握手。"
59
-
60
- ## Auto-Clarity
61
-
62
- Drop caveman when:
63
-
64
- - Security warnings
65
- - Irreversible action confirmations
66
- - Multi-step sequences where fragment order or omitted conjunctions risk misread
67
- - Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions)
68
- - User asks to clarify or repeats question
69
-
70
- Resume caveman after clear part done.
71
-
72
- Example — destructive op:
73
-
74
- > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
75
- >
76
- > ```sql
77
- > DROP TABLE users;
78
- > ```
79
- >
80
- > Caveman resume. Verify backup exist first.
24
+ ## Levels
81
25
 
82
- ## Boundaries
26
+ - `lite`: grammatical sentences; no filler or hedging.
27
+ - `full`: drop clear articles; fragments and short words allowed.
28
+ - `ultra`: state each fact once; remove safe conjunctions; never shorten technical text.
29
+ - `wenyan-lite|full|ultra`: same levels in semi-classical to fully classical Chinese.
83
30
 
84
- Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end.
31
+ Use full grammar for security warnings, irreversible confirmations, ordered steps, ambiguity, or clarification. Resume terse style afterward.
@@ -1,16 +1,8 @@
1
1
  ---
2
2
  name: comment-checker
3
- description: Use when Codex needs to understand or respond to automatic comment-checker feedback emitted after an edit-like PostToolUse hook.
3
+ description: Use to handle comment-checker warnings after edits.
4
4
  ---
5
5
 
6
- # Codex Comment Checker
6
+ # Comment Checker
7
7
 
8
- The plugin registers a `PostToolUse` hook for successful `apply_patch`, `write`, `edit`, `multi_edit`, and `multiedit` calls.
9
-
10
- When comment-checker reports a warning after a patch, Codex receives blocking feedback and should fix or explain the flagged comment before moving on.
11
-
12
- ## Scope
13
-
14
- - No MCP tool is exposed.
15
- - Non-edit tools are ignored by this plugin.
16
- - Missing checker binaries emit no hook output so normal Codex work can continue.
8
+ After successful `apply_patch`, `write`, `edit`, `multi_edit`, or `multiedit`, fix or explain any blocking warning before continuing. Non-edit tools are ignored. No MCP tool exists. Missing checker binaries produce no output.
@@ -1,26 +1,18 @@
1
1
  ---
2
2
  name: compress
3
- description: Rewrite any text, skill, prompt, documentation, instructions, prose, notes, or structured content to use fewer words and tokens while preserving meaning, facts, constraints, safety, tone, and required structure. Use when asked to compress, condense, tighten, shorten, de-duplicate, optimize token usage, or rewrite using caveman principles.
3
+ description: Use to shorten text without losing meaning, constraints, tone, safety, structure, or exact technical content.
4
4
  ---
5
5
 
6
6
  # Compress
7
7
 
8
- Rewrite with caveman principles: all substance stays; filler dies. Do not automatically adopt caveman voice unless user requests it. Default output remains clear, grammatical, and natural.
8
+ 1. Identify purpose, audience, format, facts, exact strings, constraints, gates, warnings, links, and tone.
9
+ 2. Remove repetition, filler, redundant headings, obvious explanation, decorative wording, and weak transitions.
10
+ 3. Merge related rules. Use direct verbs, familiar words, compact lists, and one statement per fact.
11
+ 4. Preserve names, code, commands, paths, APIs, errors, numbers, citations, legal terms, user terminology, and order where it matters.
12
+ 5. Compare result with source: no lost rule, changed meaning, weaker prohibition, invented claim, broken reference, or scope change.
9
13
 
10
- ## Workflow
14
+ Keep grammar when terseness risks ambiguity, especially for safety, irreversible actions, legal or medical text, and ordered work. Do not adopt caveman voice unless requested.
11
15
 
12
- 1. Identify purpose, audience, format, required facts, exact strings, constraints, decision gates, safety warnings, examples, links, and tone.
13
- 2. Remove repetition, throat-clearing, filler, redundant headings, obvious explanation, decorative adjectives, and verbose transitions.
14
- 3. Merge related rules. Prefer direct verbs, short familiar words, compact lists, and one statement per fact.
15
- 4. Preserve technical names, code, commands, paths, APIs, error strings, numbers, citations, legal terms, and user-defined terminology exactly unless correction is requested.
16
- 5. Preserve ordering when sequence matters. Keep full grammar where compression could create ambiguity, especially safety, irreversible actions, legal/medical guidance, or multi-step operations.
17
- 6. Check compressed output against source: no lost requirement, changed meaning, weakened prohibition, invented claim, broken reference, or altered scope.
16
+ For skills and prompts, preserve frontmatter, triggers, tool and resource routing, permissions, stop conditions, and validation. For code or config, change prose only unless refactoring was requested. Keep evidence and nuance in prose; keep tables only when they improve scanning.
18
17
 
19
- ## Content Rules
20
-
21
- - **Skills/prompts:** preserve YAML frontmatter, trigger coverage, imperative instructions, tool/resource references, permissions, stop conditions, and validation. Remove duplicated “when to use” prose from body when frontmatter already carries it.
22
- - **Code/config:** never compress syntax or identifiers unless explicitly asked to refactor. Compress surrounding explanation only.
23
- - **Prose/docs:** preserve thesis, evidence, nuance, attribution, and intended tone. Remove repeated framing and examples that add no distinct value.
24
- - **Lists/tables:** merge duplicates; keep mappings and comparisons when format improves scan speed.
25
-
26
- If user sets length/ratio/style, follow it. Otherwise aim for largest safe reduction, not shortest possible output. Report before/after size only when useful or requested.
18
+ Honor requested size or style; otherwise maximize safe reduction. Report size only when useful or requested.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: debugging
3
- description: Reproduce, isolate, prove, and minimally fix runtime bugs. Use for crashes, wrong behavior, hangs, races, leaks, or unexplained performance.
3
+ description: Use to prove and minimally fix crashes, wrong behavior, hangs, races, leaks, or slowness.
4
4
  ---
5
5
 
6
6
  # Debugging
@@ -9,15 +9,14 @@ No guess-fix loop.
9
9
 
10
10
  1. Reproduce exact symptom with smallest command.
11
11
  2. Minimize input, environment, and path.
12
- 3. Write at least three plausible causes from distinct layers.
13
- 4. Rank by evidence and cheap falsifier.
14
- 5. Instrument narrow boundary. Capture values, ordering, ownership, timing, process state.
15
- 6. Disprove causes. After two failed rounds, change angle; do not add reviewer or oracle agent.
16
- 7. Confirm root cause with evidence that predicts symptom.
17
- 8. Add failing public-behavior regression test.
18
- 9. Make minimum root fix.
19
- 10. Run targeted test, then proportional suite. Remove temporary instrumentation.
12
+ 3. List three plausible cross-layer causes; rank by evidence and cheapest falsifier.
13
+ 4. Instrument narrow boundary. Capture values, ordering, ownership, timing, process state.
14
+ 5. Disprove causes. Change angle after two failed rounds; add no reviewer or oracle agent.
15
+ 6. Confirm root cause with evidence that predicts symptom.
16
+ 7. Add failing public-behavior regression test.
17
+ 8. Make minimum root fix.
18
+ 9. Run targeted test, then proportional suite. Remove temporary instrumentation.
20
19
 
21
- No sleeps for async proof. Use event, signal, fake clock, trace, debugger, profiler, sanitizer, or deterministic fixture. No implementation before root cause unless user explicitly asks for mitigation.
20
+ No sleeps for async proof; use deterministic events, clocks, traces, debuggers, profilers, sanitizers, or fixtures. Do not implement before proving cause unless user requests mitigation.
22
21
 
23
22
  Load only relevant runtime/tool reference under `references/`. Report reproduction, hypotheses rejected, root cause, proof, fix, checks, residual uncertainty.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: define-goal
3
- description: Define or refine one measurable goal before work. Use only when explicitly asked to set, create, quantify, or clarify a goal.
3
+ description: Use to define one measurable goal when explicitly asked to set or refine one.
4
4
  ---
5
5
 
6
6
  # Define Goal
@@ -9,12 +9,12 @@ On activation, first user-visible line must be:
9
9
 
10
10
  **GOAL MODE ACTIVATED**
11
11
 
12
- Turn intent into one bounded, verifiable objective. No plan, log, snapshot, ledger, or handoff.
12
+ Create one bounded, verifiable objective; no plan, log, snapshot, ledger, or handoff.
13
13
 
14
14
  ## Flow
15
15
 
16
16
  1. State outcome, target, proof, scope, exclusions, stop condition.
17
- 2. Add meaningful thresholds: exact checks, paths, environments, counts, limits. No fake precision.
17
+ 2. Add useful checks, paths, environments, counts, or limits; no fake precision.
18
18
  3. Replace activity goals like “improve” with observable state.
19
19
  4. Ask one short question only if missing scope or validator changes intent.
20
20
  5. Call `get_goal`.
@@ -1,18 +1,18 @@
1
1
  ---
2
2
  name: frontend
3
- description: Build, style, debug, audit, or polish web UI. Use for frontend components, pages, visual QA, accessibility, performance, or premium editorial design.
3
+ description: Use to build, debug, audit, or polish web UI, accessibility, performance, or editorial design.
4
4
  ---
5
5
 
6
6
  # Frontend
7
7
 
8
- Preserve stack, behavior, design tokens, component patterns, and supplied screenshot/URL contract. Small request stays small. No forced `DESIGN.md`, research lane, new dependency, GSAP, or heavyweight QA.
8
+ Preserve stack, behavior, tokens, patterns, and supplied visual contract. Keep scope small. Do not force `DESIGN.md`, research, dependencies, GSAP, or heavy QA.
9
9
 
10
10
  ## Route
11
11
 
12
- - Build/redesign: inspect app shell, tokens, target component, responsive contract.
13
- - Visual reference: use supplied screenshot/URL first. Measure layout, type, color, spacing, surface, motion.
12
+ - Build/redesign: inspect shell, tokens, target component, responsive contract.
13
+ - Visual reference: use it first; measure layout, type, color, spacing, surface, and motion.
14
14
  - Performance: load `references/perfection/README.md` only for real audit or regression.
15
- - Palette/type/style lookup: load only relevant `references/ui-ux-db` data.
15
+ - Palette/type/style: load only relevant `references/ui-ux-db` data.
16
16
  - Premium editorial: use rules below.
17
17
 
18
18
  ## Premium editorial mode
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: handoff
3
- description: Compact conversation state into a safe resumable handoff. Use when asked to hand off, save context, or prepare another agent/session to continue.
3
+ description: Use to save compact, safe context for another agent or session.
4
4
  ---
5
5
 
6
6
  # Handoff
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  name: lsp
3
- description: Use when Codex needs language-server diagnostics, definitions, references, symbols, or rename safety checks in the current workspace.
3
+ description: Use LSP diagnostics, definitions, references, symbols, or safe rename.
4
4
  ---
5
5
 
6
- # Codex LSP
6
+ # LSP
7
7
 
8
- Call `lsp` MCP tools through the tool interface; `lsp.*`/`mcp__lsp__*` are tool-call names, not shell commands.
8
+ Call `lsp` MCP tools, never their names as shell commands.
9
9
 
10
10
  ## Tools
11
11
 
12
- - `lsp.status`: list configured, installed, missing, disabled, and active language servers.
13
- - `lsp.diagnostics`: check one file or directory for LSP diagnostics. Prefer `severity: "error"` after edits.
14
- - `lsp.goto_definition`: locate a symbol definition from file, line, and character.
15
- - `lsp.find_references`: find usages of a symbol across the workspace.
16
- - `lsp.symbols`: inspect document symbols or search workspace symbols.
17
- - `lsp.prepare_rename`: check whether a rename is valid at a position.
18
- - `lsp.rename`: apply a language-server workspace edit for a rename.
12
+ - `lsp.status`: server state.
13
+ - `lsp.diagnostics`: file or directory diagnostics; prefer `severity: "error"` after edits.
14
+ - `lsp.goto_definition`: symbol definition.
15
+ - `lsp.find_references`: workspace usages.
16
+ - `lsp.symbols`: document outline or workspace symbol search.
17
+ - `lsp.prepare_rename`: rename validity.
18
+ - `lsp.rename`: workspace rename edit.
19
19
 
20
20
  ## Config
21
21
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lsp-setup
3
- description: Configure and verify one language server. Use when semantic tooling is missing, unconfigured, or reports that its server is not installed.
3
+ description: Use to configure and verify one missing or unconfigured language server.
4
4
  ---
5
5
 
6
6
  # LSP Setup
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan
3
- description: Write a concise executable plan. Use only when the user explicitly asks for a plan before implementation.
3
+ description: Use to write an executable plan only when explicitly requested before implementation.
4
4
  ---
5
5
 
6
6
  # Plan
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan-review
3
- description: Review and repair an existing plan once. Use only when the user explicitly asks to review, critique, validate, or improve a plan.
3
+ description: Use to review and repair a plan once when explicitly requested.
4
4
  ---
5
5
 
6
6
  # Plan Review
@@ -1,13 +1,11 @@
1
1
  ---
2
2
  name: programming
3
- description: Strict Python, Rust, TypeScript, and Go implementation. Use whenever creating or changing .py, .pyi, .rs, .ts, .tsx, .mts, .cts, or .go files.
3
+ description: Use strict Python, Rust, TypeScript, and Go rules for matching source files.
4
4
  ---
5
5
 
6
6
  # Programming
7
7
 
8
- Use for `.py`, `.pyi`, `.rs`, `.ts`, `.tsx`, `.mts`, `.cts`, `.go`, or matching project manifest.
9
-
10
- Before code, read language `references/<language>/README.md`; load only linked topic needed. Read `references/logging.md` only when touching logs. Rust unsafe/FFI also loads all `references/rust-ub/`.
8
+ Before editing `.py`, `.pyi`, `.rs`, `.ts`, `.tsx`, `.mts`, `.cts`, `.go`, or matching manifests, read `references/<language>/README.md`. Load `references/logging.md` only for logs and all `references/rust-ub/` for Rust unsafe or FFI.
11
9
 
12
10
  ## Core
13
11
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: refactor
3
- description: Behavior-preserving structural change with tests and semantic navigation. Use when asked to refactor, restructure, extract, simplify, or modernize code.
3
+ description: Use to refactor, restructure, extract, simplify, or modernize code without behavior changes.
4
4
  ---
5
5
 
6
6
  # Refactor
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: remove-ai-slops
3
- description: Remove AI-authored code smells while preserving behavior. Use when asked to clean generated code, remove AI slop, or simplify branch changes without feature work.
3
+ description: Use to remove AI-generated code smells without behavior or feature changes.
4
4
  ---
5
5
 
6
6
  # Remove AI Slops
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rules
3
- description: Explain or inspect HolyCodex scoped rule loading and cache. Use for rule locations, matching, injection, deduplication, limits, or cache behavior.
3
+ description: Use to inspect HolyCodex rule discovery, matching, injection, deduplication, limits, or cache.
4
4
  ---
5
5
 
6
6
  # Rules
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: security-research
3
- description: Exploitability-led security audit with optional narrow research. Use for repository security reviews, threat analysis, vulnerability validation, or attack paths.
3
+ description: Use for exploitability-led repo security review, threat analysis, validation, or attack paths.
4
4
  ---
5
5
 
6
6
  # Security Research
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tdd
3
- description: Public-seam vertical red-green-refactor development. Use when the user requests test-first work, TDD, regression tests, or integration tests.
3
+ description: Use public-seam red-green-refactor for requested TDD, regression, or integration tests.
4
4
  ---
5
5
 
6
6
  # TDD
@@ -1,60 +1,5 @@
1
- # When to Mock
1
+ # Mocking
2
2
 
3
- Mock at **system boundaries** only:
3
+ Prefer real objects, test databases, or fakes. Mock only system boundaries: external APIs, time, randomness, and sometimes databases or filesystems. Never mock owned classes or internal collaborators.
4
4
 
5
- - External APIs (payment, email, etc.)
6
- - Databases (sometimes - prefer test DB)
7
- - Time/randomness
8
- - File system (sometimes)
9
-
10
- Don't mock:
11
-
12
- - Your own classes/modules
13
- - Internal collaborators
14
- - Anything you control
15
-
16
- ## Designing for Mockability
17
-
18
- At system boundaries, design interfaces that are easy to mock:
19
-
20
- **1. Use dependency injection**
21
-
22
- Pass external dependencies in rather than creating them internally:
23
-
24
- ```typescript
25
- // Easy to mock
26
- function processPayment(order, paymentClient) {
27
- return paymentClient.charge(order.total);
28
- }
29
-
30
- // Hard to mock
31
- function processPayment(order) {
32
- const client = new StripeClient(process.env.STRIPE_KEY);
33
- return client.charge(order.total);
34
- }
35
- ```
36
-
37
- **2. Prefer SDK-style interfaces over generic fetchers**
38
-
39
- Create specific functions for each external operation instead of one generic function with conditional logic:
40
-
41
- ```typescript
42
- // GOOD: Each function is independently mockable
43
- const api = {
44
- getUser: (id) => fetch(`/users/${id}`),
45
- getOrders: (userId) => fetch(`/users/${userId}/orders`),
46
- createOrder: (data) => fetch("/orders", { method: "POST", body: data }),
47
- };
48
-
49
- // BAD: Mocking requires conditional logic inside the mock
50
- const api = {
51
- fetch: (endpoint, options) => fetch(endpoint, options),
52
- };
53
- ```
54
-
55
- The SDK approach means:
56
-
57
- - Each mock returns one specific shape
58
- - No conditional logic in test setup
59
- - Easier to see which endpoints a test exercises
60
- - Type safety per endpoint
5
+ Inject boundary dependencies. Expose one typed operation per external action instead of a generic conditional fetcher; each mock then has one input and result shape.
@@ -1,77 +1,7 @@
1
- # Good and Bad Tests
1
+ # Tests
2
2
 
3
- ## Good Tests
3
+ Test caller-visible behavior through public interfaces. Good tests survive refactors, use known literal expectations, perform one action, and assert its observable result.
4
4
 
5
- **Integration-style**: Test through real interfaces, not mocks of internal parts.
5
+ Reject tests of private methods, internal calls, call counts, storage inspected behind the public interface, snapshots without a stable contract, or expected values recomputed by production logic. These test implementation, not behavior.
6
6
 
7
- ```typescript
8
- // GOOD: Tests observable behavior
9
- test("user can checkout with valid cart", async () => {
10
- const cart = createCart();
11
- cart.add(product);
12
- const result = await checkout(cart, paymentMethod);
13
- expect(result.status).toBe("confirmed");
14
- });
15
- ```
16
-
17
- Characteristics:
18
-
19
- - Tests behavior users/callers care about
20
- - Uses public API only
21
- - Survives internal refactors
22
- - Describes WHAT, not HOW
23
- - One logical assertion per test
24
-
25
- ## Bad Tests
26
-
27
- **Implementation-detail tests**: Coupled to internal structure.
28
-
29
- ```typescript
30
- // BAD: Tests implementation details
31
- test("checkout calls paymentService.process", async () => {
32
- const mockPayment = jest.mock(paymentService);
33
- await checkout(cart, payment);
34
- expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
35
- });
36
- ```
37
-
38
- Red flags:
39
-
40
- - Mocking internal collaborators
41
- - Testing private methods
42
- - Asserting on call counts/order
43
- - Test breaks when refactoring without behavior change
44
- - Test name describes HOW not WHAT
45
- - Verifying through external means instead of interface
46
-
47
- ```typescript
48
- // BAD: Bypasses interface to verify
49
- test("createUser saves to database", async () => {
50
- await createUser({ name: "Alice" });
51
- const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
52
- expect(row).toBeDefined();
53
- });
54
-
55
- // GOOD: Verifies through interface
56
- test("createUser makes user retrievable", async () => {
57
- const user = await createUser({ name: "Alice" });
58
- const retrieved = await getUser(user.id);
59
- expect(retrieved.name).toBe("Alice");
60
- });
61
- ```
62
-
63
- **Tautological tests**: Expected value restates the implementation, so the test passes by construction.
64
-
65
- ```typescript
66
- // BAD: Expected value is recomputed the way the code computes it
67
- test("calculateTotal sums line items", () => {
68
- const items = [{ price: 10 }, { price: 5 }];
69
- const expected = items.reduce((sum, i) => sum + i.price, 0);
70
- expect(calculateTotal(items)).toBe(expected);
71
- });
72
-
73
- // GOOD: Expected value is an independent, known literal
74
- test("calculateTotal sums line items", () => {
75
- expect(calculateTotal([{ price: 10 }, { price: 5 }])).toBe(15);
76
- });
77
- ```
7
+ Example: after `createUser`, verify `getUser(id)` returns the user; do not query the database directly.
@@ -1,4 +0,0 @@
1
- //#region src/core-instructions.ts
2
- var CORE_INSTRUCTIONS = "HolyCodex core: Start first user-facing update: \"I detect [fix/implementation/investigation/pure question] intent — [reason]. [action].\" Then act. Use git_bash MCP for every shell command. Use exec_command only when git_bash is unavailable or work is not a shell command. Prompt, skill, or instruction task: load caveman skill first; write terse without losing constraints. Primary agent keeps control. Subagents reduce cost, never simulate an organization. Delegate bounded labor, never responsibility. Spend intelligence only where complexity requires it.";
3
- //#endregion
4
- export { CORE_INSTRUCTIONS as t };