holycodex 0.3.3 → 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 +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/agents/explorer.toml +2 -2
- package/plugin/agents/librarian.toml +2 -2
- package/plugin/agents/worker.toml +2 -2
- package/plugin/runtime/bootstrap.js +1 -1
- package/plugin/runtime/cli.js +2 -2
- package/plugin/runtime/core-instructions-D4kR5ZFv.js +4 -0
- package/plugin/runtime/git-bash.js +8 -8
- package/plugin/runtime/lsp.js +12 -12
- package/plugin/runtime/rules.js +1 -1
- package/plugin/skills/ast-grep/SKILL.md +4 -4
- package/plugin/skills/caveman/SKILL.md +17 -70
- package/plugin/skills/comment-checker/SKILL.md +3 -11
- package/plugin/skills/compress/SKILL.md +9 -17
- package/plugin/skills/debugging/SKILL.md +9 -10
- package/plugin/skills/define-goal/SKILL.md +3 -3
- package/plugin/skills/frontend/SKILL.md +5 -5
- package/plugin/skills/handoff/SKILL.md +1 -1
- package/plugin/skills/lsp/SKILL.md +10 -10
- package/plugin/skills/lsp-setup/SKILL.md +1 -1
- package/plugin/skills/plan/SKILL.md +1 -1
- package/plugin/skills/plan-review/SKILL.md +1 -1
- package/plugin/skills/programming/SKILL.md +2 -4
- package/plugin/skills/refactor/SKILL.md +1 -1
- package/plugin/skills/remove-ai-slops/SKILL.md +1 -1
- package/plugin/skills/rules/SKILL.md +1 -1
- package/plugin/skills/security-research/SKILL.md +1 -1
- package/plugin/skills/tdd/SKILL.md +1 -1
- package/plugin/skills/tdd/mocking.md +3 -58
- package/plugin/skills/tdd/tests.md +4 -74
- package/plugin/runtime/core-instructions-C3FKctng.js +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
description = "
|
|
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
|
|
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 = "
|
|
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
|
|
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 = "
|
|
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]."
|
|
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
|
"""
|
package/plugin/runtime/cli.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
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: `
|
|
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: "
|
|
259
|
+
description: "Working directory. Use this instead of 'cd'. Defaults to current directory."
|
|
260
260
|
},
|
|
261
261
|
description: {
|
|
262
262
|
type: "string",
|
|
263
|
-
description: "
|
|
263
|
+
description: "Command purpose in 5-10 words."
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
266
|
required: ["command"],
|
package/plugin/runtime/lsp.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
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: "
|
|
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.
|
|
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"]);
|
package/plugin/runtime/rules.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as CORE_INSTRUCTIONS } from "./core-instructions-
|
|
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:
|
|
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`
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
6
|
+
# Caveman
|
|
12
7
|
|
|
13
|
-
|
|
8
|
+
Write terse. Keep all technical meaning; remove filler.
|
|
14
9
|
|
|
15
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
No self-reference
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
3
|
+
description: Use to handle comment-checker warnings after edits.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Comment Checker
|
|
7
7
|
|
|
8
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
17
|
-
8.
|
|
18
|
-
9.
|
|
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
|
|
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:
|
|
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
|
-
|
|
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
|
|
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:
|
|
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,
|
|
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
|
|
13
|
-
- Visual reference: use
|
|
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
|
|
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:
|
|
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
|
|
3
|
+
description: Use LSP diagnostics, definitions, references, symbols, or safe rename.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# LSP
|
|
7
7
|
|
|
8
|
-
Call `lsp` MCP tools
|
|
8
|
+
Call `lsp` MCP tools, never their names as shell commands.
|
|
9
9
|
|
|
10
10
|
## Tools
|
|
11
11
|
|
|
12
|
-
- `lsp.status`:
|
|
13
|
-
- `lsp.diagnostics`:
|
|
14
|
-
- `lsp.goto_definition`:
|
|
15
|
-
- `lsp.find_references`:
|
|
16
|
-
- `lsp.symbols`:
|
|
17
|
-
- `lsp.prepare_rename`:
|
|
18
|
-
- `lsp.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:
|
|
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-review
|
|
3
|
-
description:
|
|
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:
|
|
3
|
+
description: Use strict Python, Rust, TypeScript, and Go rules for matching source files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Programming
|
|
7
7
|
|
|
8
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
#
|
|
1
|
+
# Mocking
|
|
2
2
|
|
|
3
|
-
Mock
|
|
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
|
-
|
|
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
|
-
#
|
|
1
|
+
# Tests
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: Start first user-facing update: \"I detect [fix/implementation/investigation/pure question] intent — [reason]. [action].\" Act. Shell: git_bash MCP; exec_command only if unavailable or nonshell. Prompt/skill/instruction edit: load caveman; keep 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.";
|
|
3
|
-
//#endregion
|
|
4
|
-
export { CORE_INSTRUCTIONS as t };
|