oh-my-customcode 0.9.2 → 0.9.4

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 (112) hide show
  1. package/README.md +25 -30
  2. package/dist/cli/index.js +1315 -568
  3. package/dist/index.js +234 -17
  4. package/package.json +1 -1
  5. package/templates/.claude/agents/arch-documenter.md +7 -71
  6. package/templates/.claude/agents/arch-speckit-agent.md +21 -108
  7. package/templates/.claude/agents/be-express-expert.md +8 -58
  8. package/templates/.claude/agents/be-nestjs-expert.md +6 -38
  9. package/templates/.claude/agents/be-springboot-expert.md +11 -56
  10. package/templates/.claude/agents/db-postgres-expert.md +10 -80
  11. package/templates/.claude/agents/db-redis-expert.md +10 -75
  12. package/templates/.claude/agents/db-supabase-expert.md +12 -48
  13. package/templates/.claude/agents/de-airflow-expert.md +8 -45
  14. package/templates/.claude/agents/de-dbt-expert.md +8 -46
  15. package/templates/.claude/agents/de-kafka-expert.md +10 -10
  16. package/templates/.claude/agents/de-pipeline-expert.md +9 -69
  17. package/templates/.claude/agents/de-snowflake-expert.md +9 -62
  18. package/templates/.claude/agents/de-spark-expert.md +10 -54
  19. package/templates/.claude/agents/fe-svelte-agent.md +5 -41
  20. package/templates/.claude/agents/fe-vercel-agent.md +9 -41
  21. package/templates/.claude/agents/fe-vuejs-agent.md +7 -42
  22. package/templates/.claude/agents/lang-java21-expert.md +11 -37
  23. package/templates/.claude/agents/mgr-claude-code-bible.md +22 -207
  24. package/templates/.claude/agents/mgr-creator.md +7 -88
  25. package/templates/.claude/agents/mgr-gitnerd.md +8 -76
  26. package/templates/.claude/agents/mgr-sauron.md +27 -20
  27. package/templates/.claude/agents/mgr-supplier.md +11 -96
  28. package/templates/.claude/agents/mgr-sync-checker.md +9 -70
  29. package/templates/.claude/agents/mgr-updater.md +9 -79
  30. package/templates/.claude/agents/qa-engineer.md +8 -72
  31. package/templates/.claude/agents/qa-planner.md +2 -3
  32. package/templates/.claude/agents/qa-writer.md +6 -76
  33. package/templates/.claude/agents/sys-memory-keeper.md +13 -87
  34. package/templates/.claude/agents/sys-naggy.md +9 -62
  35. package/templates/.claude/agents/tool-bun-expert.md +7 -52
  36. package/templates/.claude/agents/tool-npm-expert.md +6 -64
  37. package/templates/.claude/agents/tool-optimizer.md +7 -60
  38. package/templates/.claude/rules/MAY-optimization.md +16 -80
  39. package/templates/.claude/rules/MUST-agent-design.md +29 -134
  40. package/templates/.claude/rules/MUST-agent-identification.md +9 -88
  41. package/templates/.claude/rules/MUST-continuous-improvement.md +10 -117
  42. package/templates/.claude/rules/MUST-intent-transparency.md +14 -171
  43. package/templates/.claude/rules/MUST-language-policy.md +11 -46
  44. package/templates/.claude/rules/MUST-orchestrator-coordination.md +82 -425
  45. package/templates/.claude/rules/MUST-parallel-execution.md +33 -405
  46. package/templates/.claude/rules/MUST-permissions.md +14 -68
  47. package/templates/.claude/rules/MUST-safety.md +11 -57
  48. package/templates/.claude/rules/MUST-sync-verification.md +49 -205
  49. package/templates/.claude/rules/MUST-tool-identification.md +21 -134
  50. package/templates/.claude/rules/SHOULD-agent-teams.md +22 -166
  51. package/templates/.claude/rules/SHOULD-ecomode.md +15 -123
  52. package/templates/.claude/rules/SHOULD-error-handling.md +19 -88
  53. package/templates/.claude/rules/SHOULD-hud-statusline.md +9 -89
  54. package/templates/.claude/rules/SHOULD-interaction.md +18 -87
  55. package/templates/.claude/rules/SHOULD-memory-integration.md +25 -118
  56. package/templates/.claude/skills/dev-lead-routing/SKILL.md +70 -243
  57. package/templates/.claude/skills/springboot-best-practices/SKILL.md +180 -319
  58. package/templates/.codex/agents/arch-documenter.md +7 -71
  59. package/templates/.codex/agents/arch-speckit-agent.md +21 -108
  60. package/templates/.codex/agents/be-express-expert.md +8 -58
  61. package/templates/.codex/agents/be-nestjs-expert.md +6 -38
  62. package/templates/.codex/agents/be-springboot-expert.md +11 -56
  63. package/templates/.codex/agents/db-postgres-expert.md +10 -80
  64. package/templates/.codex/agents/db-redis-expert.md +10 -75
  65. package/templates/.codex/agents/db-supabase-expert.md +12 -48
  66. package/templates/.codex/agents/de-airflow-expert.md +8 -45
  67. package/templates/.codex/agents/de-dbt-expert.md +8 -46
  68. package/templates/.codex/agents/de-kafka-expert.md +10 -10
  69. package/templates/.codex/agents/de-pipeline-expert.md +9 -69
  70. package/templates/.codex/agents/de-snowflake-expert.md +9 -62
  71. package/templates/.codex/agents/de-spark-expert.md +10 -54
  72. package/templates/.codex/agents/fe-svelte-agent.md +5 -41
  73. package/templates/.codex/agents/fe-vercel-agent.md +9 -41
  74. package/templates/.codex/agents/fe-vuejs-agent.md +7 -42
  75. package/templates/.codex/agents/infra-aws-expert.md +1 -1
  76. package/templates/.codex/agents/infra-docker-expert.md +1 -1
  77. package/templates/.codex/agents/lang-java21-expert.md +11 -37
  78. package/templates/.codex/agents/mgr-claude-code-bible.md +25 -210
  79. package/templates/.codex/agents/mgr-creator.md +7 -88
  80. package/templates/.codex/agents/mgr-gitnerd.md +8 -76
  81. package/templates/.codex/agents/mgr-sauron.md +30 -23
  82. package/templates/.codex/agents/mgr-supplier.md +11 -96
  83. package/templates/.codex/agents/mgr-sync-checker.md +12 -73
  84. package/templates/.codex/agents/mgr-updater.md +9 -79
  85. package/templates/.codex/agents/qa-engineer.md +8 -72
  86. package/templates/.codex/agents/qa-planner.md +2 -3
  87. package/templates/.codex/agents/qa-writer.md +6 -76
  88. package/templates/.codex/agents/sys-memory-keeper.md +13 -87
  89. package/templates/.codex/agents/sys-naggy.md +9 -62
  90. package/templates/.codex/agents/tool-bun-expert.md +7 -52
  91. package/templates/.codex/agents/tool-npm-expert.md +6 -64
  92. package/templates/.codex/agents/tool-optimizer.md +7 -60
  93. package/templates/.codex/rules/MAY-optimization.md +16 -80
  94. package/templates/.codex/rules/MUST-agent-design.md +29 -134
  95. package/templates/.codex/rules/MUST-agent-identification.md +9 -88
  96. package/templates/.codex/rules/MUST-continuous-improvement.md +10 -117
  97. package/templates/.codex/rules/MUST-intent-transparency.md +14 -171
  98. package/templates/.codex/rules/MUST-language-policy.md +11 -46
  99. package/templates/.codex/rules/MUST-orchestrator-coordination.md +82 -425
  100. package/templates/.codex/rules/MUST-parallel-execution.md +33 -405
  101. package/templates/.codex/rules/MUST-permissions.md +14 -68
  102. package/templates/.codex/rules/MUST-safety.md +11 -57
  103. package/templates/.codex/rules/MUST-sync-verification.md +58 -214
  104. package/templates/.codex/rules/MUST-tool-identification.md +22 -135
  105. package/templates/.codex/rules/SHOULD-agent-teams.md +22 -166
  106. package/templates/.codex/rules/SHOULD-ecomode.md +15 -123
  107. package/templates/.codex/rules/SHOULD-error-handling.md +19 -88
  108. package/templates/.codex/rules/SHOULD-hud-statusline.md +9 -89
  109. package/templates/.codex/rules/SHOULD-interaction.md +18 -87
  110. package/templates/.codex/rules/SHOULD-memory-integration.md +25 -118
  111. package/templates/.codex/skills/dev-lead-routing/SKILL.md +70 -243
  112. package/templates/.codex/skills/springboot-best-practices/SKILL.md +180 -319
@@ -1,183 +1,39 @@
1
1
  # [SHOULD] Agent Teams Rules
2
2
 
3
- > **Priority**: SHOULD - Actively use when available
4
- > **ID**: R018
5
- > **Condition**: Agent Teams feature is enabled locally
6
-
7
- ## Purpose
8
-
9
- When Claude Code's Agent Teams feature is enabled on the local machine, actively leverage it for tasks that benefit from multi-agent collaboration, shared state, and peer-to-peer communication.
3
+ > **Priority**: SHOULD | **ID**: R018 | **Condition**: Agent Teams enabled locally
10
4
 
11
5
  ## Detection
12
6
 
13
- Agent Teams availability is determined by:
14
- - Environment variable: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
15
- - The presence of TeamCreate, SendMessage, TaskCreate/TaskList (team variants) tools
16
-
17
- When detected, Agent Teams becomes the **preferred coordination method** for qualifying tasks.
7
+ Available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present.
18
8
 
19
9
  ## Decision Matrix
20
10
 
21
- | Scenario | Task Tool | Agent Teams | Preferred |
22
- |----------|-----------|-------------|-----------|
23
- | Simple independent subtasks | Low cost | Overkill | **Task Tool** |
24
- | Multi-step with shared state | Limited | Native support | **Agent Teams** |
25
- | Research requiring discussion | No peer comm | Peer messaging | **Agent Teams** |
26
- | Cost-sensitive batch ops | Lower tokens | Higher tokens | **Task Tool** |
27
- | Complex debugging across modules | Isolated context | Shared context | **Agent Teams** |
28
- | Code review + fix cycle | Sequential | Collaborative | **Agent Teams** |
29
- | Single file operations | Fast | Overhead | **Task Tool** |
30
-
31
- ## When to Use Agent Teams
32
-
33
- ### SHOULD Use Agent Teams For
34
-
35
- ```
36
- Tasks requiring 3+ agents that need to coordinate
37
- Research tasks where agents need to share findings
38
- Debugging sessions spanning multiple modules
39
- Review + implementation cycles
40
- Any task where inter-agent communication adds value
41
- ```
42
-
43
- ### SHOULD Keep Task Tool For
44
-
45
- ```
46
- Independent parallel subtasks (no shared state)
47
- Single-agent delegations
48
- Cost-sensitive batch operations
49
- Simple file operations
50
- When Agent Teams is not available
51
- ```
52
-
53
- ## CRITICAL: Self-Check Before Spawning Task Tool
54
-
55
- ```
56
- ╔══════════════════════════════════════════════════════════════════╗
57
- ║ BEFORE USING TASK TOOL, ASK YOURSELF: ║
58
- ║ ║
59
- ║ 1. Is Agent Teams available? (TeamCreate tool exists?) ║
60
- ║ → YES: Continue to step 2 ║
61
- ║ → NO: Task tool is fine ║
62
- ║ ║
63
- ║ 2. Does this task qualify for Agent Teams? ║
64
- ║ - 3+ agents needed? ║
65
- ║ - Shared state or coordination required? ║
66
- ║ - Inter-agent communication adds value? ║
67
- ║ - Complex workflow (create + review + integrate)? ║
68
- ║ → ANY YES: MUST use Agent Teams ║
69
- ║ → ALL NO: Task tool is fine ║
70
- ║ ║
71
- ║ 3. Am I defaulting to Task tool out of habit? ║
72
- ║ → STOP. Evaluate honestly against the decision matrix. ║
73
- ║ ║
74
- ║ Using Task tool for Agent Teams-qualifying tasks ║
75
- ║ when Agent Teams is available = Rule violation ║
76
- ╚══════════════════════════════════════════════════════════════════╝
77
- ```
78
-
79
- ## Team Composition Guidelines
80
-
81
- ### Standard Team Patterns
82
-
83
- #### Research Team
84
- ```
85
- TeamCreate("research-team")
86
- +-- researcher-1: Explore codebase area A
87
- +-- researcher-2: Explore codebase area B
88
- +-- synthesizer: Aggregate findings
89
- ```
90
-
91
- #### Development Team
92
- ```
93
- TeamCreate("dev-team")
94
- +-- implementer: Write code
95
- +-- reviewer: Review changes
96
- +-- tester: Validate changes
97
- ```
98
-
99
- #### Debug Team
100
- ```
101
- TeamCreate("debug-team")
102
- +-- investigator-1: Trace issue in module A
103
- +-- investigator-2: Trace issue in module B
104
- +-- fixer: Apply fixes based on findings
105
- ```
106
-
107
- ### Team Lifecycle
108
-
109
- ```
110
- 1. TeamCreate -> Create team with purpose
111
- 2. TaskCreate -> Define tasks for team members
112
- 3. Task(team_name) -> Spawn team members
113
- 4. SendMessage -> Coordinate between members
114
- 5. TaskUpdate -> Track progress
115
- 6. SendMessage(shutdown_request) -> Graceful shutdown
116
- 7. TeamDelete -> Cleanup
117
- ```
118
-
119
- ## Fallback Behavior
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 |
120
20
 
121
- When Agent Teams is NOT available:
122
- - All team-qualifying tasks fall back to Task tool
123
- - R009 (Parallel Execution) governs parallel spawning
124
- - R010 (Orchestrator Coordination) governs delegation
125
- - No degradation in capability, only in coordination richness
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.
126
22
 
127
- ```
128
- +------------------------------------------------------------------+
129
- | GRACEFUL DEGRADATION |
130
- | |
131
- | Agent Teams Available: |
132
- | Complex task -> TeamCreate -> coordinated agents |
133
- | |
134
- | Agent Teams NOT Available: |
135
- | Complex task -> Task tool -> parallel independent agents |
136
- | |
137
- | Both approaches produce results. |
138
- | Agent Teams adds coordination, not capability. |
139
- +------------------------------------------------------------------+
140
- ```
23
+ ## Team Patterns
141
24
 
142
- ## Integration with Existing Rules
25
+ - **Research**: researcher-1 + researcher-2 + synthesizer
26
+ - **Development**: implementer + reviewer + tester
27
+ - **Debug**: investigator-1 + investigator-2 + fixer
143
28
 
144
- | Rule | Integration |
145
- |------|-------------|
146
- | R009 (Parallel) | Task tool parallel = fallback when no Agent Teams |
147
- | R010 (Orchestrator) | Agent Teams = alternative coordination model |
148
- | R012 (HUD) | Team status displayed in HUD |
149
- | R013 (Ecomode) | Team communications respect ecomode |
29
+ ## Lifecycle
150
30
 
151
- ## Cost Awareness
31
+ TeamCreate TaskCreate → Task(spawn) → SendMessage(coordinate) → TaskUpdate → shutdown → cleanup
152
32
 
153
- Agent Teams consume more tokens due to:
154
- - Full context per team member
155
- - Inter-agent message passing
156
- - Shared task list overhead
33
+ ## Fallback
157
34
 
158
- ```
159
- Rule of thumb:
160
- If task takes < 3 minutes with Task tool -> Use Task tool
161
- If task needs inter-agent communication -> Use Agent Teams
162
- If unsure -> Default to Agent Teams when available, downgrade to Task tool only if clearly unqualified
163
- ```
35
+ When Agent Teams unavailable: use Task tool with R009/R010 rules. Both approaches produce results; Agent Teams adds coordination richness.
164
36
 
165
- ## Enforcement
37
+ ## Cost
166
38
 
167
- ```
168
- ╔══════════════════════════════════════════════════════════════════╗
169
- ║ VIOLATION EXAMPLES: ║
170
- ║ ║
171
- ║ ✗ Agent Teams available + 4 parallel Task() calls for ║
172
- ║ coordinated work (creating agents + guides + routing skill) ║
173
- ║ ✗ Spawning Task tool agents that need to share results ║
174
- ║ ✗ Defaulting to Task tool without checking Agent Teams first ║
175
- ║ ║
176
- ║ CORRECT EXAMPLES: ║
177
- ║ ║
178
- ║ ✓ TeamCreate → TaskCreate → spawn team members for ║
179
- ║ multi-file coordinated creation ║
180
- ║ ✓ Task tool for single independent delegation ║
181
- ║ ✓ Task tool when Agent Teams is not available ║
182
- ╚══════════════════════════════════════════════════════════════════╝
183
- ```
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,145 +1,37 @@
1
1
  # [SHOULD] Ecomode Rules
2
2
 
3
- > **Priority**: SHOULD - Recommended for token efficiency
4
- > **ID**: R013
3
+ > **Priority**: SHOULD | **ID**: R013
5
4
 
6
- ## Purpose
5
+ ## Activation
7
6
 
8
- Reduce token usage and improve efficiency during batch operations and parallel execution.
9
-
10
- ## Activation Conditions
11
-
12
- Ecomode is automatically activated when:
13
-
14
- ```yaml
15
- conditions:
16
- - 4+ parallel tasks spawned
17
- - Batch operations requested
18
- - Near compaction threshold (80%+ context usage)
19
- - Explicit user request: "ecomode on"
20
- ```
7
+ Auto-activates when: 4+ parallel tasks, batch operations, 80%+ context usage, or explicit "ecomode on".
21
8
 
22
9
  ## Behaviors
23
10
 
24
- ### 1. Compact Output Format
25
-
26
- When ecomode is active, parallel agents return:
27
-
28
- ```yaml
29
- format:
30
- - status: success | failed | partial
31
- - summary: 1-2 sentences max
32
- - key_data: essential results only
33
-
34
- skip:
35
- - Intermediate steps
36
- - Verbose explanations
37
- - Repeated context
38
- - Full file contents (use paths instead)
39
- ```
40
-
41
- ### 2. Aggregation Format
42
-
43
- Secretary aggregates results in compact format:
11
+ **Compact Output**: Agents return `status + summary (1-2 sentences) + key_data only`. Skip intermediate steps, verbose explanations, repeated context, full file contents.
44
12
 
13
+ **Aggregation Format**:
45
14
  ```
46
15
  [Batch Complete] {n}/{total}
47
- ├── {agent}: {icon} {summary}
48
- ├── {agent}: {icon} {summary}
49
- └── {agent}: {icon} {summary}
16
+ ├── {agent}: ✓/✗/⚠ {summary}
50
17
  ```
51
18
 
52
- Icons:
53
- - ✓ success
54
- - ✗ failed
55
- - ⚠ partial/warning
56
-
57
- ### 3. Result Compression
58
-
59
- ```yaml
60
- compress:
61
- - File lists → count only unless < 5 files
62
- - Error traces → first and last 3 lines
63
- - Code snippets → path:line reference only
64
- - Long outputs → truncate with "[truncated]"
65
- ```
19
+ **Compression**: File lists -> count only (unless < 5), error traces -> first/last 3 lines, code -> path:line ref only.
66
20
 
67
- ## Secretary Ecomode Config
21
+ ## Config
68
22
 
69
23
  ```yaml
70
24
  ecomode:
71
- enabled: true
72
- threshold: 4 # Activate when >= 4 parallel tasks
73
- result_format: summary # summary | full
74
- max_result_length: 200 # characters per result
75
- ```
76
-
77
- ## Examples
78
-
79
- ### Normal Mode Output
80
-
25
+ threshold: 4
26
+ result_format: summary
27
+ max_result_length: 200
81
28
  ```
82
- ┌─ Agent: lang-golang-expert (sw-engineer)
83
- ├─ Skill: go-best-practices
84
- └─ Task: Reviewing src/main.go
85
29
 
86
- Reading file...
87
- [lang-golang-expert → Read] src/main.go
30
+ ## Example
88
31
 
89
- Analyzing code structure...
90
- Found 3 functions, 2 structs, 1 interface.
91
-
92
- Checking naming conventions...
93
- Function 'GetUser' follows Go naming conventions.
94
- Function 'processData' follows Go naming conventions.
95
- Function 'handle_error' VIOLATION: uses snake_case instead of camelCase.
96
-
97
- [...]
98
-
99
- Review Complete:
100
- - 1 naming violation found
101
- - 2 potential improvements suggested
102
- - Overall code quality: Good
103
- ```
104
-
105
- ### Ecomode Output
106
-
107
- ```
108
- [lang-golang-expert] ✓ src/main.go reviewed: 1 naming issue (handle_error → handleError)
109
- ```
110
-
111
- ## Implementation Notes
112
-
113
- ### For Orchestrator (Secretary)
114
-
115
- ```yaml
116
- responsibilities:
117
- - Detect ecomode activation conditions
118
- - Instruct spawned agents to use compact format
119
- - Aggregate results in batch format
120
- - Track token savings
121
- ```
122
-
123
- ### For Worker Agents
124
-
125
- ```yaml
126
- when_ecomode_active:
127
- - Return status + summary only
128
- - Skip intermediate progress updates
129
- - Use references instead of full content
130
- - Compress error messages
131
- ```
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)`
132
34
 
133
35
  ## Override
134
36
 
135
- User can disable ecomode:
136
- - "ecomode off"
137
- - "verbose mode"
138
- - "show full details"
139
-
140
- ## Benefits
141
-
142
- 1. **Token Efficiency**: 60-80% reduction in batch operations
143
- 2. **Faster Response**: Less output processing
144
- 3. **Better Overview**: Aggregated results at a glance
145
- 4. **Context Preservation**: More room for actual work
37
+ Disable with: "ecomode off", "verbose mode", or "show full details".
@@ -1,102 +1,33 @@
1
1
  # [SHOULD] Error Handling Rules
2
2
 
3
- > **Priority**: SHOULD - Strongly recommended
4
- > **Goal**: Safe failure, fast recovery
3
+ > **Priority**: SHOULD | **ID**: R004
5
4
 
6
5
  ## Error Classification
7
6
 
8
- ### Level 1: Warning
9
- ```
10
- Symptom: Task completes but needs attention
11
- Response: Output warning, continue
12
- Example:
13
- - Non-recommended pattern found
14
- - Potential performance issue
15
- - Better alternative exists
16
- ```
17
-
18
- ### Level 2: Error
19
- ```
20
- Symptom: Current task fails, others possible
21
- Response: Stop task, report cause, suggest alternative
22
- Example:
23
- - File not found
24
- - Insufficient permission
25
- - Format error
26
- ```
27
-
28
- ### Level 3: Critical
29
- ```
30
- Symptom: Cannot proceed at all
31
- Response: Stop all, preserve state, report immediately
32
- Example:
33
- - System resource exhausted
34
- - Missing required dependency
35
- - Security violation detected
36
- ```
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 |
37
12
 
38
13
  ## Error Report Format
39
14
 
40
15
  ```
41
- [Error] {error type}
42
-
43
- Location: {file:line or task name}
44
- Cause: {specific cause}
45
- Impact: {effect of this error}
46
-
47
- Attempted:
48
- 1. {attempt 1} → Failed
49
- 2. {attempt 2} → Failed
50
-
51
- Recommended:
52
- - {action 1}
53
- - {action 2}
54
- ```
55
-
56
- ## Recovery Strategy
57
-
58
- ### Retryable Errors
59
- ```
60
- 1. Retry up to 3 times
61
- 2. Wait between retries (1s, 2s, 4s)
62
- 3. Report to user after 3 failures
63
- ```
64
-
65
- ### Non-recoverable Errors
66
- ```
67
- 1. Save current state
68
- 2. Rollback changes (if possible)
69
- 3. Detailed error report
70
- 4. Wait for user instruction
16
+ [Error] {type} — Location: {file:line} — Cause: {cause} — Impact: {effect}
17
+ Attempted: 1. {try1} -> Failed 2. {try2} -> Failed
18
+ Recommended: {action1}, {action2}
71
19
  ```
72
20
 
73
- ## Preventive Validation
21
+ ## Recovery
74
22
 
75
- ### Before Action
76
- ```
77
- Target file/path exists
78
- Required permissions available
79
- □ Dependencies met
80
- □ Sufficient resources
81
- ```
82
-
83
- ### After Action
84
- ```
85
- □ Expected result matches actual
86
- □ File integrity verified
87
- □ No side effects
88
- ```
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 |
89
27
 
90
- ## Error Logging
28
+ ## Validation
91
29
 
92
- ```yaml
93
- error_log:
94
- timestamp: "2025-01-22T10:30:00Z"
95
- level: error
96
- code: FILE_NOT_FOUND
97
- message: "Config file not found"
98
- context:
99
- file: "/path/to/config.yaml"
100
- action: "read"
101
- resolution: "Using default config"
102
- ```
30
+ | When | Checks |
31
+ |------|--------|
32
+ | Before action | Target exists, permissions available, dependencies met |
33
+ | After action | Expected = actual, file integrity, no side effects |
@@ -1,11 +1,6 @@
1
1
  # [SHOULD] HUD Statusline Rules
2
2
 
3
- > **Priority**: SHOULD - Recommended for visibility
4
- > **ID**: R012
5
-
6
- ## Purpose
7
-
8
- Display real-time status information during agent operations for improved visibility and progress tracking.
3
+ > **Priority**: SHOULD | **ID**: R012
9
4
 
10
5
  ## Format
11
6
 
@@ -13,100 +8,25 @@ Display real-time status information during agent operations for improved visibi
13
8
  ─── [Agent] {name} | [Progress] {n}/{total} | [Parallel] {count} ───
14
9
  ```
15
10
 
16
- ## Update Triggers
17
-
18
- | Trigger | Description |
19
- |---------|-------------|
20
- | Agent activation | When an agent starts handling a task |
21
- | Task start | When a specific task begins execution |
22
- | Task complete | When a task finishes (success or failure) |
23
- | Parallel spawn | When parallel instances are created |
24
- | Parallel complete | When parallel instances finish |
25
-
26
- ## Components
27
-
28
- | Component | Description | Example |
29
- |-----------|-------------|---------|
30
- | Agent | Active agent name | `lang-golang-expert` |
31
- | Model | Model used (for parallel) | `sonnet` |
32
- | Progress | Task progress (current/total) | `2/5` |
33
- | Parallel | Parallel instance count | `3` |
34
-
35
- ## Display Rules
36
-
37
- ### Single Agent
38
-
39
- ```
40
- ─── [Agent] mgr-creator | [Progress] 1/3 ───
41
- ```
42
-
43
- ### With Parallel Execution (Model Display REQUIRED)
44
-
45
- ```
46
- ─── [Agent] secretary | [Progress] 0/4 | [Parallel] 4 ───
47
-
48
- Instances:
49
- [1] Task(general-purpose):sonnet → README update
50
- [2] Task(lang-golang-expert):haiku → Code review
51
- [3] Task(Explore):opus → Architecture analysis
52
- [4] Task(general-purpose):haiku → Validation
53
- ```
54
-
55
- ### Completion
56
-
57
- ```
58
- ─── [Agent] mgr-supplier | [Progress] 5/5 | [Done] ───
59
- ```
60
-
61
- ## Implementation
62
-
63
- Status updates via stderr to avoid output pollution:
64
-
65
- ```bash
66
- echo "─── [Agent] $AGENT | [Progress] $PROGRESS ───" >&2
67
- ```
68
-
69
- ## Integration with Other Rules
70
-
71
- | Rule | Integration |
72
- |------|-------------|
73
- | R007 (Agent ID) | HUD complements agent identification |
74
- | R008 (Tool ID) | HUD shows overall progress, tool ID shows specific operations |
75
- | R009 (Parallel) | HUD displays parallel instance count |
76
-
77
11
  ## When to Display
78
12
 
79
- | Situation | Display HUD |
80
- |-----------|-------------|
81
- | Single file operation | No (too brief) |
82
- | Multi-step task | Yes |
83
- | Parallel execution | Yes |
84
- | Long-running operations | Yes |
13
+ Multi-step tasks, parallel execution, long-running operations. Skip for single brief operations.
85
14
 
86
- ## Hook Usage
15
+ ## Hook Implementation
87
16
 
88
- The HUD statusline is implemented as an inline hook in `.codex/hooks/hooks.json` (PreToolUse → Task matcher).
89
-
90
- The hook automatically displays subagent details when the Task tool is used:
17
+ Implemented in `.claude/hooks/hooks.json` (PreToolUse → Task matcher):
91
18
 
92
19
  ```
93
20
  ─── [Spawn] {subagent_type}:{model} | {description} ───
94
21
  ─── [Resume] {subagent_type}:{model} | {description} ───
95
22
  ```
96
23
 
97
- ### Examples
24
+ ## Display with Parallel
98
25
 
99
26
  ```
100
- ─── [Spawn] mgr-gitnerd:sonnet | Commit and push ───
101
- ─── [Spawn] lang-golang-expert:sonnet | Review Go code ───
102
- ─── [Spawn] mgr-creator:sonnet | Create new agent ───
103
- ─── [Resume] mgr-gitnerd:sonnet | Continue push ───
27
+ ─── [Agent] secretary | [Parallel] 4 ───
28
+ [1] Task(mgr-creator):sonnet Create agent
29
+ [2] Task(lang-golang-expert):haiku Code review
104
30
  ```
105
31
 
106
- ### Fields Displayed
107
-
108
- | Field | Source | Purpose |
109
- |-------|--------|---------|
110
- | `subagent_type` | Task tool parameter | Which agent is running |
111
- | `model` | Task tool parameter | Which model (opus/sonnet/haiku) |
112
- | `description` | Task tool parameter | What the agent is doing (max 40 chars) |
32
+ Integrates with R007 (Agent ID), R008 (Tool ID), R009 (Parallel).