oh-my-customcode 0.7.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.
- package/README.md +38 -12
- package/dist/cli/index.js +518 -274
- package/dist/index.js +304 -101
- package/package.json +1 -1
- package/templates/.claude/agents/db-postgres-expert.md +106 -0
- package/templates/.claude/agents/db-redis-expert.md +101 -0
- package/templates/.claude/agents/de-airflow-expert.md +71 -0
- package/templates/.claude/agents/de-dbt-expert.md +72 -0
- package/templates/.claude/agents/de-kafka-expert.md +81 -0
- package/templates/.claude/agents/de-pipeline-expert.md +92 -0
- package/templates/.claude/agents/de-snowflake-expert.md +89 -0
- package/templates/.claude/agents/de-spark-expert.md +80 -0
- package/templates/.claude/rules/SHOULD-agent-teams.md +47 -1
- package/templates/.claude/skills/airflow-best-practices/SKILL.md +56 -0
- package/templates/.claude/skills/dbt-best-practices/SKILL.md +54 -0
- package/templates/.claude/skills/de-lead-routing/SKILL.md +230 -0
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +15 -0
- package/templates/.claude/skills/kafka-best-practices/SKILL.md +52 -0
- package/templates/.claude/skills/pipeline-architecture-patterns/SKILL.md +83 -0
- package/templates/.claude/skills/postgres-best-practices/SKILL.md +66 -0
- package/templates/.claude/skills/redis-best-practices/SKILL.md +83 -0
- package/templates/.claude/skills/secretary-routing/SKILL.md +12 -0
- package/templates/.claude/skills/snowflake-best-practices/SKILL.md +65 -0
- package/templates/.claude/skills/spark-best-practices/SKILL.md +52 -0
- package/templates/.codex/agents/arch-documenter.md +97 -0
- package/templates/.codex/agents/arch-speckit-agent.md +134 -0
- package/templates/.codex/agents/be-express-expert.md +80 -0
- package/templates/.codex/agents/be-fastapi-expert.md +43 -0
- package/templates/.codex/agents/be-go-backend-expert.md +43 -0
- package/templates/.codex/agents/be-nestjs-expert.md +60 -0
- package/templates/.codex/agents/be-springboot-expert.md +85 -0
- package/templates/.codex/agents/db-postgres-expert.md +106 -0
- package/templates/.codex/agents/db-redis-expert.md +101 -0
- package/templates/.codex/agents/db-supabase-expert.md +71 -0
- package/templates/.codex/agents/de-airflow-expert.md +71 -0
- package/templates/.codex/agents/de-dbt-expert.md +72 -0
- package/templates/.codex/agents/de-kafka-expert.md +81 -0
- package/templates/.codex/agents/de-pipeline-expert.md +92 -0
- package/templates/.codex/agents/de-snowflake-expert.md +89 -0
- package/templates/.codex/agents/de-spark-expert.md +80 -0
- package/templates/.codex/agents/fe-svelte-agent.md +65 -0
- package/templates/.codex/agents/fe-vercel-agent.md +69 -0
- package/templates/.codex/agents/fe-vuejs-agent.md +65 -0
- package/templates/.codex/agents/infra-aws-expert.md +47 -0
- package/templates/.codex/agents/infra-docker-expert.md +47 -0
- package/templates/.codex/agents/lang-golang-expert.md +43 -0
- package/templates/.codex/agents/lang-java21-expert.md +65 -0
- package/templates/.codex/agents/lang-kotlin-expert.md +43 -0
- package/templates/.codex/agents/lang-python-expert.md +43 -0
- package/templates/.codex/agents/lang-rust-expert.md +43 -0
- package/templates/.codex/agents/lang-typescript-expert.md +43 -0
- package/templates/.codex/agents/mgr-claude-code-bible.md +246 -0
- package/templates/.codex/agents/mgr-creator.md +120 -0
- package/templates/.codex/agents/mgr-gitnerd.md +113 -0
- package/templates/.codex/agents/mgr-sauron.md +154 -0
- package/templates/.codex/agents/mgr-supplier.md +120 -0
- package/templates/.codex/agents/mgr-sync-checker.md +99 -0
- package/templates/.codex/agents/mgr-updater.md +103 -0
- package/templates/.codex/agents/qa-engineer.md +96 -0
- package/templates/.codex/agents/qa-planner.md +74 -0
- package/templates/.codex/agents/qa-writer.md +97 -0
- package/templates/.codex/agents/sys-memory-keeper.md +117 -0
- package/templates/.codex/agents/sys-naggy.md +90 -0
- package/templates/.codex/agents/tool-bun-expert.md +71 -0
- package/templates/.codex/agents/tool-npm-expert.md +88 -0
- package/templates/.codex/agents/tool-optimizer.md +87 -0
- package/templates/.codex/codex-native-hash.txt +1 -0
- package/templates/.codex/contexts/dev.md +20 -0
- package/templates/.codex/contexts/ecomode.md +63 -0
- package/templates/.codex/contexts/index.yaml +41 -0
- package/templates/.codex/contexts/research.md +28 -0
- package/templates/.codex/contexts/review.md +23 -0
- package/templates/.codex/hooks/hooks.json +151 -0
- package/templates/.codex/install-hooks.sh +100 -0
- package/templates/.codex/rules/MAY-optimization.md +93 -0
- package/templates/.codex/rules/MUST-agent-design.md +162 -0
- package/templates/.codex/rules/MUST-agent-identification.md +108 -0
- package/templates/.codex/rules/MUST-continuous-improvement.md +132 -0
- package/templates/.codex/rules/MUST-intent-transparency.md +199 -0
- package/templates/.codex/rules/MUST-language-policy.md +62 -0
- package/templates/.codex/rules/MUST-orchestrator-coordination.md +471 -0
- package/templates/.codex/rules/MUST-parallel-execution.md +469 -0
- package/templates/.codex/rules/MUST-permissions.md +84 -0
- package/templates/.codex/rules/MUST-safety.md +69 -0
- package/templates/.codex/rules/MUST-sync-verification.md +281 -0
- package/templates/.codex/rules/MUST-tool-identification.md +195 -0
- package/templates/.codex/rules/SHOULD-agent-teams.md +183 -0
- package/templates/.codex/rules/SHOULD-ecomode.md +145 -0
- package/templates/.codex/rules/SHOULD-error-handling.md +102 -0
- package/templates/.codex/rules/SHOULD-hud-statusline.md +112 -0
- package/templates/.codex/rules/SHOULD-interaction.md +103 -0
- package/templates/.codex/rules/SHOULD-memory-integration.md +132 -0
- package/templates/.codex/rules/index.yaml +141 -0
- package/templates/.codex/skills/airflow-best-practices/SKILL.md +56 -0
- package/templates/.codex/skills/audit-agents/SKILL.md +116 -0
- package/templates/.codex/skills/aws-best-practices/SKILL.md +280 -0
- package/templates/.codex/skills/claude-code-bible/SKILL.md +180 -0
- package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
- package/templates/.codex/skills/create-agent/SKILL.md +91 -0
- package/templates/.codex/skills/dbt-best-practices/SKILL.md +54 -0
- package/templates/.codex/skills/de-lead-routing/SKILL.md +230 -0
- package/templates/.codex/skills/dev-lead-routing/SKILL.md +253 -0
- package/templates/.codex/skills/dev-refactor/SKILL.md +123 -0
- package/templates/.codex/skills/dev-review/SKILL.md +81 -0
- package/templates/.codex/skills/docker-best-practices/SKILL.md +275 -0
- package/templates/.codex/skills/fastapi-best-practices/SKILL.md +270 -0
- package/templates/.codex/skills/fix-refs/SKILL.md +107 -0
- package/templates/.codex/skills/go-backend-best-practices/SKILL.md +338 -0
- package/templates/.codex/skills/go-best-practices/CLAUDE.md +9 -0
- package/templates/.codex/skills/go-best-practices/SKILL.md +203 -0
- package/templates/.codex/skills/help/SKILL.md +125 -0
- package/templates/.codex/skills/intent-detection/SKILL.md +215 -0
- package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +349 -0
- package/templates/.codex/skills/kafka-best-practices/SKILL.md +52 -0
- package/templates/.codex/skills/kotlin-best-practices/SKILL.md +256 -0
- package/templates/.codex/skills/lists/SKILL.md +78 -0
- package/templates/.codex/skills/memory-management/SKILL.md +195 -0
- package/templates/.codex/skills/memory-recall/SKILL.md +152 -0
- package/templates/.codex/skills/memory-save/SKILL.md +126 -0
- package/templates/.codex/skills/monitoring-setup/SKILL.md +115 -0
- package/templates/.codex/skills/npm-audit/SKILL.md +72 -0
- package/templates/.codex/skills/npm-publish/SKILL.md +63 -0
- package/templates/.codex/skills/npm-version/SKILL.md +75 -0
- package/templates/.codex/skills/optimize-analyze/SKILL.md +55 -0
- package/templates/.codex/skills/optimize-bundle/SKILL.md +67 -0
- package/templates/.codex/skills/optimize-report/SKILL.md +74 -0
- package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +83 -0
- package/templates/.codex/skills/postgres-best-practices/SKILL.md +66 -0
- package/templates/.codex/skills/python-best-practices/SKILL.md +222 -0
- package/templates/.codex/skills/qa-lead-routing/SKILL.md +277 -0
- package/templates/.codex/skills/react-best-practices/SKILL.md +101 -0
- package/templates/.codex/skills/redis-best-practices/SKILL.md +83 -0
- package/templates/.codex/skills/result-aggregation/SKILL.md +164 -0
- package/templates/.codex/skills/rust-best-practices/SKILL.md +267 -0
- package/templates/.codex/skills/sauron-watch/SKILL.md +144 -0
- package/templates/.codex/skills/secretary-routing/SKILL.md +190 -0
- package/templates/.codex/skills/snowflake-best-practices/SKILL.md +65 -0
- package/templates/.codex/skills/spark-best-practices/SKILL.md +52 -0
- package/templates/.codex/skills/springboot-best-practices/SKILL.md +357 -0
- package/templates/.codex/skills/status/SKILL.md +153 -0
- package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +99 -0
- package/templates/.codex/skills/typescript-best-practices/SKILL.md +321 -0
- package/templates/.codex/skills/update-docs/SKILL.md +140 -0
- package/templates/.codex/skills/update-external/SKILL.md +149 -0
- package/templates/.codex/skills/vercel-deploy/SKILL.md +73 -0
- package/templates/.codex/skills/web-design-guidelines/SKILL.md +118 -0
- package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +64 -0
- package/templates/.codex/uninstall-hooks.sh +52 -0
- package/templates/AGENTS.md.en +39 -0
- package/templates/AGENTS.md.ko +39 -0
- package/templates/CLAUDE.md.en +7 -5
- package/templates/CLAUDE.md.ko +7 -5
- package/templates/guides/airflow/README.md +32 -0
- package/templates/guides/dbt/README.md +32 -0
- package/templates/guides/iceberg/README.md +49 -0
- package/templates/guides/kafka/README.md +32 -0
- package/templates/guides/postgres/README.md +58 -0
- package/templates/guides/redis/README.md +50 -0
- package/templates/guides/snowflake/README.md +32 -0
- package/templates/guides/spark/README.md +32 -0
- package/templates/manifest.codex.json +43 -0
- package/templates/manifest.json +5 -5
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# [SHOULD] Ecomode Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: SHOULD - Recommended for token efficiency
|
|
4
|
+
> **ID**: R013
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
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
|
+
```
|
|
21
|
+
|
|
22
|
+
## Behaviors
|
|
23
|
+
|
|
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:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
[Batch Complete] {n}/{total}
|
|
47
|
+
├── {agent}: {icon} {summary}
|
|
48
|
+
├── {agent}: {icon} {summary}
|
|
49
|
+
└── {agent}: {icon} {summary}
|
|
50
|
+
```
|
|
51
|
+
|
|
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
|
+
```
|
|
66
|
+
|
|
67
|
+
## Secretary Ecomode Config
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
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
|
+
|
|
81
|
+
```
|
|
82
|
+
┌─ Agent: lang-golang-expert (sw-engineer)
|
|
83
|
+
├─ Skill: go-best-practices
|
|
84
|
+
└─ Task: Reviewing src/main.go
|
|
85
|
+
|
|
86
|
+
Reading file...
|
|
87
|
+
[lang-golang-expert → Read] src/main.go
|
|
88
|
+
|
|
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
|
+
```
|
|
132
|
+
|
|
133
|
+
## Override
|
|
134
|
+
|
|
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
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# [SHOULD] Error Handling Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: SHOULD - Strongly recommended
|
|
4
|
+
> **Goal**: Safe failure, fast recovery
|
|
5
|
+
|
|
6
|
+
## Error Classification
|
|
7
|
+
|
|
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
|
+
```
|
|
37
|
+
|
|
38
|
+
## Error Report Format
|
|
39
|
+
|
|
40
|
+
```
|
|
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
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Preventive Validation
|
|
74
|
+
|
|
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
|
+
```
|
|
89
|
+
|
|
90
|
+
## Error Logging
|
|
91
|
+
|
|
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
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# [SHOULD] HUD Statusline Rules
|
|
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.
|
|
9
|
+
|
|
10
|
+
## Format
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
─── [Agent] {name} | [Progress] {n}/{total} | [Parallel] {count} ───
|
|
14
|
+
```
|
|
15
|
+
|
|
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
|
+
## When to Display
|
|
78
|
+
|
|
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 |
|
|
85
|
+
|
|
86
|
+
## Hook Usage
|
|
87
|
+
|
|
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:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
─── [Spawn] {subagent_type}:{model} | {description} ───
|
|
94
|
+
─── [Resume] {subagent_type}:{model} | {description} ───
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```
|
|
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 ───
|
|
104
|
+
```
|
|
105
|
+
|
|
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) |
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# [SHOULD] Interaction Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: SHOULD - Strongly recommended
|
|
4
|
+
> **Exception**: Emergency or explicit user request
|
|
5
|
+
|
|
6
|
+
## Response Principles
|
|
7
|
+
|
|
8
|
+
### 1. Brevity
|
|
9
|
+
```
|
|
10
|
+
✓ Key information first
|
|
11
|
+
✓ Skip unnecessary preamble
|
|
12
|
+
✓ Answer only what's asked
|
|
13
|
+
✗ Over-explanation
|
|
14
|
+
✗ Repetitive confirmation
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 2. Clarity
|
|
18
|
+
```
|
|
19
|
+
✓ Specific expressions
|
|
20
|
+
✓ Unambiguous instructions
|
|
21
|
+
✓ Executable code format
|
|
22
|
+
✗ Abstract descriptions only
|
|
23
|
+
✗ Overuse of "maybe", "probably"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 3. Transparency
|
|
27
|
+
```
|
|
28
|
+
✓ State actions performed
|
|
29
|
+
✓ Report changes
|
|
30
|
+
✓ Acknowledge uncertainty
|
|
31
|
+
✗ Hide actions
|
|
32
|
+
✗ Present guesses as facts
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Status Report Format
|
|
36
|
+
|
|
37
|
+
### Start
|
|
38
|
+
```
|
|
39
|
+
[Start] {task name}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### In Progress
|
|
43
|
+
```
|
|
44
|
+
[Progress] {current step} ({n}/{total})
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Complete
|
|
48
|
+
```
|
|
49
|
+
[Done] {task name}
|
|
50
|
+
Result: {summary}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Failed
|
|
54
|
+
```
|
|
55
|
+
[Failed] {task name}
|
|
56
|
+
Cause: {reason}
|
|
57
|
+
Alternative: {possible solutions}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Handling Requests
|
|
61
|
+
|
|
62
|
+
### Clear Request
|
|
63
|
+
→ Execute immediately
|
|
64
|
+
|
|
65
|
+
### Ambiguous Request
|
|
66
|
+
```
|
|
67
|
+
[Confirm]
|
|
68
|
+
Understood "{request}" as {interpretation}.
|
|
69
|
+
|
|
70
|
+
Proceed?
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Risky Request
|
|
74
|
+
```
|
|
75
|
+
[Warning]
|
|
76
|
+
This action has {risk factor}.
|
|
77
|
+
|
|
78
|
+
Continue?
|
|
79
|
+
- Yes: {action to perform}
|
|
80
|
+
- No: Cancel
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Multiple Tasks
|
|
84
|
+
|
|
85
|
+
### Order
|
|
86
|
+
1. Dependent tasks: Sequential
|
|
87
|
+
2. Independent tasks: Parallel allowed
|
|
88
|
+
|
|
89
|
+
### Report
|
|
90
|
+
```
|
|
91
|
+
[Task 1/3] Done - {result}
|
|
92
|
+
[Task 2/3] In progress...
|
|
93
|
+
[Task 3/3] Pending
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Long-running Tasks
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
[In Progress] {task name}
|
|
100
|
+
Elapsed: {time}
|
|
101
|
+
Current: {step}
|
|
102
|
+
Remaining: {work left}
|
|
103
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# [SHOULD] Memory Integration Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: SHOULD - Recommended for context persistence
|
|
4
|
+
> **ID**: R011
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Provide persistent memory for agents using Claude Code's native auto memory system.
|
|
9
|
+
|
|
10
|
+
## Architecture: Native First
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Primary: Native Auto Memory (memory field in agent frontmatter)
|
|
14
|
+
- Agent-specific persistent knowledge
|
|
15
|
+
- Automatic system prompt injection (MEMORY.md)
|
|
16
|
+
- No external dependencies
|
|
17
|
+
|
|
18
|
+
Supplementary: claude-mem MCP (optional)
|
|
19
|
+
- Session-level temporal observations
|
|
20
|
+
- Cross-agent semantic search
|
|
21
|
+
- Only if installed and configured
|
|
22
|
+
|
|
23
|
+
RULE: If native auto memory can handle the task,
|
|
24
|
+
DO NOT use claude-mem.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Native Auto Memory
|
|
28
|
+
|
|
29
|
+
### How It Works
|
|
30
|
+
|
|
31
|
+
1. Agent frontmatter includes `memory` field:
|
|
32
|
+
```yaml
|
|
33
|
+
memory: project # or user, local
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. System automatically:
|
|
37
|
+
- Creates memory directory for the agent
|
|
38
|
+
- Loads first 200 lines of MEMORY.md into system prompt
|
|
39
|
+
- Enables Read/Write/Edit tools for memory directory
|
|
40
|
+
- Agent learns and records patterns across conversations
|
|
41
|
+
|
|
42
|
+
### Memory Scopes
|
|
43
|
+
|
|
44
|
+
| Scope | Location | Use Case | Git Tracked |
|
|
45
|
+
|-------|----------|----------|-------------|
|
|
46
|
+
| `user` | `~/.codex/agent-memory/<name>/` | Cross-project patterns | No |
|
|
47
|
+
| `project` | `.codex/agent-memory/<name>/` | Project-specific patterns | Yes |
|
|
48
|
+
| `local` | `.codex/agent-memory-local/<name>/` | Local-only knowledge | No |
|
|
49
|
+
|
|
50
|
+
### Current Agent Memory Map
|
|
51
|
+
|
|
52
|
+
| Scope | Agents | Count |
|
|
53
|
+
|-------|--------|-------|
|
|
54
|
+
| `project` | lang-*, be-*, fe-*, arch-*, tool-*, qa-*, mgr-creator, mgr-updater, mgr-gitnerd, mgr-sauron, mgr-claude-code-bible, sys-memory-keeper | 28 |
|
|
55
|
+
| `user` | infra-docker-expert, infra-aws-expert, db-supabase-expert | 3 |
|
|
56
|
+
| `local` | mgr-supplier, mgr-sync-checker, sys-naggy | 3 |
|
|
57
|
+
|
|
58
|
+
### Memory Best Practices
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
do:
|
|
62
|
+
- Let agents consult memory before starting work
|
|
63
|
+
- Update memory after discovering patterns or conventions
|
|
64
|
+
- Keep MEMORY.md under 200 lines (auto-curate if exceeded)
|
|
65
|
+
- Use separate topic files for detailed notes
|
|
66
|
+
|
|
67
|
+
dont:
|
|
68
|
+
- Store sensitive data (API keys, credentials)
|
|
69
|
+
- Duplicate information already in AGENTS.md
|
|
70
|
+
- Use memory for temporary session state
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Claude-mem (Optional Supplement)
|
|
74
|
+
|
|
75
|
+
claude-mem MCP provides session-level observations and semantic search.
|
|
76
|
+
It is NOT required for basic memory functionality.
|
|
77
|
+
|
|
78
|
+
### When to Use claude-mem
|
|
79
|
+
|
|
80
|
+
| Scenario | Use Native Memory | Use claude-mem |
|
|
81
|
+
|----------|------------------|---------------|
|
|
82
|
+
| Agent learns project patterns | Yes | |
|
|
83
|
+
| Record debugging insights | Yes | |
|
|
84
|
+
| Search across multiple sessions | | Yes |
|
|
85
|
+
| Temporal queries (date-based) | | Yes |
|
|
86
|
+
| Cross-agent knowledge sharing | | Yes |
|
|
87
|
+
| Basic context persistence | Yes | |
|
|
88
|
+
|
|
89
|
+
### claude-mem Integration (if installed)
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
provider: claude-mem
|
|
93
|
+
collection: claude_memories
|
|
94
|
+
project_tag: my-project
|
|
95
|
+
status: optional
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Context Compaction
|
|
99
|
+
|
|
100
|
+
### Compaction Controls
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
# Targeted compaction - preserve specific context
|
|
104
|
+
/compact focus on {topic}
|
|
105
|
+
|
|
106
|
+
# Examples
|
|
107
|
+
/compact focus on agent routing decisions
|
|
108
|
+
/compact focus on authentication implementation
|
|
109
|
+
/compact focus on test failures and fixes
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Best Practices
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
do:
|
|
116
|
+
- Use /compact focus when nearing context limits
|
|
117
|
+
- Focus on the most relevant topic for current work
|
|
118
|
+
- Let auto-compaction handle routine cleanup
|
|
119
|
+
|
|
120
|
+
dont:
|
|
121
|
+
- Manually compact when not near limits
|
|
122
|
+
- Lose important decision context by unfocused compaction
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Error Handling
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
on_memory_write_failure:
|
|
129
|
+
- Log error
|
|
130
|
+
- Continue without blocking main task
|
|
131
|
+
- Memory is enhancement, not requirement
|
|
132
|
+
```
|