oh-my-customcode 0.8.0 → 0.9.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.
Files changed (132) hide show
  1. package/README.md +10 -2
  2. package/dist/cli/index.js +517 -274
  3. package/dist/index.js +303 -101
  4. package/package.json +1 -1
  5. package/templates/.codex/agents/arch-documenter.md +97 -0
  6. package/templates/.codex/agents/arch-speckit-agent.md +134 -0
  7. package/templates/.codex/agents/be-express-expert.md +80 -0
  8. package/templates/.codex/agents/be-fastapi-expert.md +43 -0
  9. package/templates/.codex/agents/be-go-backend-expert.md +43 -0
  10. package/templates/.codex/agents/be-nestjs-expert.md +60 -0
  11. package/templates/.codex/agents/be-springboot-expert.md +85 -0
  12. package/templates/.codex/agents/db-postgres-expert.md +106 -0
  13. package/templates/.codex/agents/db-redis-expert.md +101 -0
  14. package/templates/.codex/agents/db-supabase-expert.md +71 -0
  15. package/templates/.codex/agents/de-airflow-expert.md +71 -0
  16. package/templates/.codex/agents/de-dbt-expert.md +72 -0
  17. package/templates/.codex/agents/de-kafka-expert.md +81 -0
  18. package/templates/.codex/agents/de-pipeline-expert.md +92 -0
  19. package/templates/.codex/agents/de-snowflake-expert.md +89 -0
  20. package/templates/.codex/agents/de-spark-expert.md +80 -0
  21. package/templates/.codex/agents/fe-svelte-agent.md +65 -0
  22. package/templates/.codex/agents/fe-vercel-agent.md +69 -0
  23. package/templates/.codex/agents/fe-vuejs-agent.md +65 -0
  24. package/templates/.codex/agents/infra-aws-expert.md +47 -0
  25. package/templates/.codex/agents/infra-docker-expert.md +47 -0
  26. package/templates/.codex/agents/lang-golang-expert.md +43 -0
  27. package/templates/.codex/agents/lang-java21-expert.md +65 -0
  28. package/templates/.codex/agents/lang-kotlin-expert.md +43 -0
  29. package/templates/.codex/agents/lang-python-expert.md +43 -0
  30. package/templates/.codex/agents/lang-rust-expert.md +43 -0
  31. package/templates/.codex/agents/lang-typescript-expert.md +43 -0
  32. package/templates/.codex/agents/mgr-claude-code-bible.md +246 -0
  33. package/templates/.codex/agents/mgr-creator.md +120 -0
  34. package/templates/.codex/agents/mgr-gitnerd.md +113 -0
  35. package/templates/.codex/agents/mgr-sauron.md +154 -0
  36. package/templates/.codex/agents/mgr-supplier.md +120 -0
  37. package/templates/.codex/agents/mgr-sync-checker.md +99 -0
  38. package/templates/.codex/agents/mgr-updater.md +103 -0
  39. package/templates/.codex/agents/qa-engineer.md +96 -0
  40. package/templates/.codex/agents/qa-planner.md +74 -0
  41. package/templates/.codex/agents/qa-writer.md +97 -0
  42. package/templates/.codex/agents/sys-memory-keeper.md +117 -0
  43. package/templates/.codex/agents/sys-naggy.md +90 -0
  44. package/templates/.codex/agents/tool-bun-expert.md +71 -0
  45. package/templates/.codex/agents/tool-npm-expert.md +88 -0
  46. package/templates/.codex/agents/tool-optimizer.md +87 -0
  47. package/templates/.codex/codex-native-hash.txt +1 -0
  48. package/templates/.codex/contexts/dev.md +20 -0
  49. package/templates/.codex/contexts/ecomode.md +63 -0
  50. package/templates/.codex/contexts/index.yaml +41 -0
  51. package/templates/.codex/contexts/research.md +28 -0
  52. package/templates/.codex/contexts/review.md +23 -0
  53. package/templates/.codex/hooks/hooks.json +151 -0
  54. package/templates/.codex/install-hooks.sh +100 -0
  55. package/templates/.codex/rules/MAY-optimization.md +93 -0
  56. package/templates/.codex/rules/MUST-agent-design.md +162 -0
  57. package/templates/.codex/rules/MUST-agent-identification.md +108 -0
  58. package/templates/.codex/rules/MUST-continuous-improvement.md +132 -0
  59. package/templates/.codex/rules/MUST-intent-transparency.md +199 -0
  60. package/templates/.codex/rules/MUST-language-policy.md +62 -0
  61. package/templates/.codex/rules/MUST-orchestrator-coordination.md +471 -0
  62. package/templates/.codex/rules/MUST-parallel-execution.md +469 -0
  63. package/templates/.codex/rules/MUST-permissions.md +84 -0
  64. package/templates/.codex/rules/MUST-safety.md +69 -0
  65. package/templates/.codex/rules/MUST-sync-verification.md +281 -0
  66. package/templates/.codex/rules/MUST-tool-identification.md +195 -0
  67. package/templates/.codex/rules/SHOULD-agent-teams.md +183 -0
  68. package/templates/.codex/rules/SHOULD-ecomode.md +145 -0
  69. package/templates/.codex/rules/SHOULD-error-handling.md +102 -0
  70. package/templates/.codex/rules/SHOULD-hud-statusline.md +112 -0
  71. package/templates/.codex/rules/SHOULD-interaction.md +103 -0
  72. package/templates/.codex/rules/SHOULD-memory-integration.md +132 -0
  73. package/templates/.codex/rules/index.yaml +141 -0
  74. package/templates/.codex/skills/airflow-best-practices/SKILL.md +56 -0
  75. package/templates/.codex/skills/audit-agents/SKILL.md +116 -0
  76. package/templates/.codex/skills/aws-best-practices/SKILL.md +280 -0
  77. package/templates/.codex/skills/claude-code-bible/SKILL.md +180 -0
  78. package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
  79. package/templates/.codex/skills/create-agent/SKILL.md +91 -0
  80. package/templates/.codex/skills/dbt-best-practices/SKILL.md +54 -0
  81. package/templates/.codex/skills/de-lead-routing/SKILL.md +230 -0
  82. package/templates/.codex/skills/dev-lead-routing/SKILL.md +253 -0
  83. package/templates/.codex/skills/dev-refactor/SKILL.md +123 -0
  84. package/templates/.codex/skills/dev-review/SKILL.md +81 -0
  85. package/templates/.codex/skills/docker-best-practices/SKILL.md +275 -0
  86. package/templates/.codex/skills/fastapi-best-practices/SKILL.md +270 -0
  87. package/templates/.codex/skills/fix-refs/SKILL.md +107 -0
  88. package/templates/.codex/skills/go-backend-best-practices/SKILL.md +338 -0
  89. package/templates/.codex/skills/go-best-practices/CLAUDE.md +9 -0
  90. package/templates/.codex/skills/go-best-practices/SKILL.md +203 -0
  91. package/templates/.codex/skills/help/SKILL.md +125 -0
  92. package/templates/.codex/skills/intent-detection/SKILL.md +215 -0
  93. package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +349 -0
  94. package/templates/.codex/skills/kafka-best-practices/SKILL.md +52 -0
  95. package/templates/.codex/skills/kotlin-best-practices/SKILL.md +256 -0
  96. package/templates/.codex/skills/lists/SKILL.md +78 -0
  97. package/templates/.codex/skills/memory-management/SKILL.md +195 -0
  98. package/templates/.codex/skills/memory-recall/SKILL.md +152 -0
  99. package/templates/.codex/skills/memory-save/SKILL.md +126 -0
  100. package/templates/.codex/skills/monitoring-setup/SKILL.md +115 -0
  101. package/templates/.codex/skills/npm-audit/SKILL.md +72 -0
  102. package/templates/.codex/skills/npm-publish/SKILL.md +63 -0
  103. package/templates/.codex/skills/npm-version/SKILL.md +75 -0
  104. package/templates/.codex/skills/optimize-analyze/SKILL.md +55 -0
  105. package/templates/.codex/skills/optimize-bundle/SKILL.md +67 -0
  106. package/templates/.codex/skills/optimize-report/SKILL.md +74 -0
  107. package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +83 -0
  108. package/templates/.codex/skills/postgres-best-practices/SKILL.md +66 -0
  109. package/templates/.codex/skills/python-best-practices/SKILL.md +222 -0
  110. package/templates/.codex/skills/qa-lead-routing/SKILL.md +277 -0
  111. package/templates/.codex/skills/react-best-practices/SKILL.md +101 -0
  112. package/templates/.codex/skills/redis-best-practices/SKILL.md +83 -0
  113. package/templates/.codex/skills/result-aggregation/SKILL.md +164 -0
  114. package/templates/.codex/skills/rust-best-practices/SKILL.md +267 -0
  115. package/templates/.codex/skills/sauron-watch/SKILL.md +144 -0
  116. package/templates/.codex/skills/secretary-routing/SKILL.md +190 -0
  117. package/templates/.codex/skills/snowflake-best-practices/SKILL.md +65 -0
  118. package/templates/.codex/skills/spark-best-practices/SKILL.md +52 -0
  119. package/templates/.codex/skills/springboot-best-practices/SKILL.md +357 -0
  120. package/templates/.codex/skills/status/SKILL.md +153 -0
  121. package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +99 -0
  122. package/templates/.codex/skills/typescript-best-practices/SKILL.md +321 -0
  123. package/templates/.codex/skills/update-docs/SKILL.md +140 -0
  124. package/templates/.codex/skills/update-external/SKILL.md +149 -0
  125. package/templates/.codex/skills/vercel-deploy/SKILL.md +73 -0
  126. package/templates/.codex/skills/web-design-guidelines/SKILL.md +118 -0
  127. package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +64 -0
  128. package/templates/.codex/uninstall-hooks.sh +52 -0
  129. package/templates/AGENTS.md.en +39 -0
  130. package/templates/AGENTS.md.ko +39 -0
  131. package/templates/manifest.codex.json +43 -0
  132. package/templates/manifest.json +5 -5
@@ -0,0 +1,100 @@
1
+ #!/bin/bash
2
+ # Claude Code 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
+ CLAUDE_HOME="${HOME}/.codex"
10
+ SETTINGS_FILE="${CLAUDE_HOME}/settings.json"
11
+
12
+ echo "┌─────────────────────────────────────────────┐"
13
+ echo "│ Claude Code Hooks & Contexts Installer │"
14
+ echo "└─────────────────────────────────────────────┘"
15
+ echo ""
16
+
17
+ # Create directories
18
+ echo "[1/5] Creating directories..."
19
+ mkdir -p "${CLAUDE_HOME}/hooks/memory-persistence"
20
+ mkdir -p "${CLAUDE_HOME}/hooks/strategic-compact"
21
+ mkdir -p "${CLAUDE_HOME}/sessions"
22
+ mkdir -p "${CLAUDE_HOME}/skills/learned"
23
+ mkdir -p "${CLAUDE_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 "${CLAUDE_HOME}/hooks/memory-persistence/"
29
+ cp "${SCRIPT_DIR}/hooks/strategic-compact/"*.sh "${CLAUDE_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 "${CLAUDE_HOME}/contexts/"
35
+ echo " ✓ Contexts copied"
36
+
37
+ # Set permissions
38
+ echo "[4/5] Setting execute permissions..."
39
+ chmod +x "${CLAUDE_HOME}/hooks/memory-persistence/"*.sh
40
+ chmod +x "${CLAUDE_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: ${CLAUDE_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 Claude Code to activate hooks"
99
+ echo " 2. Use contexts by referencing them in prompts"
100
+ echo ""
@@ -0,0 +1,93 @@
1
+ # [MAY] Optimization Guide
2
+
3
+ > **Priority**: MAY - Optional
4
+ > **Apply when**: Basic functionality is stable
5
+
6
+ ## Efficiency Optimization
7
+
8
+ ### Parallel Processing
9
+ ```
10
+ Apply when:
11
+ - 3+ independent tasks
12
+ - Each task is I/O bound
13
+
14
+ Example:
15
+ - Read multiple files simultaneously
16
+ - Run independent searches in parallel
17
+ ```
18
+
19
+ ### Caching
20
+ ```
21
+ Apply when:
22
+ - Same data accessed repeatedly
23
+ - Data changes infrequently
24
+
25
+ Example:
26
+ - Cache file contents
27
+ - Reuse search results
28
+ ```
29
+
30
+ ### Lazy Loading
31
+ ```
32
+ Apply when:
33
+ - Large datasets
34
+ - Only portion actually used
35
+
36
+ Example:
37
+ - Read only needed files
38
+ - Stream results
39
+ ```
40
+
41
+ ## Token Optimization
42
+
43
+ ### Context Management
44
+ ```
45
+ ✓ Include only necessary info
46
+ ✓ Remove duplicates
47
+ ✓ Use summaries
48
+ ```
49
+
50
+ ### Response Optimization
51
+ ```
52
+ ✓ Concise expressions
53
+ ✓ Minimize code blocks
54
+ ✓ Remove unnecessary repetition
55
+ ```
56
+
57
+ ## Task Optimization
58
+
59
+ ### Batch Processing
60
+ ```
61
+ Group similar tasks together
62
+ Example: Edit 10 files → Process at once
63
+ ```
64
+
65
+ ### Incremental Processing
66
+ ```
67
+ Process only changed parts
68
+ Example: Full build → Incremental build
69
+ ```
70
+
71
+ ## Apply Criteria
72
+
73
+ ### Do Optimize
74
+ ```
75
+ ✓ Repetitive tasks
76
+ ✓ Clear performance bottleneck
77
+ ✓ Measurable improvement
78
+ ```
79
+
80
+ ### Don't Optimize
81
+ ```
82
+ ✗ One-time tasks
83
+ ✗ Already fast enough
84
+ ✗ Complexity increase outweighs benefit
85
+ ```
86
+
87
+ ## Caution
88
+
89
+ ```
90
+ ⚠ Premature optimization is root of evil
91
+ ⚠ Readability > Optimization
92
+ ⚠ No optimization without measurement
93
+ ```
@@ -0,0 +1,162 @@
1
+ # [MUST] Agent Design Rules
2
+
3
+ > **Priority**: MUST - Never violate
4
+ > **ID**: R006
5
+
6
+ ## Agent Structure
7
+
8
+ ### Single File Format
9
+ ```
10
+ .codex/agents/{name}.md
11
+
12
+ Format:
13
+ ---
14
+ name: agent-name
15
+ description: Brief agent description
16
+ model: sonnet | opus | haiku
17
+ memory: project # Optional
18
+ tools:
19
+ - Read
20
+ - Write
21
+ - Bash
22
+ skills:
23
+ - skill-name-1
24
+ - skill-name-2
25
+ ---
26
+
27
+ # Agent Content
28
+
29
+ Agent purpose and role description...
30
+ ```
31
+
32
+ ### Frontmatter Fields (REQUIRED)
33
+ ```yaml
34
+ name: agent-name # Unique identifier (kebab-case)
35
+ description: Brief desc # One-line summary
36
+ model: sonnet # Default model (sonnet | opus | haiku)
37
+ memory: project # Persistent memory scope (user | project | local)
38
+ effort: high # Effort level (low | medium | high)
39
+ tools: [Read, Write, ...] # Allowed tools
40
+ skills: [skill-1, ...] # Required skill names
41
+ ```
42
+
43
+ ### Memory Scope Reference
44
+ | Scope | Location | Use Case |
45
+ |-------|----------|----------|
46
+ | `user` | `~/.codex/agent-memory/<name>/` | Cross-project learnings (infra, db) |
47
+ | `project` | `.codex/agent-memory/<name>/` | Project-specific, versioned |
48
+ | `local` | `.codex/agent-memory-local/<name>/` | Project-specific, not versioned |
49
+
50
+ ### Effort Level Reference
51
+ | Level | Use Case | Agents |
52
+ |-------|----------|--------|
53
+ | `high` | Complex reasoning, design decisions | lang-*, be-*, arch-*, qa-planner |
54
+ | `medium` | Routine operations, structured work | fe-*, tool-*, mgr-gitnerd |
55
+ | `low` | Simple validation, file scanning | mgr-supplier, mgr-sync-checker, sys-naggy |
56
+
57
+ ### Agent Content Must NOT Contain
58
+ ```
59
+ ✗ Detailed skill instructions (use .codex/skills/ instead)
60
+ ✗ Reference documentation (use guides/ instead)
61
+ ✗ Implementation scripts (use .codex/skills/{name}/scripts/ instead)
62
+ ```
63
+
64
+ ### Agent Content Should Contain
65
+ ```
66
+ ✓ Agent purpose and role
67
+ ✓ Capabilities overview (not details)
68
+ ✓ Required skills (by name reference)
69
+ ✓ Workflow description
70
+ ✓ Source info (if external)
71
+ ```
72
+
73
+ ## Memory Scope (OPTIONAL)
74
+
75
+ Agents can have persistent memory that survives across conversations.
76
+
77
+ | Scope | Location | Use Case | Git Tracked |
78
+ |-------|----------|----------|-------------|
79
+ | `user` | `~/.codex/agent-memory/<name>/` | Cross-project learnings (infra, DB patterns) | No |
80
+ | `project` | `.codex/agent-memory/<name>/` | Project-specific patterns | Yes |
81
+ | `local` | `.codex/agent-memory-local/<name>/` | Local-only knowledge | No |
82
+
83
+ When enabled:
84
+ - First 200 lines of MEMORY.md loaded into agent's system prompt
85
+ - Read/Write/Edit tools automatically enabled for memory directory
86
+ - Agent builds knowledge across conversations
87
+
88
+ Agents that should NOT have memory (stateless by design):
89
+ - Manager agents for one-time operations (mgr-creator, mgr-updater, mgr-supplier)
90
+ - Validation agents (mgr-sync-checker, mgr-claude-code-bible)
91
+ - Meta-agents (sys-memory-keeper, sys-naggy)
92
+
93
+ ## External Agent Requirements
94
+
95
+ External agents (from GitHub, npm, etc.) MUST include source information in frontmatter:
96
+
97
+ ### Frontmatter Source Fields
98
+ ```yaml
99
+ source:
100
+ type: external
101
+ origin: github | npm | other
102
+ url: https://github.com/org/repo
103
+ version: 1.0.0
104
+ last_updated: 2025-01-22
105
+ update_command: "npx add-skill org/repo"
106
+ ```
107
+
108
+ ### Update Tracking
109
+ ```
110
+ - version: Current version installed
111
+ - last_updated: Date of last sync
112
+ - update_command: Command to update
113
+ - changelog_url: Where to check updates
114
+ ```
115
+
116
+ ## Separation of Concerns
117
+
118
+ ### .codex/agents/
119
+ ```
120
+ Purpose: Define WHAT the agent does
121
+ Content: Role, capabilities, workflow
122
+ Format: Single .md file with YAML frontmatter
123
+ NOT: How to do it (that's skills/)
124
+ ```
125
+
126
+ ### .codex/skills/
127
+ ```
128
+ Purpose: Define HOW to do tasks
129
+ Content: Instructions, scripts, rules
130
+ Location: .codex/skills/{name}/SKILL.md
131
+ ```
132
+
133
+ ### guides/
134
+ ```
135
+ Purpose: Reference documentation
136
+ Content: Best practices, tutorials
137
+ Location: guides/{topic}/
138
+ ```
139
+
140
+ ## Agent → Skill References
141
+
142
+ ### In Frontmatter
143
+ ```yaml
144
+ ---
145
+ name: agent-name
146
+ skills:
147
+ - react-best-practices
148
+ - web-design-guidelines
149
+ ---
150
+ ```
151
+
152
+ Skills are referenced by name only. The system automatically discovers skills in `.codex/skills/` by scanning for `SKILL.md` files.
153
+
154
+ ## Naming Conventions
155
+
156
+ | Type | Pattern | Example |
157
+ |------|---------|---------|
158
+ | Agent file | `kebab-case.md` | `.codex/agents/fe-vercel-agent.md` |
159
+ | Skill directory | `kebab-case/` | `.codex/skills/react-best-practices/` |
160
+ | Guide directory | `kebab-case/` | `guides/web-design/` |
161
+ | Agent filename | lowercase | `{name}.md` |
162
+ | Skill file | UPPERCASE | `SKILL.md` |
@@ -0,0 +1,108 @@
1
+ # [MUST] Agent Identification Rules
2
+
3
+ > **Priority**: MUST - ENFORCED, NO EXCEPTIONS
4
+ > **ID**: R007
5
+ > **Violation**: Immediate correction required
6
+
7
+ ## CRITICAL
8
+
9
+ **EVERY response MUST start with agent identification. This is NON-NEGOTIABLE.**
10
+
11
+ Failure to include agent identification = Rule violation = Must be corrected immediately.
12
+
13
+ ## Purpose
14
+
15
+ Display which agent is responding and which skills are being used for transparency and traceability.
16
+
17
+ ## Response Header Format
18
+
19
+ Every response MUST start with an agent identification block:
20
+
21
+ ```
22
+ ┌─ Agent: {agent-name} ({agent-type})
23
+ ├─ Skill: {skill-name} (if applicable)
24
+ └─ Task: {brief-task-description}
25
+ ```
26
+
27
+ ## Examples
28
+
29
+ ### Single Agent Response
30
+ ```
31
+ ┌─ Agent: mgr-creator (manager)
32
+ └─ Task: Creating new agent
33
+
34
+ [Response content...]
35
+ ```
36
+
37
+ ### With Skill Usage
38
+ ```
39
+ ┌─ Agent: fe-vercel-agent (worker)
40
+ ├─ Skill: react-best-practices
41
+ └─ Task: Optimizing React component
42
+
43
+ [Response content...]
44
+ ```
45
+
46
+ ### Multiple Skills
47
+ ```
48
+ ┌─ Agent: fe-vercel-agent (worker)
49
+ ├─ Skills: react-best-practices, web-design-guidelines
50
+ └─ Task: Full code review
51
+
52
+ [Response content...]
53
+ ```
54
+
55
+ ### No Specific Agent (Default)
56
+ ```
57
+ ┌─ Agent: claude (default)
58
+ └─ Task: General assistance
59
+
60
+ [Response content...]
61
+ ```
62
+
63
+ ## When to Display
64
+
65
+ | Situation | Display |
66
+ |-----------|---------|
67
+ | Agent-specific task | Full header with agent |
68
+ | Using skill | Include skill name |
69
+ | General conversation | "claude (default)" |
70
+ | Multiple agents | Show primary agent |
71
+
72
+ ## Agent Types
73
+
74
+ | Type | Symbol | Example |
75
+ |------|--------|---------|
76
+ | manager | 🔧 | mgr-creator, mgr-updater |
77
+ | worker | ⚙️ | fe-vercel-agent |
78
+ | orchestrator | 🎯 | (future) |
79
+ | default | 💬 | claude |
80
+
81
+ ## Simplified Format (Optional)
82
+
83
+ For brief responses, use inline format:
84
+
85
+ ```
86
+ [mgr-creator] Creating agent structure...
87
+ ```
88
+
89
+ Or with skill:
90
+
91
+ ```
92
+ [fe-vercel-agent → react-best-practices] Analyzing performance...
93
+ ```
94
+
95
+ ## Status Updates
96
+
97
+ During long tasks, show progress with agent context:
98
+
99
+ ```
100
+ ┌─ Agent: mgr-updater (manager)
101
+ └─ Task: Checking external updates
102
+
103
+ [Progress] Scanning .codex/agents/ (1/3)
104
+ [Progress] Scanning .codex/skills/ (2/3)
105
+ [Progress] Scanning .codex/guides/ (3/3)
106
+
107
+ [Done] Found 2 updates available
108
+ ```
@@ -0,0 +1,132 @@
1
+ # [MUST] Continuous Improvement Rules
2
+
3
+ > **Priority**: MUST - Top-level enforcement
4
+ > **ID**: R016
5
+ > **Trigger**: User points out rule violation
6
+
7
+ ## CRITICAL
8
+
9
+ **When user points out a rule violation, you MUST update the rules to prevent future violations BEFORE continuing with the task.**
10
+
11
+ ```
12
+ ╔══════════════════════════════════════════════════════════════════╗
13
+ ║ WHEN USER POINTS OUT A VIOLATION: ║
14
+ ║ ║
15
+ ║ 1. STOP current task immediately ║
16
+ ║ 2. UPDATE the relevant rule to be clearer/stronger ║
17
+ ║ 3. COMMIT the rule update ║
18
+ ║ 4. THEN continue with the original task ║
19
+ ║ ║
20
+ ║ DO NOT just apologize and continue. ║
21
+ ║ DO NOT promise to do better next time. ║
22
+ ║ ACTUALLY UPDATE THE RULES. ║
23
+ ╚══════════════════════════════════════════════════════════════════╝
24
+ ```
25
+
26
+ ## Workflow
27
+
28
+ ```
29
+ User points out violation
30
+
31
+
32
+ ┌─────────────────────────┐
33
+ │ 1. Acknowledge violation │
34
+ └───────────┬─────────────┘
35
+
36
+
37
+ ┌─────────────────────────┐
38
+ │ 2. Identify root cause │
39
+ │ - Which rule was weak?│
40
+ │ - What was unclear? │
41
+ └───────────┬─────────────┘
42
+
43
+
44
+ ┌─────────────────────────┐
45
+ │ 3. Update the rule │
46
+ │ - Add clarity │
47
+ │ - Add examples │
48
+ │ - Add self-checks │
49
+ └───────────┬─────────────┘
50
+
51
+
52
+ ┌─────────────────────────┐
53
+ │ 4. Commit the change │
54
+ └───────────┬─────────────┘
55
+
56
+
57
+ ┌─────────────────────────┐
58
+ │ 5. Continue original task│
59
+ │ (now following rules) │
60
+ └─────────────────────────┘
61
+ ```
62
+
63
+ ## Examples
64
+
65
+ ### Example 1: Parallel Execution Violation
66
+
67
+ ```
68
+ User: "병렬 실행을 안 지킨거 아닌가?"
69
+
70
+ WRONG Response:
71
+ "맞습니다, 죄송합니다. 다음부터 잘 지키겠습니다."
72
+ [continues task without updating rules]
73
+
74
+ CORRECT Response:
75
+ 1. "맞습니다. R009 위반입니다."
76
+ 2. [Updates MUST-parallel-execution.md with clearer guidance]
77
+ 3. [Commits the update]
78
+ 4. [Continues task with proper parallel execution]
79
+ ```
80
+
81
+ ### Example 2: Wrong Agent Used
82
+
83
+ ```
84
+ User: "mgr-creator 에이전트를 써야 하는거 아닌가?"
85
+
86
+ WRONG Response:
87
+ "맞습니다. mgr-creator를 사용하겠습니다."
88
+ [continues without updating rules]
89
+
90
+ CORRECT Response:
91
+ 1. "맞습니다. R010 위반입니다."
92
+ 2. [Updates relevant rules to clarify agent delegation]
93
+ 3. [Commits the update]
94
+ 4. [Continues with proper agent delegation]
95
+ ```
96
+
97
+ ## Why This Matters
98
+
99
+ ```
100
+ Without rule updates:
101
+ Violation → Apology → Same mistake later → Apology → ...
102
+
103
+ With rule updates:
104
+ Violation → Rule improvement → Better behavior → Learning preserved
105
+ ```
106
+
107
+ 1. **Institutional Memory**: Rules capture learnings permanently
108
+ 2. **Prevents Recurrence**: Clearer rules = fewer future violations
109
+ 3. **Continuous Improvement**: System gets better over time
110
+ 4. **Accountability**: Actions, not just words
111
+
112
+ ## Integration with Other Rules
113
+
114
+ This rule takes precedence when violations are pointed out:
115
+
116
+ | Situation | Action |
117
+ |-----------|--------|
118
+ | User points out violation | STOP → Update rule → Continue |
119
+ | Self-detected violation | Fix immediately, consider rule update |
120
+ | Ambiguous situation | Ask user, then update if needed |
121
+
122
+ ## Enforcement
123
+
124
+ ```
125
+ Violation of this rule = Ignoring user feedback = Unacceptable
126
+
127
+ When caught violating this rule:
128
+ 1. Stop immediately
129
+ 2. Update THIS rule to be even clearer
130
+ 3. Update the ORIGINAL violated rule
131
+ 4. Continue with proper behavior
132
+ ```