oh-my-customcode 0.12.1 → 0.12.2

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.
Files changed (130) hide show
  1. package/README.md +4 -8
  2. package/dist/cli/index.js +137 -336
  3. package/dist/index.js +99 -260
  4. package/package.json +2 -4
  5. package/templates/.codex/agents/arch-documenter.md +0 -33
  6. package/templates/.codex/agents/arch-speckit-agent.md +0 -47
  7. package/templates/.codex/agents/be-express-expert.md +0 -30
  8. package/templates/.codex/agents/be-fastapi-expert.md +0 -43
  9. package/templates/.codex/agents/be-go-backend-expert.md +0 -43
  10. package/templates/.codex/agents/be-nestjs-expert.md +0 -28
  11. package/templates/.codex/agents/be-springboot-expert.md +0 -40
  12. package/templates/.codex/agents/db-postgres-expert.md +0 -36
  13. package/templates/.codex/agents/db-redis-expert.md +0 -36
  14. package/templates/.codex/agents/db-supabase-expert.md +0 -35
  15. package/templates/.codex/agents/de-airflow-expert.md +0 -34
  16. package/templates/.codex/agents/de-dbt-expert.md +0 -34
  17. package/templates/.codex/agents/de-kafka-expert.md +0 -81
  18. package/templates/.codex/agents/de-pipeline-expert.md +0 -32
  19. package/templates/.codex/agents/de-snowflake-expert.md +0 -36
  20. package/templates/.codex/agents/de-spark-expert.md +0 -36
  21. package/templates/.codex/agents/fe-svelte-agent.md +0 -29
  22. package/templates/.codex/agents/fe-vercel-agent.md +0 -37
  23. package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
  24. package/templates/.codex/agents/infra-aws-expert.md +0 -47
  25. package/templates/.codex/agents/infra-docker-expert.md +0 -47
  26. package/templates/.codex/agents/lang-golang-expert.md +0 -43
  27. package/templates/.codex/agents/lang-java21-expert.md +0 -39
  28. package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
  29. package/templates/.codex/agents/lang-python-expert.md +0 -43
  30. package/templates/.codex/agents/lang-rust-expert.md +0 -43
  31. package/templates/.codex/agents/lang-typescript-expert.md +0 -43
  32. package/templates/.codex/agents/mgr-claude-code-bible.md +0 -58
  33. package/templates/.codex/agents/mgr-creator.md +0 -39
  34. package/templates/.codex/agents/mgr-gitnerd.md +0 -45
  35. package/templates/.codex/agents/mgr-sauron.md +0 -161
  36. package/templates/.codex/agents/mgr-supplier.md +0 -35
  37. package/templates/.codex/agents/mgr-sync-checker.md +0 -38
  38. package/templates/.codex/agents/mgr-updater.md +0 -33
  39. package/templates/.codex/agents/qa-engineer.md +0 -32
  40. package/templates/.codex/agents/qa-planner.md +0 -73
  41. package/templates/.codex/agents/qa-writer.md +0 -27
  42. package/templates/.codex/agents/sys-memory-keeper.md +0 -43
  43. package/templates/.codex/agents/sys-naggy.md +0 -37
  44. package/templates/.codex/agents/tool-bun-expert.md +0 -26
  45. package/templates/.codex/agents/tool-npm-expert.md +0 -30
  46. package/templates/.codex/agents/tool-optimizer.md +0 -34
  47. package/templates/.codex/codex-native-hash.txt +0 -1
  48. package/templates/.codex/contexts/dev.md +0 -20
  49. package/templates/.codex/contexts/ecomode.md +0 -63
  50. package/templates/.codex/contexts/index.yaml +0 -41
  51. package/templates/.codex/contexts/research.md +0 -28
  52. package/templates/.codex/contexts/review.md +0 -23
  53. package/templates/.codex/hooks/hooks.json +0 -150
  54. package/templates/.codex/install-hooks.sh +0 -100
  55. package/templates/.codex/rules/MAY-optimization.md +0 -29
  56. package/templates/.codex/rules/MUST-agent-design.md +0 -57
  57. package/templates/.codex/rules/MUST-agent-identification.md +0 -29
  58. package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
  59. package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
  60. package/templates/.codex/rules/MUST-language-policy.md +0 -27
  61. package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
  62. package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
  63. package/templates/.codex/rules/MUST-permissions.md +0 -30
  64. package/templates/.codex/rules/MUST-safety.md +0 -23
  65. package/templates/.codex/rules/MUST-sync-verification.md +0 -125
  66. package/templates/.codex/rules/MUST-tool-identification.md +0 -82
  67. package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
  68. package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
  69. package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
  70. package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
  71. package/templates/.codex/rules/SHOULD-interaction.md +0 -34
  72. package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
  73. package/templates/.codex/rules/index.yaml +0 -141
  74. package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
  75. package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
  76. package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
  77. package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -100
  78. package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -272
  79. package/templates/.codex/skills/create-agent/SKILL.md +0 -91
  80. package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
  81. package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
  82. package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
  83. package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
  84. package/templates/.codex/skills/dev-review/SKILL.md +0 -81
  85. package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
  86. package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
  87. package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
  88. package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
  89. package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
  90. package/templates/.codex/skills/help/SKILL.md +0 -125
  91. package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
  92. package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
  93. package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
  94. package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
  95. package/templates/.codex/skills/lists/SKILL.md +0 -78
  96. package/templates/.codex/skills/memory-management/SKILL.md +0 -195
  97. package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
  98. package/templates/.codex/skills/memory-save/SKILL.md +0 -126
  99. package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
  100. package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
  101. package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
  102. package/templates/.codex/skills/npm-version/SKILL.md +0 -75
  103. package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
  104. package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
  105. package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
  106. package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
  107. package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
  108. package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
  109. package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
  110. package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
  111. package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
  112. package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
  113. package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
  114. package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
  115. package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
  116. package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
  117. package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
  118. package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
  119. package/templates/.codex/skills/status/SKILL.md +0 -153
  120. package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
  121. package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
  122. package/templates/.codex/skills/update-docs/SKILL.md +0 -140
  123. package/templates/.codex/skills/update-external/SKILL.md +0 -149
  124. package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
  125. package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
  126. package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
  127. package/templates/.codex/uninstall-hooks.sh +0 -52
  128. package/templates/AGENTS.md.en +0 -39
  129. package/templates/AGENTS.md.ko +0 -39
  130. package/templates/manifest.codex.json +0 -43
@@ -1,150 +0,0 @@
1
- {
2
- "hooks": {
3
- "PreToolUse": [
4
- {
5
- "matcher": "tool == \"Bash\" && tool_input.command matches \"(npm run dev|pnpm( run)? dev|yarn dev|bun run dev)\"",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command // \"\"')\n\n# Block dev servers that aren't run in tmux\necho '[Hook] BLOCKED: Dev server must run in tmux for log access' >&2\necho '[Hook] Use this command instead:' >&2\necho \"[Hook] tmux new-session -d -s dev 'npm run dev'\" >&2\necho '[Hook] Then: tmux attach -t dev' >&2\nexit 1"
10
- }
11
- ],
12
- "description": "Block dev servers outside tmux - ensures you can access logs"
13
- },
14
- {
15
- "matcher": "tool == \"Bash\" && tool_input.command matches \"(npm (install|test)|pnpm (install|test)|yarn (install|test)|bun (install|test)|cargo build|make|docker|pytest|vitest|playwright)\"",
16
- "hooks": [
17
- {
18
- "type": "command",
19
- "command": "#!/bin/bash\ninput=$(cat)\nif [ -z \"$TMUX\" ]; then\n echo '[Hook] Consider running in tmux for session persistence' >&2\n echo '[Hook] tmux new -s dev | tmux attach -t dev' >&2\nfi\necho \"$input\""
20
- }
21
- ],
22
- "description": "Reminder to use tmux for long-running commands"
23
- },
24
- {
25
- "matcher": "tool == \"Bash\" && tool_input.command matches \"git push\"",
26
- "hooks": [
27
- {
28
- "type": "command",
29
- "command": "#!/bin/bash\necho '[Hook] Review changes before push...' >&2\necho '[Hook] Press Enter to continue with push or Ctrl+C to abort...' >&2\nread -r"
30
- }
31
- ],
32
- "description": "Pause before git push to review changes"
33
- },
34
- {
35
- "matcher": "tool == \"Write\" && tool_input.file_path matches \"\\\\.(md|txt)$\" && !(tool_input.file_path matches \"README\\\\.md|AGENTS\\\\.md|SKILL\\\\.md\")",
36
- "hooks": [
37
- {
38
- "type": "command",
39
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [[ \"$file_path\" =~ \\.(md|txt)$ ]] && [[ ! \"$file_path\" =~ (README|AGENTS|SKILL)\\.md$ ]]; then\n echo \"[Hook] BLOCKED: Unnecessary documentation file creation\" >&2\n echo \"[Hook] File: $file_path\" >&2\n echo \"[Hook] Use README.md or AGENTS.md for documentation instead\" >&2\n exit 1\nfi\n\necho \"$input\""
40
- }
41
- ],
42
- "description": "Block creation of random .md files - keeps docs consolidated"
43
- },
44
- {
45
- "matcher": "tool == \"Edit\" || tool == \"Write\"",
46
- "hooks": [
47
- {
48
- "type": "command",
49
- "command": "#!/bin/bash\nCOUNTER_FILE=\"/tmp/codex-tool-count-$$\"\nTHRESHOLD=${COMPACT_THRESHOLD:-50}\nif [ -f \"$COUNTER_FILE\" ]; then COUNT=$(cat \"$COUNTER_FILE\"); COUNT=$((COUNT + 1)); else COUNT=1; fi\necho \"$COUNT\" > \"$COUNTER_FILE\"\nif [ \"$COUNT\" -eq \"$THRESHOLD\" ]; then echo '[StrategicCompact] Reached '$THRESHOLD' tool calls' >&2; echo '[StrategicCompact] Consider /compact if at a logical breakpoint' >&2; fi\nif [ \"$COUNT\" -gt \"$THRESHOLD\" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then echo \"[StrategicCompact] $COUNT tool calls - /compact reminder\" >&2; fi\ncat"
50
- }
51
- ],
52
- "description": "Suggest manual compaction at logical intervals"
53
- },
54
- {
55
- "matcher": "tool == \"Task\"",
56
- "hooks": [
57
- {
58
- "type": "command",
59
- "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
60
- }
61
- ],
62
- "description": "HUD statusline - show subagent_type, model, and description on Task spawn"
63
- }
64
- ],
65
- "PostToolUse": [
66
- {
67
- "matcher": "tool == \"Bash\"",
68
- "hooks": [
69
- {
70
- "type": "command",
71
- "command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command')\n\nif echo \"$cmd\" | grep -qE 'gh pr create'; then\n output=$(echo \"$input\" | jq -r '.tool_output.output // \"\"')\n pr_url=$(echo \"$output\" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+')\n \n if [ -n \"$pr_url\" ]; then\n echo \"[Hook] PR created: $pr_url\" >&2\n echo \"[Hook] Checking GitHub Actions status...\" >&2\n repo=$(echo \"$pr_url\" | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/[0-9]+|\\1|')\n pr_num=$(echo \"$pr_url\" | sed -E 's|.*/pull/([0-9]+)|\\1|')\n echo \"[Hook] To review PR: gh pr review $pr_num --repo $repo\" >&2\n fi\nfi\n\necho \"$input\""
72
- }
73
- ],
74
- "description": "Log PR URL and provide review command after PR creation"
75
- },
76
- {
77
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
78
- "hooks": [
79
- {
80
- "type": "command",
81
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v prettier >/dev/null 2>&1; then\n prettier --write \"$file_path\" 2>&1 | head -5 >&2\n fi\nfi\n\necho \"$input\""
82
- }
83
- ],
84
- "description": "Auto-format JS/TS files with Prettier after edits"
85
- },
86
- {
87
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx)$\"",
88
- "hooks": [
89
- {
90
- "type": "command",
91
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/package.json\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/tsconfig.json\" ]; then\n cd \"$project_root\" && npx tsc --noEmit --pretty false 2>&1 | grep \"$file_path\" | head -10 >&2 || true\n fi\nfi\n\necho \"$input\""
92
- }
93
- ],
94
- "description": "TypeScript check after editing .ts/.tsx files"
95
- },
96
- {
97
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
98
- "hooks": [
99
- {
100
- "type": "command",
101
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n console_logs=$(grep -n \"console\\\\.log\" \"$file_path\" 2>/dev/null || true)\n \n if [ -n \"$console_logs\" ]; then\n echo \"[Hook] WARNING: console.log found in $file_path\" >&2\n echo \"$console_logs\" | head -5 >&2\n echo \"[Hook] Remove console.log before committing\" >&2\n fi\nfi\n\necho \"$input\""
102
- }
103
- ],
104
- "description": "Warn about console.log statements after edits"
105
- },
106
- {
107
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(go)$\"",
108
- "hooks": [
109
- {
110
- "type": "command",
111
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v gofmt >/dev/null 2>&1; then\n gofmt -w \"$file_path\" 2>&1 >&2\n fi\nfi\n\necho \"$input\""
112
- }
113
- ],
114
- "description": "Auto-format Go files with gofmt after edits"
115
- },
116
- {
117
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
118
- "hooks": [
119
- {
120
- "type": "command",
121
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Format with ruff\n if command -v ruff >/dev/null 2>&1; then\n ruff format --quiet \"$file_path\" 2>&1 >&2\n ruff check --fix --quiet \"$file_path\" 2>&1 >&2 || true\n echo \"[Hook] Python formatted with ruff\" >&2\n fi\nfi\n\necho \"$input\""
122
- }
123
- ],
124
- "description": "Auto-format and lint Python files with ruff after edits"
125
- },
126
- {
127
- "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
128
- "hooks": [
129
- {
130
- "type": "command",
131
- "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Type check with ty\n if command -v ty >/dev/null 2>&1; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/pyproject.toml\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/pyproject.toml\" ]; then\n cd \"$project_root\" && ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n else\n ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n fi\n fi\nfi\n\necho \"$input\""
132
- }
133
- ],
134
- "description": "Type check Python files with ty after edits"
135
- }
136
- ],
137
- "Stop": [
138
- {
139
- "matcher": "*",
140
- "hooks": [
141
- {
142
- "type": "command",
143
- "command": "#!/bin/bash\ninput=$(cat)\n\nif git rev-parse --git-dir > /dev/null 2>&1; then\n modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\\.(ts|tsx|js|jsx)$' || true)\n \n if [ -n \"$modified_files\" ]; then\n has_console=false\n while IFS= read -r file; do\n if [ -f \"$file\" ]; then\n if grep -q \"console\\.log\" \"$file\" 2>/dev/null; then\n echo \"[Hook] WARNING: console.log found in $file\" >&2\n has_console=true\n fi\n fi\n done <<< \"$modified_files\"\n \n if [ \"$has_console\" = true ]; then\n echo \"[Hook] Remove console.log statements before committing\" >&2\n fi\n fi\nfi\n\necho \"$input\""
144
- }
145
- ],
146
- "description": "Final audit for console.log in modified files before session ends"
147
- }
148
- ]
149
- }
150
- }
@@ -1,100 +0,0 @@
1
- #!/bin/bash
2
- # Codex Hooks & Contexts Installer
3
- # Source: https://github.com/affaan-m/everything-claude-code
4
- # Hook installation script
5
-
6
- set -e
7
-
8
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
- CODEX_HOME="${HOME}/.codex"
10
- SETTINGS_FILE="${CODEX_HOME}/settings.json"
11
-
12
- echo "┌─────────────────────────────────────────────┐"
13
- echo "│ Codex Hooks & Contexts Installer │"
14
- echo "└─────────────────────────────────────────────┘"
15
- echo ""
16
-
17
- # Create directories
18
- echo "[1/5] Creating directories..."
19
- mkdir -p "${CODEX_HOME}/hooks/memory-persistence"
20
- mkdir -p "${CODEX_HOME}/hooks/strategic-compact"
21
- mkdir -p "${CODEX_HOME}/sessions"
22
- mkdir -p "${CODEX_HOME}/skills/learned"
23
- mkdir -p "${CODEX_HOME}/contexts"
24
- echo " ✓ Directories created"
25
-
26
- # Copy scripts
27
- echo "[2/5] Copying hook scripts..."
28
- cp "${SCRIPT_DIR}/hooks/memory-persistence/"*.sh "${CODEX_HOME}/hooks/memory-persistence/"
29
- cp "${SCRIPT_DIR}/hooks/strategic-compact/"*.sh "${CODEX_HOME}/hooks/strategic-compact/"
30
- echo " ✓ Scripts copied"
31
-
32
- # Copy contexts
33
- echo "[3/5] Copying context files..."
34
- cp "${SCRIPT_DIR}/contexts/"*.md "${CODEX_HOME}/contexts/"
35
- echo " ✓ Contexts copied"
36
-
37
- # Set permissions
38
- echo "[4/5] Setting execute permissions..."
39
- chmod +x "${CODEX_HOME}/hooks/memory-persistence/"*.sh
40
- chmod +x "${CODEX_HOME}/hooks/strategic-compact/"*.sh
41
- echo " ✓ Permissions set"
42
-
43
- # Handle settings.json
44
- echo "[5/5] Configuring settings.json..."
45
-
46
- if [ -f "$SETTINGS_FILE" ]; then
47
- # Backup existing settings
48
- BACKUP_FILE="${SETTINGS_FILE}.backup.$(date +%Y%m%d_%H%M%S)"
49
- cp "$SETTINGS_FILE" "$BACKUP_FILE"
50
- echo " ✓ Backed up existing settings to: $BACKUP_FILE"
51
-
52
- # Check if jq is available for merging
53
- if command -v jq &> /dev/null; then
54
- # Merge hooks into existing settings
55
- HOOKS_JSON="${SCRIPT_DIR}/hooks/hooks.json"
56
- TEMP_FILE=$(mktemp)
57
-
58
- # Extract hooks from hooks.json and merge with existing settings
59
- jq -s '.[0] * .[1]' "$SETTINGS_FILE" "$HOOKS_JSON" > "$TEMP_FILE"
60
- mv "$TEMP_FILE" "$SETTINGS_FILE"
61
- echo " ✓ Merged hooks into settings.json"
62
- else
63
- echo " ⚠ jq not found. Please manually merge hooks."
64
- echo " Copy content from: ${SCRIPT_DIR}/hooks/hooks.json"
65
- echo " Into: ${SETTINGS_FILE}"
66
- fi
67
- else
68
- # Create new settings.json from hooks.json
69
- cp "${SCRIPT_DIR}/hooks/hooks.json" "$SETTINGS_FILE"
70
- echo " ✓ Created new settings.json"
71
- fi
72
-
73
- echo ""
74
- echo "┌─────────────────────────────────────────────┐"
75
- echo "│ Installation Complete! │"
76
- echo "└─────────────────────────────────────────────┘"
77
- echo ""
78
- echo "Installed to: ${CODEX_HOME}/"
79
- echo ""
80
- echo "Structure:"
81
- echo " ~/.codex/"
82
- echo " ├── settings.json (hooks config)"
83
- echo " ├── hooks/"
84
- echo " │ ├── memory-persistence/"
85
- echo " │ │ ├── pre-compact.sh"
86
- echo " │ │ ├── session-start.sh"
87
- echo " │ │ └── session-end.sh"
88
- echo " │ └── strategic-compact/"
89
- echo " │ └── suggest-compact.sh"
90
- echo " ├── contexts/"
91
- echo " │ ├── dev.md"
92
- echo " │ ├── review.md"
93
- echo " │ └── research.md"
94
- echo " ├── sessions/ (auto-created logs)"
95
- echo " └── skills/learned/ (for future use)"
96
- echo ""
97
- echo "Next steps:"
98
- echo " 1. Restart Codex to activate hooks"
99
- echo " 2. Use contexts by referencing them in prompts"
100
- echo ""
@@ -1,29 +0,0 @@
1
- # [MAY] Optimization Guide
2
-
3
- > **Priority**: MAY | **ID**: R005
4
-
5
- ## Efficiency
6
-
7
- | Strategy | When | Example |
8
- |----------|------|---------|
9
- | Parallel | 3+ independent I/O tasks | Read multiple files simultaneously |
10
- | Caching | Same data accessed repeatedly | Cache file contents, reuse search results |
11
- | Lazy Loading | Large datasets, partial use | Read only needed files, stream results |
12
-
13
- ## Token Optimization
14
-
15
- - Include only necessary info, remove duplicates, use summaries
16
- - Concise expressions, minimize code blocks, no unnecessary repetition
17
-
18
- ## Task Optimization
19
-
20
- - **Batch**: Group similar tasks (edit 10 files at once)
21
- - **Incremental**: Process only changed parts
22
-
23
- ## When to Optimize
24
-
25
- | Do | Don't |
26
- |----|-------|
27
- | Repetitive tasks, clear bottleneck, measurable gain | One-time tasks, already fast, complexity > benefit |
28
-
29
- Readability > Optimization. No optimization without measurement.
@@ -1,57 +0,0 @@
1
- # [MUST] Agent Design Rules
2
-
3
- > **Priority**: MUST | **ID**: R006
4
-
5
- ## Agent File Format
6
-
7
- Location: `.codex/agents/{name}.md` (single file, kebab-case)
8
-
9
- ### Required Frontmatter
10
-
11
- ```yaml
12
- name: agent-name # Unique identifier (kebab-case)
13
- description: Brief desc # One-line summary
14
- model: balanced # balanced | reasoning | fast
15
- tools: [Read, Write, ...] # Allowed tools
16
- ```
17
-
18
- ### Optional Frontmatter
19
-
20
- ```yaml
21
- memory: project # user | project | local
22
- effort: high # low | medium | high
23
- skills: [skill-1, ...] # Skill name references
24
- source: # For external agents
25
- type: external
26
- origin: github | npm
27
- url: https://...
28
- version: 1.0.0
29
- ```
30
-
31
- ## Memory Scopes
32
-
33
- | Scope | Location | Git Tracked |
34
- |-------|----------|-------------|
35
- | `user` | `~/.codex/agent-memory/<name>/` | No |
36
- | `project` | `.codex/agent-memory/<name>/` | Yes |
37
- | `local` | `.codex/agent-memory-local/<name>/` | No |
38
-
39
- When enabled: first 200 lines of MEMORY.md loaded into system prompt.
40
-
41
- ## Separation of Concerns
42
-
43
- | Location | Purpose | Contains |
44
- |----------|---------|----------|
45
- | `.codex/agents/` | WHAT the agent does | Role, capabilities, workflow |
46
- | `.codex/skills/` | HOW to do tasks | Instructions, scripts, rules |
47
- | `guides/` | Reference docs | Best practices, tutorials |
48
-
49
- Agent body: purpose, capabilities overview, workflow. NOT detailed instructions or reference docs.
50
-
51
- ## Naming
52
-
53
- | Type | Pattern | Example |
54
- |------|---------|---------|
55
- | Agent file | `kebab-case.md` | `fe-vercel-agent.md` |
56
- | Skill dir | `kebab-case/` | `react-best-practices/` |
57
- | Skill file | UPPERCASE | `SKILL.md` |
@@ -1,29 +0,0 @@
1
- # [MUST] Agent Identification Rules
2
-
3
- > **Priority**: MUST - ENFORCED | **ID**: R007
4
-
5
- ## Core Rule
6
-
7
- Every response MUST start with agent identification:
8
-
9
- ```
10
- ┌─ Agent: {agent-name} ({agent-type})
11
- ├─ Skill: {skill-name} (if applicable)
12
- └─ Task: {brief-task-description}
13
- ```
14
-
15
- Default (no specific agent): `┌─ Agent: codex (default)`
16
-
17
- ## Simplified Format
18
-
19
- For brief responses: `[mgr-creator] Creating agent structure...`
20
- With skill: `[fe-vercel-agent → react-best-practices] Analyzing...`
21
-
22
- ## When to Display
23
-
24
- | Situation | Display |
25
- |-----------|---------|
26
- | Agent-specific task | Full header |
27
- | Using skill | Include skill name |
28
- | General conversation | "codex (default)" |
29
- | Long tasks | Show progress with agent context |
@@ -1,25 +0,0 @@
1
- # [MUST] Continuous Improvement Rules
2
-
3
- > **Priority**: MUST | **ID**: R015 | **Trigger**: User points out rule violation
4
-
5
- ## Core Rule
6
-
7
- When user points out a violation: STOP → UPDATE the relevant rule → COMMIT → THEN continue original task.
8
-
9
- Do NOT just apologize. ACTUALLY UPDATE THE RULES.
10
-
11
- ## Workflow
12
-
13
- 1. Acknowledge violation
14
- 2. Identify root cause (which rule was weak/unclear?)
15
- 3. Update the rule (add clarity, examples, self-checks)
16
- 4. Commit the change
17
- 5. Continue original task following updated rules
18
-
19
- ## Integration
20
-
21
- | Situation | Action |
22
- |-----------|--------|
23
- | User points out violation | STOP → Update rule → Continue |
24
- | Self-detected violation | Fix immediately, consider rule update |
25
- | Ambiguous situation | Ask user, then update if needed |
@@ -1,42 +0,0 @@
1
- # [MUST] Intent Transparency Rules
2
-
3
- > **Priority**: MUST | **ID**: R014
4
-
5
- ## Core Rule
6
-
7
- Display reasoning when routing to agents. Users must always know which agent was selected, why, and how to override.
8
-
9
- ## Display Format
10
-
11
- ```
12
- [Intent Detected]
13
- ├── Input: "{user input}"
14
- ├── Agent: {detected-agent}
15
- ├── Confidence: {percentage}%
16
- └── Reason: {explanation}
17
- ```
18
-
19
- ## Confidence Thresholds
20
-
21
- | Confidence | Action |
22
- |------------|--------|
23
- | >= 90% | Auto-execute with display |
24
- | 70-89% | Request confirmation, show alternatives |
25
- | < 70% | List options for user to choose |
26
-
27
- ## Detection Factors
28
-
29
- | Factor | Weight | Examples |
30
- |--------|--------|---------|
31
- | Keywords | 40% | "Go", "Python", "리뷰" |
32
- | File patterns | 30% | "*.go", "main.py" |
33
- | Action verbs | 20% | "review", "create", "fix" |
34
- | Context | 10% | Previous agent, working directory |
35
-
36
- ## Override
37
-
38
- Users can specify agent directly with `@{agent-name} {command}`. Override bypasses detection.
39
-
40
- ## Agent Triggers
41
-
42
- Defined in `.codex/skills/intent-detection/patterns/agent-triggers.yaml`. Each agent has keywords, file patterns, actions, and base confidence.
@@ -1,27 +0,0 @@
1
- # [MUST] Language & Delegation Policy
2
-
3
- > **Priority**: MUST | **ID**: R000
4
-
5
- ## Output Language
6
-
7
- | Context | Language |
8
- |---------|----------|
9
- | User communication | Korean |
10
- | Code, file contents, commits | English |
11
- | Error messages to user | Korean |
12
-
13
- ## Delegation Model
14
-
15
- User delegates ALL file operations to AI agent. User does NOT directly edit files.
16
-
17
- ```
18
- User -> (Korean prompt) -> Agent -> (file operations in English)
19
- ```
20
-
21
- ## File Naming
22
-
23
- | Type | Convention | Example |
24
- |------|------------|---------|
25
- | Rules | `{PRIORITY}-{name}.md` | `MUST-safety.md` |
26
- | Agents | `{name}.md` (kebab-case) | `lang-golang-expert.md` |
27
- | Skills | `SKILL.md` | - |
@@ -1,128 +0,0 @@
1
- # [MUST] Orchestrator Coordination Rules
2
-
3
- > **Priority**: MUST - ENFORCED | **ID**: R010
4
-
5
- ## Core Rule
6
-
7
- The main conversation is the **sole orchestrator**. It uses routing skills to delegate tasks to subagents via the Task tool. Subagents CANNOT spawn other subagents.
8
-
9
- ## Architecture
10
-
11
- ```
12
- Main Conversation (orchestrator)
13
- ├─ secretary-routing → mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, sys-memory-keeper
14
- ├─ dev-lead-routing → lang-*/be-*/fe-* experts
15
- └─ qa-lead-routing → qa-planner, qa-writer, qa-engineer
16
-
17
- Task tool spawns subagents (flat, no hierarchy)
18
- ```
19
-
20
- ## Session Continuity
21
-
22
- After restart/compaction: re-read AGENTS.md, all delegation rules still apply. Never write code directly from orchestrator.
23
-
24
- ## Delegation Rules
25
-
26
- | Task Type | Required Agent |
27
- |-----------|---------------|
28
- | Create agent | mgr-creator |
29
- | Update external | mgr-updater |
30
- | Audit dependencies | mgr-supplier |
31
- | Git operations | mgr-gitnerd |
32
- | Memory operations | sys-memory-keeper |
33
- | Python/FastAPI | lang-python-expert / be-fastapi-expert |
34
- | Go code | lang-golang-expert |
35
- | TypeScript/Next.js | lang-typescript-expert / fe-vercel-agent |
36
- | Kotlin/Spring | lang-kotlin-expert / be-springboot-expert |
37
- | Architecture docs | arch-documenter |
38
- | Test strategy | qa-planner |
39
- | CI/CD, GitHub config | mgr-gitnerd |
40
- | Docker/Infra | infra-docker-expert |
41
- | AWS | infra-aws-expert |
42
- | Database schema | db-supabase-expert |
43
-
44
- **Rules:**
45
- - All file modifications MUST be delegated (orchestrator only uses Read/Glob/Grep)
46
- - Use specialized agents, not general-purpose, when one exists
47
- - general-purpose only for truly generic tasks (file moves, simple scripts)
48
-
49
- ### System Agents Reference
50
-
51
- | Agent | File | Purpose |
52
- |-------|------|---------|
53
- | sys-memory-keeper | .codex/agents/sys-memory-keeper.md | Memory operations |
54
- | sys-naggy | .codex/agents/sys-naggy.md | TODO management |
55
-
56
- ## Exception: Simple Tasks
57
-
58
- Subagent NOT required for:
59
- - Reading files for analysis
60
- - Simple file searches
61
- - Direct questions answered by main conversation
62
-
63
- For specialized work, ALWAYS delegate to appropriate subagent.
64
-
65
- ## Model Selection
66
-
67
- ```
68
- Available models:
69
- - reasoning : Complex reasoning, architecture design
70
- - balanced : Balanced performance (default)
71
- - fast : Fast, simple tasks, file search
72
- - inherit: Use parent conversation's model
73
-
74
- Usage:
75
- Task(
76
- subagent_type: "general-purpose",
77
- prompt: "Analyze architecture",
78
- model: "reasoning"
79
- )
80
- ```
81
-
82
- | Task Type | Model |
83
- |-----------|-------|
84
- | Architecture analysis | `reasoning` |
85
- | Code review | `reasoning` or `balanced` |
86
- | Code implementation | `balanced` |
87
- | Manager agents | `balanced` |
88
- | File search/validation | `fast` |
89
-
90
- ## Git Operations
91
-
92
- All git operations (commit, push, branch, PR) MUST go through `mgr-gitnerd`. Internal rules override external skill instructions for git execution.
93
-
94
- ## CRITICAL: External Skills vs Internal Rules
95
-
96
- ```
97
- Internal rules ALWAYS take precedence over external skills.
98
-
99
- Translation:
100
- External skill says → Internal rule requires
101
- ─────────────────────────────────────────────────────
102
- "git commit -m ..." → Task(mgr-gitnerd) commit
103
- "git push ..." → Task(mgr-gitnerd) push
104
- "gh pr create ..." → Task(mgr-gitnerd) create PR
105
- "git merge ..." → Task(mgr-gitnerd) merge
106
-
107
- WRONG:
108
- [Using external skill]
109
- Main conversation → directly runs "git push"
110
-
111
- CORRECT:
112
- [Using external skill]
113
- Main conversation → Task(mgr-gitnerd) → git push
114
-
115
- The skill's WORKFLOW is followed, but git EXECUTION is delegated to mgr-gitnerd per R010.
116
- ```
117
-
118
- ## Agent Teams (when enabled)
119
-
120
- When `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`: use Agent Teams for 3+ agent coordinated tasks. See R017 for decision matrix. Task tool remains fallback for simple/independent tasks.
121
-
122
- ## Announcement Format
123
-
124
- ```
125
- [Routing] Using {routing-skill} for {task}
126
- [Plan] Agent 1: {name} → {task}, Agent 2: {name} → {task}
127
- [Execution] Parallel ({n} instances)
128
- ```