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,97 +0,0 @@
1
- # [MUST] Parallel Execution Rules
2
-
3
- > **Priority**: MUST - ENFORCED | **ID**: R009
4
-
5
- ## Core Rule
6
-
7
- **2+ independent tasks MUST execute in parallel.** Sequential execution of parallelizable tasks is a rule violation.
8
-
9
- ## Detection Criteria
10
-
11
- Independent (MUST parallelize):
12
- - No shared mutable state between tasks
13
- - No sequential dependencies
14
- - Each completes independently
15
-
16
- Examples: creating multiple agents, reviewing multiple files, batch operations on different resources.
17
-
18
- ## Self-Check
19
-
20
- Before writing/editing multiple files:
21
- 1. Are files independent? → YES: spawn parallel Task agents
22
- 2. Using Write/Edit sequentially for 2+ files? → STOP, parallelize
23
- 3. Specialized agent available? → Use it (not general-purpose)
24
-
25
- ### Common Violations to Avoid
26
-
27
- ```
28
- ❌ WRONG: Writing files one by one
29
- Write(file1.kt) → Write(file2.kt) → Write(file3.kt) → Write(file4.kt)
30
-
31
- ✓ CORRECT: Spawn parallel agents
32
- Task(agent1 → file1.kt) ┐
33
- Task(agent2 → file2.kt) ├─ All in single message
34
- Task(agent3 → file3.kt) │
35
- Task(agent4 → file4.kt) ┘
36
-
37
- ❌ WRONG: Project scaffolding sequentially
38
- Write(package.json) → Write(tsconfig.json) → Write(src/index.ts) → ...
39
-
40
- ✓ CORRECT: Parallel scaffolding
41
- Task(agent1 → "Create package.json, tsconfig.json") ┐
42
- Task(agent2 → "Create src/cli.ts, src/index.ts") ├─ Parallel
43
- Task(agent3 → "Create src/analyzer/*.ts") │
44
- Task(agent4 → "Create src/converter/*.ts") ┘
45
-
46
- ❌ WRONG: Secretary doing all the work
47
- Secretary writes domain/, usecase/, infrastructure/ sequentially
48
-
49
- ✓ CORRECT: Delegate to specialists
50
- Task(lang-kotlin-expert → domain layer)
51
- Task(be-springboot-expert → infrastructure layer)
52
- Task(lang-kotlin-expert → usecase layer)
53
-
54
- ❌ WRONG: Single Task delegating to multiple agents
55
- Task(dev-lead → "coordinate lang-kotlin-expert and be-springboot-expert")
56
-
57
- This creates a SEQUENTIAL bottleneck inside the Task!
58
-
59
- ✓ CORRECT: Multiple Tasks in parallel, one per agent
60
- Task(lang-kotlin-expert → usecase commands) ┐
61
- Task(lang-kotlin-expert → usecase queries) ├─ All spawned together
62
- Task(be-springboot-expert → persistence) │
63
- Task(be-springboot-expert → security) ┘
64
- ```
65
-
66
- ## Execution Rules
67
-
68
- | Rule | Detail |
69
- |------|--------|
70
- | Max instances | 4 concurrent |
71
- | Not parallelizable | Orchestrator (must stay singleton) |
72
- | Instance independence | Isolated context, no shared state |
73
- | Large tasks (>3 min) | MUST split into parallel sub-tasks |
74
-
75
- ## Task Tool Requirements
76
-
77
- - Use specific `subagent_type` (not "general-purpose" when specialist exists)
78
- - Use `model` parameter for cost optimization (fast for search, balanced for code, reasoning for reasoning)
79
- - Each independent unit = separate Task tool call in the SAME message
80
-
81
- ## Display Format
82
-
83
- ```
84
- [Instance 1] Task(mgr-creator):balanced → Create Go agent
85
- [Instance 2] Task(lang-python-expert):balanced → Review Python code
86
- [Instance 3] Task(Explore):fast → Search codebase
87
- ```
88
-
89
- Must use `Task({subagent_type}):{model}` format. Custom names not allowed.
90
-
91
- ## Result Aggregation
92
-
93
- ```
94
- [Summary] {succeeded}/{total} tasks completed
95
- ✓ agent-1: success
96
- ✗ agent-2: failed (reason)
97
- ```
@@ -1,30 +0,0 @@
1
- # [MUST] Permission Rules
2
-
3
- > **Priority**: MUST | **ID**: R002
4
-
5
- ## Tool Permission Tiers
6
-
7
- | Tier | Tools | Policy |
8
- |------|-------|--------|
9
- | 1: Always | Read, Glob, Grep | Free use |
10
- | 2: Default | Write, Edit | State changes explicitly, notify before modifying important files |
11
- | 3: Approval | Bash, WebFetch, WebSearch | Request user approval on first use |
12
- | 4: Explicit | Task | Only when user explicitly requests |
13
-
14
- ## File Access
15
-
16
- | Operation | Allowed | Prohibited |
17
- |-----------|---------|-----------|
18
- | Read | All source, configs, docs | - |
19
- | Write | Source code, new files in project | .env, .git/config, paths outside project |
20
- | Delete | Temp files created by agent | Existing files (without request), entire directories |
21
-
22
- ## Permission Request Format
23
-
24
- ```
25
- [Permission Request]
26
- Action: {action} | Required: {tool} | Reason: {why} | Risk: Low/Medium/High
27
- Approve?
28
- ```
29
-
30
- On insufficient permission: do not attempt, notify user, suggest alternative.
@@ -1,23 +0,0 @@
1
- # [MUST] Safety Rules
2
-
3
- > **Priority**: MUST | **ID**: R001
4
-
5
- ## Prohibited Actions
6
-
7
- | Category | Prohibited |
8
- |----------|-----------|
9
- | Data | Expose API keys/secrets/passwords, collect PII without consent, log auth tokens |
10
- | File System | Modify system files (/etc, /usr, /bin), delete outside project, modify .env/.git/config without approval |
11
- | Commands | `rm -rf /` or broad deletes, shutdown/restart, sudo/su, network config changes |
12
- | External | Access URLs without approval, send user data externally, download/execute unknown scripts |
13
-
14
- ## Required Before Destructive Operations
15
-
16
- Verify target, assess impact scope, check recoverability, get user approval.
17
-
18
- ## On Violation
19
-
20
- 1. Stop all operations
21
- 2. Preserve current state
22
- 3. Report: what was detected, why it's risky, what action was taken
23
- 4. Wait for instructions
@@ -1,125 +0,0 @@
1
- # [MUST] Sync Verification Rules
2
-
3
- > **Priority**: MUST - ENFORCED | **ID**: R016
4
-
5
- ## Core Rule
6
-
7
- After modifying agents, skills, or guides: run full verification before committing AND pushing. Never ask to commit/push before `mgr-sauron:watch` passes.
8
-
9
- Every `git push` requires: `mgr-sauron:watch` → all pass → `git push`
10
-
11
- ## Verification Phases
12
-
13
- ### Phase 1: Manager Verification (5 rounds)
14
-
15
- | Round | Actions |
16
- |-------|---------|
17
- | 1-2 | mgr-supplier:audit, mgr-sync-checker:check, fix issues |
18
- | 3-4 | Re-verify + mgr-updater:docs, fix remaining |
19
- | 5 | Final: all counts match, frontmatter valid, skill refs exist, memory scopes valid, routing patterns updated |
20
-
21
- Also run: mgr-claude-code-bible:verify (official spec compliance)
22
-
23
- ### Phase 2: Deep Review (3 rounds)
24
-
25
- | Round | Focus |
26
- |-------|-------|
27
- | 1 | Workflow alignment: routing skills have complete agent mappings |
28
- | 2 | References: no orphans, no circular refs, valid skill/memory refs |
29
- | 3 | Philosophy: R006 separation, R009 parallel, R010 delegation, R007/R008 identification |
30
-
31
- ### Phase 3: Fix all discovered issues
32
-
33
- ### Phase 4: Commit via mgr-gitnerd
34
-
35
- ### Phase 5: Push via mgr-gitnerd (only after sauron passes)
36
-
37
- ## Self-Check Before Commit and Push
38
-
39
- ```
40
- ╔══════════════════════════════════════════════════════════════════╗
41
- ║ BEFORE COMMITTING, ASK YOURSELF: ║
42
- ║ ║
43
- ║ 1. Did I complete all 5 rounds of manager verification? ║
44
- ║ 2. Did I complete all 3 rounds of deep review? ║
45
- ║ 3. Did I fix ALL discovered issues? ║
46
- ║ 4. Are all counts matching across all sources? ║
47
- ║ 5. Am I delegating to mgr-gitnerd for the commit? ║
48
- ║ ║
49
- ║ If NO to ANY → DO NOT COMMIT ║
50
- ╚══════════════════════════════════════════════════════════════════╝
51
-
52
- ╔══════════════════════════════════════════════════════════════════╗
53
- ║ BEFORE PUSHING, ASK YOURSELF: ║
54
- ║ ║
55
- ║ 1. Did mgr-sauron:watch complete successfully? ║
56
- ║ 2. Were ALL issues from sauron verification fixed? ║
57
- ║ 3. Am I delegating to mgr-gitnerd for the push? ║
58
- ║ ║
59
- ║ If NO to ANY → DO NOT PUSH ║
60
- ║ ║
61
- ║ SAURON VERIFICATION IS MANDATORY FOR ALL PUSHES. ║
62
- ╚══════════════════════════════════════════════════════════════════╝
63
- ```
64
-
65
- ## When Required
66
-
67
- Any change to: agents, agent frontmatter, skills, guides, routing patterns, rules.
68
-
69
- ## Quick Verification Commands
70
-
71
- ```bash
72
- # Agent count check
73
- ls .codex/agents/*.md | wc -l
74
-
75
- # Skill count check
76
- find .codex/skills -name "SKILL.md" | wc -l
77
-
78
- # Frontmatter validation (check for missing YAML headers)
79
- for f in .codex/agents/*.md; do head -1 "$f" | grep -q "^---" || echo "MISSING FRONTMATTER: $f"; done
80
-
81
- # Check for agents with invalid skill references
82
- for f in .codex/agents/*.md; do
83
- grep "^skills:" -A 10 "$f" | grep " - " | sed 's/.*- //' | while read skill; do
84
- [ -f ".codex/skills/$skill/SKILL.md" ] || echo "INVALID SKILL REF in $f: $skill"
85
- done
86
- done
87
-
88
- # Routing skill pattern coverage
89
- grep -c "agent_patterns:" .codex/skills/secretary-routing/SKILL.md
90
- grep -c "agent_patterns:" .codex/skills/dev-lead-routing/SKILL.md
91
- grep -c "agent_patterns:" .codex/skills/qa-lead-routing/SKILL.md
92
-
93
- # Memory field validation
94
- for f in .codex/agents/*.md; do
95
- mem=$(grep "^memory:" "$f" | awk '{print $2}')
96
- if [ -n "$mem" ] && [ "$mem" != "project" ] && [ "$mem" != "user" ] && [ "$mem" != "local" ]; then
97
- echo "INVALID MEMORY SCOPE in $f: $mem"
98
- fi
99
- done
100
-
101
- # Hook count check
102
- ls .codex/hooks/*.json 2>/dev/null | wc -l
103
-
104
- # Context count check
105
- ls .codex/contexts/*.md 2>/dev/null | wc -l
106
-
107
- # Guide count check
108
- find guides -mindepth 1 -maxdepth 1 -type d | wc -l
109
-
110
- # Agent name accuracy (compare AGENTS.md table with actual files)
111
- # Extract agent names from files
112
- ls .codex/agents/*.md | xargs -I{} basename {} .md | sort > /tmp/actual-agents.txt
113
-
114
- # Slash command skill existence
115
- for cmd in $(grep "^| \`/" AGENTS.md | sed 's/.*`\///' | sed 's/`.*//' | sed 's/ .*//')
116
- do
117
- [ -d ".codex/skills/$cmd" ] || echo "MISSING SKILL: $cmd"
118
- done
119
-
120
- # Routing skill completeness check
121
- ls -d .codex/skills/*-routing 2>/dev/null | xargs -I{} basename {} | sort
122
-
123
- # Verify routing skill names in AGENTS.md
124
- grep -oP '(secretary|dev-lead|de-lead|qa-lead)-routing' AGENTS.md | sort -u
125
- ```
@@ -1,82 +0,0 @@
1
- # [MUST] Tool Usage Identification Rules
2
-
3
- > **Priority**: MUST - ENFORCED | **ID**: R008
4
-
5
- ## Core Rule
6
-
7
- Every tool call MUST be prefixed with agent and model identification:
8
-
9
- ```
10
- [agent-name][model] → Tool: <tool-name>
11
- [agent-name][model] → Target: <file/path/url>
12
- ```
13
-
14
- For parallel calls: list ALL identifications BEFORE the tool calls.
15
-
16
- ### Common Violations to Avoid
17
-
18
- ```
19
- ❌ WRONG: Calling tools without identification
20
- "먼저 JD 내용을 확인하겠습니다."
21
- <tool_call>WebFetch(...)</tool_call>
22
-
23
- ❌ WRONG: Missing model in identification
24
- [secretary] → Tool: WebFetch
25
- [secretary] → Fetching: https://example.com/jd.md
26
-
27
- ✓ CORRECT: Always identify with agent AND model
28
- "먼저 JD 내용을 확인하겠습니다."
29
- [secretary][reasoning] → Tool: WebFetch
30
- [secretary][reasoning] → Fetching: https://example.com/jd.md
31
- <tool_call>WebFetch(...)</tool_call>
32
-
33
- ❌ WRONG: Parallel calls without listing all identifications
34
- <tool_call>WebFetch(url1)</tool_call>
35
- <tool_call>WebFetch(url2)</tool_call>
36
- <tool_call>Bash(cmd)</tool_call>
37
-
38
- ✓ CORRECT: List all identifications with models, then call
39
- [secretary][reasoning] → Tool: WebFetch
40
- [secretary][reasoning] → Fetching: url1
41
- [secretary][reasoning] → Tool: WebFetch
42
- [secretary][reasoning] → Fetching: url2
43
- [secretary][reasoning] → Tool: Bash
44
- [secretary][reasoning] → Running: cmd
45
- <tool_call>WebFetch(url1)</tool_call>
46
- <tool_call>WebFetch(url2)</tool_call>
47
- <tool_call>Bash(cmd)</tool_call>
48
- ```
49
-
50
- ## Models
51
-
52
- | Model | Use |
53
- |-------|-----|
54
- | `reasoning` | Complex reasoning, architecture |
55
- | `balanced` | General tasks, code generation (default) |
56
- | `fast` | Fast simple tasks, file search |
57
-
58
- ## Tool Categories
59
-
60
- | Category | Tools | Verb |
61
- |----------|-------|------|
62
- | File Read | Read, Glob, Grep | Reading / Searching |
63
- | File Write | Write, Edit | Writing / Editing |
64
- | Network | WebFetch | Fetching |
65
- | Execution | Bash, Task | Running / Spawning |
66
-
67
- ## Task Tool Format
68
-
69
- ```
70
- Task(subagent_type):model → description
71
- ```
72
-
73
- `subagent_type` MUST match actual Task tool parameter. Custom names not allowed.
74
-
75
- ## Example
76
-
77
- ```
78
- [mgr-creator][balanced] → Write: .codex/agents/new-agent.md
79
- [secretary][reasoning] → Spawning:
80
- [1] Task(lang-golang-expert):balanced → Go code review
81
- [2] Task(lang-python-expert):balanced → Python code review
82
- ```
@@ -1,39 +0,0 @@
1
- # [SHOULD] Agent Teams Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R017 | **Condition**: Agent Teams enabled locally
4
-
5
- ## Detection
6
-
7
- Available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present.
8
-
9
- ## Decision Matrix
10
-
11
- | Scenario | Preferred |
12
- |----------|-----------|
13
- | Simple independent subtasks | Task Tool |
14
- | Multi-step with shared state | Agent Teams |
15
- | Research requiring discussion | Agent Teams |
16
- | Cost-sensitive batch ops | Task Tool |
17
- | Complex debugging across modules | Agent Teams |
18
- | Code review + fix cycle | Agent Teams |
19
- | Single file operations | Task Tool |
20
-
21
- **Self-check before Task tool:** Is Agent Teams available? Does task need 3+ agents, shared state, or inter-agent communication? If yes, use Agent Teams.
22
-
23
- ## Team Patterns
24
-
25
- - **Research**: researcher-1 + researcher-2 + synthesizer
26
- - **Development**: implementer + reviewer + tester
27
- - **Debug**: investigator-1 + investigator-2 + fixer
28
-
29
- ## Lifecycle
30
-
31
- TeamCreate → TaskCreate → Task(spawn) → SendMessage(coordinate) → TaskUpdate → shutdown → cleanup
32
-
33
- ## Fallback
34
-
35
- When Agent Teams unavailable: use Task tool with R009/R010 rules. Both approaches produce results; Agent Teams adds coordination richness.
36
-
37
- ## Cost
38
-
39
- Agent Teams uses more tokens (full context per member + message passing). Use Task tool if task < 3 min or no inter-agent communication needed.
@@ -1,37 +0,0 @@
1
- # [SHOULD] Ecomode Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R013
4
-
5
- ## Activation
6
-
7
- Auto-activates when: 4+ parallel tasks, batch operations, 80%+ context usage, or explicit "ecomode on".
8
-
9
- ## Behaviors
10
-
11
- **Compact Output**: Agents return `status + summary (1-2 sentences) + key_data only`. Skip intermediate steps, verbose explanations, repeated context, full file contents.
12
-
13
- **Aggregation Format**:
14
- ```
15
- [Batch Complete] {n}/{total}
16
- ├── {agent}: ✓/✗/⚠ {summary}
17
- ```
18
-
19
- **Compression**: File lists -> count only (unless < 5), error traces -> first/last 3 lines, code -> path:line ref only.
20
-
21
- ## Config
22
-
23
- ```yaml
24
- ecomode:
25
- threshold: 4
26
- result_format: summary
27
- max_result_length: 200
28
- ```
29
-
30
- ## Example
31
-
32
- Normal: Full agent header + step-by-step analysis + detailed results.
33
- Ecomode: `[lang-golang-expert] ✓ src/main.go reviewed: 1 naming issue (handle_error -> handleError)`
34
-
35
- ## Override
36
-
37
- Disable with: "ecomode off", "verbose mode", or "show full details".
@@ -1,33 +0,0 @@
1
- # [SHOULD] Error Handling Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R004
4
-
5
- ## Error Classification
6
-
7
- | Level | Symptom | Response |
8
- |-------|---------|----------|
9
- | Warning | Task completes but needs attention | Output warning, continue |
10
- | Error | Current task fails, others possible | Stop task, report cause, suggest alternative |
11
- | Critical | Cannot proceed at all | Stop all, preserve state, report immediately |
12
-
13
- ## Error Report Format
14
-
15
- ```
16
- [Error] {type} — Location: {file:line} — Cause: {cause} — Impact: {effect}
17
- Attempted: 1. {try1} -> Failed 2. {try2} -> Failed
18
- Recommended: {action1}, {action2}
19
- ```
20
-
21
- ## Recovery
22
-
23
- | Type | Strategy |
24
- |------|----------|
25
- | Retryable | Retry up to 3x with backoff (1s, 2s, 4s), then report |
26
- | Non-recoverable | Save state, rollback if possible, detailed report, wait for user |
27
-
28
- ## Validation
29
-
30
- | When | Checks |
31
- |------|--------|
32
- | Before action | Target exists, permissions available, dependencies met |
33
- | After action | Expected = actual, file integrity, no side effects |
@@ -1,32 +0,0 @@
1
- # [SHOULD] HUD Statusline Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R012
4
-
5
- ## Format
6
-
7
- ```
8
- ─── [Agent] {name} | [Progress] {n}/{total} | [Parallel] {count} ───
9
- ```
10
-
11
- ## When to Display
12
-
13
- Multi-step tasks, parallel execution, long-running operations. Skip for single brief operations.
14
-
15
- ## Hook Implementation
16
-
17
- Implemented in `.codex/hooks/hooks.json` (PreToolUse → Task matcher):
18
-
19
- ```
20
- ─── [Spawn] {subagent_type}:{model} | {description} ───
21
- ─── [Resume] {subagent_type}:{model} | {description} ───
22
- ```
23
-
24
- ## Display with Parallel
25
-
26
- ```
27
- ─── [Agent] secretary | [Parallel] 4 ───
28
- [1] Task(mgr-creator):balanced → Create agent
29
- [2] Task(lang-golang-expert):fast → Code review
30
- ```
31
-
32
- Integrates with R007 (Agent ID), R008 (Tool ID), R009 (Parallel).
@@ -1,34 +0,0 @@
1
- # [SHOULD] Interaction Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R003
4
-
5
- ## Response Principles
6
-
7
- | Principle | Do | Don't |
8
- |-----------|-----|-------|
9
- | Brevity | Key info first, answer only what's asked | Over-explanation, repetitive confirmation |
10
- | Clarity | Specific expressions, executable code | Abstract descriptions, "maybe"/"probably" |
11
- | Transparency | State actions, report changes, acknowledge uncertainty | Hide actions, present guesses as facts |
12
-
13
- ## Status Format
14
-
15
- ```
16
- [Start] {task name}
17
- [Progress] {current step} ({n}/{total})
18
- [Done] {task name} — Result: {summary}
19
- [Failed] {task name} — Cause: {reason} — Alternative: {solutions}
20
- ```
21
-
22
- ## Request Handling
23
-
24
- | Type | Action |
25
- |------|--------|
26
- | Clear | Execute immediately |
27
- | Ambiguous | `[Confirm] Understood "{request}" as {interpretation}. Proceed?` |
28
- | Risky | `[Warning] This action has {risk}. Continue? Yes: {action} / No: Cancel` |
29
-
30
- ## Multiple Tasks
31
-
32
- - Dependent: Sequential
33
- - Independent: Parallel allowed
34
- - Report: `[Task 1/3] Done` / `[Task 2/3] In progress...` / `[Task 3/3] Pending`
@@ -1,39 +0,0 @@
1
- # [SHOULD] Memory Integration Rules
2
-
3
- > **Priority**: SHOULD | **ID**: R011
4
-
5
- ## Architecture
6
-
7
- **Primary**: Native auto memory (`memory` field in agent frontmatter). No external dependencies.
8
- **Supplementary**: claude-mem MCP (optional, for cross-session search and temporal queries).
9
-
10
- Rule: If native auto memory can handle it, do NOT use claude-mem.
11
-
12
- ## Native Auto Memory
13
-
14
- Agent frontmatter `memory: project|user|local` enables persistent memory:
15
- - System creates memory directory, loads first 200 lines of MEMORY.md into prompt
16
- - Read/Write/Edit tools auto-enabled for memory directory
17
-
18
- | Scope | Location | Git Tracked |
19
- |-------|----------|-------------|
20
- | `user` | `~/.codex/agent-memory/<name>/` | No |
21
- | `project` | `.codex/agent-memory/<name>/` | Yes |
22
- | `local` | `.codex/agent-memory-local/<name>/` | No |
23
-
24
- ## When to Use claude-mem
25
-
26
- | Scenario | Native | claude-mem |
27
- |----------|--------|------------|
28
- | Agent learns project patterns | Yes | |
29
- | Search across sessions | | Yes |
30
- | Temporal queries | | Yes |
31
- | Cross-agent sharing | | Yes |
32
-
33
- ## Best Practices
34
-
35
- - Consult memory before starting work
36
- - Update after discovering patterns
37
- - Keep MEMORY.md under 200 lines
38
- - Do not store sensitive data or duplicate AGENTS.md content
39
- - Memory write failures should not block main task