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,23 @@
|
|
|
1
|
+
# Code Review Context
|
|
2
|
+
|
|
3
|
+
Mode: PR review and code analysis
|
|
4
|
+
Focus: Quality, security, maintainability
|
|
5
|
+
|
|
6
|
+
## Behavior
|
|
7
|
+
- Read thoroughly before commenting
|
|
8
|
+
- Organize findings by severity
|
|
9
|
+
- Suggest fixes, not just problems
|
|
10
|
+
- Check for security vulnerabilities
|
|
11
|
+
|
|
12
|
+
## Review Checklist
|
|
13
|
+
1. Logic correctness and edge cases
|
|
14
|
+
2. Error handling and exceptions
|
|
15
|
+
3. Security concerns (injection, credentials)
|
|
16
|
+
4. Performance implications
|
|
17
|
+
5. Code readability
|
|
18
|
+
6. Test coverage
|
|
19
|
+
|
|
20
|
+
## Output Format
|
|
21
|
+
- Group by file
|
|
22
|
+
- Sort by severity (critical > high > medium > low)
|
|
23
|
+
- Provide actionable suggestions
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "tool == \"Bash\" && tool_input.command matches \"(npm run dev|pnpm( run)? dev|yarn dev|bun run dev)\"",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command // \"\"')\n\n# Block dev servers that aren't run in tmux\necho '[Hook] BLOCKED: Dev server must run in tmux for log access' >&2\necho '[Hook] Use this command instead:' >&2\necho \"[Hook] tmux new-session -d -s dev 'npm run dev'\" >&2\necho '[Hook] Then: tmux attach -t dev' >&2\nexit 1"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"description": "Block dev servers outside tmux - ensures you can access logs"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"matcher": "tool == \"Bash\" && tool_input.command matches \"(npm (install|test)|pnpm (install|test)|yarn (install|test)|bun (install|test)|cargo build|make|docker|pytest|vitest|playwright)\"",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "#!/bin/bash\ninput=$(cat)\nif [ -z \"$TMUX\" ]; then\n echo '[Hook] Consider running in tmux for session persistence' >&2\n echo '[Hook] tmux new -s dev | tmux attach -t dev' >&2\nfi\necho \"$input\""
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"description": "Reminder to use tmux for long-running commands"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"matcher": "tool == \"Bash\" && tool_input.command matches \"git push\"",
|
|
27
|
+
"hooks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "#!/bin/bash\necho '[Hook] Review changes before push...' >&2\necho '[Hook] Press Enter to continue with push or Ctrl+C to abort...' >&2\nread -r"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"description": "Pause before git push to review changes"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"matcher": "tool == \"Write\" && tool_input.file_path matches \"\\\\.(md|txt)$\" && !(tool_input.file_path matches \"README\\\\.md|CLAUDE\\\\.md|AGENT\\\\.md|SKILL\\\\.md\")",
|
|
37
|
+
"hooks": [
|
|
38
|
+
{
|
|
39
|
+
"type": "command",
|
|
40
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [[ \"$file_path\" =~ \\.(md|txt)$ ]] && [[ ! \"$file_path\" =~ (README|CLAUDE|AGENT|SKILL)\\.md$ ]]; then\n echo \"[Hook] BLOCKED: Unnecessary documentation file creation\" >&2\n echo \"[Hook] File: $file_path\" >&2\n echo \"[Hook] Use README.md or AGENT.md for documentation instead\" >&2\n exit 1\nfi\n\necho \"$input\""
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"description": "Block creation of random .md files - keeps docs consolidated"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"matcher": "tool == \"Edit\" || tool == \"Write\"",
|
|
47
|
+
"hooks": [
|
|
48
|
+
{
|
|
49
|
+
"type": "command",
|
|
50
|
+
"command": "#!/bin/bash\nCOUNTER_FILE=\"/tmp/claude-tool-count-$$\"\nTHRESHOLD=${COMPACT_THRESHOLD:-50}\nif [ -f \"$COUNTER_FILE\" ]; then COUNT=$(cat \"$COUNTER_FILE\"); COUNT=$((COUNT + 1)); else COUNT=1; fi\necho \"$COUNT\" > \"$COUNTER_FILE\"\nif [ \"$COUNT\" -eq \"$THRESHOLD\" ]; then echo '[StrategicCompact] Reached '$THRESHOLD' tool calls' >&2; echo '[StrategicCompact] Consider /compact if at a logical breakpoint' >&2; fi\nif [ \"$COUNT\" -gt \"$THRESHOLD\" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then echo \"[StrategicCompact] $COUNT tool calls - /compact reminder\" >&2; fi\ncat"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"description": "Suggest manual compaction at logical intervals"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"matcher": "tool == \"Task\"",
|
|
57
|
+
"hooks": [
|
|
58
|
+
{
|
|
59
|
+
"type": "command",
|
|
60
|
+
"command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"description": "HUD statusline - show subagent_type, model, and description on Task spawn"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"PostToolUse": [
|
|
67
|
+
{
|
|
68
|
+
"matcher": "tool == \"Bash\"",
|
|
69
|
+
"hooks": [
|
|
70
|
+
{
|
|
71
|
+
"type": "command",
|
|
72
|
+
"command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command')\n\nif echo \"$cmd\" | grep -qE 'gh pr create'; then\n output=$(echo \"$input\" | jq -r '.tool_output.output // \"\"')\n pr_url=$(echo \"$output\" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+')\n \n if [ -n \"$pr_url\" ]; then\n echo \"[Hook] PR created: $pr_url\" >&2\n echo \"[Hook] Checking GitHub Actions status...\" >&2\n repo=$(echo \"$pr_url\" | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/[0-9]+|\\1|')\n pr_num=$(echo \"$pr_url\" | sed -E 's|.*/pull/([0-9]+)|\\1|')\n echo \"[Hook] To review PR: gh pr review $pr_num --repo $repo\" >&2\n fi\nfi\n\necho \"$input\""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"description": "Log PR URL and provide review command after PR creation"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
|
|
79
|
+
"hooks": [
|
|
80
|
+
{
|
|
81
|
+
"type": "command",
|
|
82
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v prettier >/dev/null 2>&1; then\n prettier --write \"$file_path\" 2>&1 | head -5 >&2\n fi\nfi\n\necho \"$input\""
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"description": "Auto-format JS/TS files with Prettier after edits"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx)$\"",
|
|
89
|
+
"hooks": [
|
|
90
|
+
{
|
|
91
|
+
"type": "command",
|
|
92
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/package.json\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/tsconfig.json\" ]; then\n cd \"$project_root\" && npx tsc --noEmit --pretty false 2>&1 | grep \"$file_path\" | head -10 >&2 || true\n fi\nfi\n\necho \"$input\""
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"description": "TypeScript check after editing .ts/.tsx files"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
|
|
99
|
+
"hooks": [
|
|
100
|
+
{
|
|
101
|
+
"type": "command",
|
|
102
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n console_logs=$(grep -n \"console\\\\.log\" \"$file_path\" 2>/dev/null || true)\n \n if [ -n \"$console_logs\" ]; then\n echo \"[Hook] WARNING: console.log found in $file_path\" >&2\n echo \"$console_logs\" | head -5 >&2\n echo \"[Hook] Remove console.log before committing\" >&2\n fi\nfi\n\necho \"$input\""
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"description": "Warn about console.log statements after edits"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(go)$\"",
|
|
109
|
+
"hooks": [
|
|
110
|
+
{
|
|
111
|
+
"type": "command",
|
|
112
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v gofmt >/dev/null 2>&1; then\n gofmt -w \"$file_path\" 2>&1 >&2\n fi\nfi\n\necho \"$input\""
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"description": "Auto-format Go files with gofmt after edits"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
|
|
119
|
+
"hooks": [
|
|
120
|
+
{
|
|
121
|
+
"type": "command",
|
|
122
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Format with ruff\n if command -v ruff >/dev/null 2>&1; then\n ruff format --quiet \"$file_path\" 2>&1 >&2\n ruff check --fix --quiet \"$file_path\" 2>&1 >&2 || true\n echo \"[Hook] Python formatted with ruff\" >&2\n fi\nfi\n\necho \"$input\""
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"description": "Auto-format and lint Python files with ruff after edits"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(py)$\"",
|
|
129
|
+
"hooks": [
|
|
130
|
+
{
|
|
131
|
+
"type": "command",
|
|
132
|
+
"command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Type check with ty\n if command -v ty >/dev/null 2>&1; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/pyproject.toml\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/pyproject.toml\" ]; then\n cd \"$project_root\" && ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n else\n ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n fi\n fi\nfi\n\necho \"$input\""
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"description": "Type check Python files with ty after edits"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"Stop": [
|
|
139
|
+
{
|
|
140
|
+
"matcher": "*",
|
|
141
|
+
"hooks": [
|
|
142
|
+
{
|
|
143
|
+
"type": "command",
|
|
144
|
+
"command": "#!/bin/bash\ninput=$(cat)\n\nif git rev-parse --git-dir > /dev/null 2>&1; then\n modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\\.(ts|tsx|js|jsx)$' || true)\n \n if [ -n \"$modified_files\" ]; then\n has_console=false\n while IFS= read -r file; do\n if [ -f \"$file\" ]; then\n if grep -q \"console\\.log\" \"$file\" 2>/dev/null; then\n echo \"[Hook] WARNING: console.log found in $file\" >&2\n has_console=true\n fi\n fi\n done <<< \"$modified_files\"\n \n if [ \"$has_console\" = true ]; then\n echo \"[Hook] Remove console.log statements before committing\" >&2\n fi\n fi\nfi\n\necho \"$input\""
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"description": "Final audit for console.log in modified files before session ends"
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -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
|
+
```
|