oh-my-customcode 0.1.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/LICENSE +21 -0
- package/README.md +287 -0
- package/dist/cli/index.js +13299 -0
- package/dist/index.js +927 -0
- package/package.json +74 -0
- package/templates/.claude/contexts/dev.md +20 -0
- package/templates/.claude/contexts/ecomode.md +63 -0
- package/templates/.claude/contexts/index.yaml +41 -0
- package/templates/.claude/contexts/research.md +28 -0
- package/templates/.claude/contexts/review.md +23 -0
- package/templates/.claude/hooks/hooks.json +185 -0
- package/templates/.claude/hooks/hud/index.yaml +27 -0
- package/templates/.claude/hooks/hud/update-status.sh +32 -0
- package/templates/.claude/hooks/index.yaml +46 -0
- package/templates/.claude/hooks/memory-persistence/pre-compact.sh +37 -0
- package/templates/.claude/hooks/memory-persistence/session-end.sh +64 -0
- package/templates/.claude/hooks/memory-persistence/session-start.sh +41 -0
- package/templates/.claude/hooks/strategic-compact/suggest-compact.sh +50 -0
- package/templates/.claude/install-hooks.sh +100 -0
- package/templates/.claude/rules/MAY-optimization.md +93 -0
- package/templates/.claude/rules/MUST-agent-design.md +107 -0
- package/templates/.claude/rules/MUST-agent-identification.md +108 -0
- package/templates/.claude/rules/MUST-continuous-improvement.md +132 -0
- package/templates/.claude/rules/MUST-intent-transparency.md +199 -0
- package/templates/.claude/rules/MUST-language-policy.md +62 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +266 -0
- package/templates/.claude/rules/MUST-parallel-execution.md +341 -0
- package/templates/.claude/rules/MUST-permissions.md +84 -0
- package/templates/.claude/rules/MUST-safety.md +69 -0
- package/templates/.claude/rules/MUST-sync-verification.md +219 -0
- package/templates/.claude/rules/MUST-tool-identification.md +112 -0
- package/templates/.claude/rules/SHOULD-ecomode.md +145 -0
- package/templates/.claude/rules/SHOULD-error-handling.md +102 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +89 -0
- package/templates/.claude/rules/SHOULD-interaction.md +103 -0
- package/templates/.claude/rules/SHOULD-memory-integration.md +114 -0
- package/templates/.claude/rules/SHOULD-pipeline-mode.md +165 -0
- package/templates/.claude/rules/index.yaml +125 -0
- package/templates/.claude/uninstall-hooks.sh +52 -0
- package/templates/CLAUDE.md.en +259 -0
- package/templates/CLAUDE.md.ko +259 -0
- package/templates/agents/index.yaml +237 -0
- package/templates/agents/infra-engineer/aws-expert/AGENT.md +47 -0
- package/templates/agents/infra-engineer/aws-expert/index.yaml +27 -0
- package/templates/agents/infra-engineer/docker-expert/AGENT.md +47 -0
- package/templates/agents/infra-engineer/docker-expert/index.yaml +27 -0
- package/templates/agents/manager/creator/AGENT.md +274 -0
- package/templates/agents/manager/creator/index.yaml +66 -0
- package/templates/agents/manager/gitnerd/AGENT.md +91 -0
- package/templates/agents/manager/gitnerd/index.yaml +55 -0
- package/templates/agents/manager/sauron/AGENT.md +153 -0
- package/templates/agents/manager/sauron/index.yaml +52 -0
- package/templates/agents/manager/supplier/AGENT.md +142 -0
- package/templates/agents/manager/supplier/index.yaml +31 -0
- package/templates/agents/manager/sync-checker/AGENT.md +34 -0
- package/templates/agents/manager/sync-checker/index.yaml +32 -0
- package/templates/agents/manager/updater/AGENT.md +125 -0
- package/templates/agents/manager/updater/index.yaml +31 -0
- package/templates/agents/orchestrator/dev-lead/AGENT.md +116 -0
- package/templates/agents/orchestrator/dev-lead/index.yaml +73 -0
- package/templates/agents/orchestrator/planner/AGENT.md +102 -0
- package/templates/agents/orchestrator/planner/index.yaml +38 -0
- package/templates/agents/orchestrator/qa-lead/AGENT.md +92 -0
- package/templates/agents/orchestrator/qa-lead/index.yaml +40 -0
- package/templates/agents/orchestrator/secretary/AGENT.md +132 -0
- package/templates/agents/orchestrator/secretary/index.yaml +55 -0
- package/templates/agents/qa-team/qa-engineer/AGENT.md +98 -0
- package/templates/agents/qa-team/qa-engineer/index.yaml +59 -0
- package/templates/agents/qa-team/qa-planner/AGENT.md +75 -0
- package/templates/agents/qa-team/qa-planner/index.yaml +47 -0
- package/templates/agents/qa-team/qa-writer/AGENT.md +98 -0
- package/templates/agents/qa-team/qa-writer/index.yaml +44 -0
- package/templates/agents/sw-architect/documenter/AGENT.md +120 -0
- package/templates/agents/sw-architect/documenter/index.yaml +39 -0
- package/templates/agents/sw-architect/speckit-agent/AGENT.md +127 -0
- package/templates/agents/sw-architect/speckit-agent/index.yaml +78 -0
- package/templates/agents/sw-engineer/backend/express-expert/AGENT.md +132 -0
- package/templates/agents/sw-engineer/backend/express-expert/index.yaml +36 -0
- package/templates/agents/sw-engineer/backend/fastapi-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/backend/fastapi-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/backend/go-backend-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/backend/go-backend-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/backend/nestjs-expert/AGENT.md +107 -0
- package/templates/agents/sw-engineer/backend/nestjs-expert/index.yaml +43 -0
- package/templates/agents/sw-engineer/backend/springboot-expert/AGENT.md +103 -0
- package/templates/agents/sw-engineer/backend/springboot-expert/index.yaml +69 -0
- package/templates/agents/sw-engineer/frontend/svelte-agent/AGENT.md +71 -0
- package/templates/agents/sw-engineer/frontend/svelte-agent/index.yaml +41 -0
- package/templates/agents/sw-engineer/frontend/vercel-agent/AGENT.md +67 -0
- package/templates/agents/sw-engineer/frontend/vercel-agent/index.yaml +43 -0
- package/templates/agents/sw-engineer/frontend/vuejs-agent/AGENT.md +71 -0
- package/templates/agents/sw-engineer/frontend/vuejs-agent/index.yaml +48 -0
- package/templates/agents/sw-engineer/language/golang-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/golang-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/java21-expert/AGENT.md +122 -0
- package/templates/agents/sw-engineer/language/java21-expert/index.yaml +51 -0
- package/templates/agents/sw-engineer/language/kotlin-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/kotlin-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/python-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/python-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/rust-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/rust-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/typescript-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/typescript-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/tooling/bun-expert/AGENT.md +73 -0
- package/templates/agents/sw-engineer/tooling/bun-expert/index.yaml +46 -0
- package/templates/agents/sw-engineer/tooling/npm-expert/AGENT.md +160 -0
- package/templates/agents/sw-engineer/tooling/npm-expert/index.yaml +45 -0
- package/templates/agents/sw-engineer/tooling/optimizer/AGENT.md +170 -0
- package/templates/agents/sw-engineer/tooling/optimizer/index.yaml +45 -0
- package/templates/agents/system/memory-keeper/AGENT.md +126 -0
- package/templates/agents/system/memory-keeper/index.yaml +45 -0
- package/templates/agents/system/naggy/AGENT.md +72 -0
- package/templates/agents/system/naggy/index.yaml +35 -0
- package/templates/commands/COMMANDS.md +136 -0
- package/templates/commands/creator/agent.md +121 -0
- package/templates/commands/dev/refactor.md +126 -0
- package/templates/commands/dev/review.md +82 -0
- package/templates/commands/git/branch.yaml +8 -0
- package/templates/commands/git/commit.yaml +4 -0
- package/templates/commands/git/pr.yaml +4 -0
- package/templates/commands/git/status.yaml +4 -0
- package/templates/commands/git/sync.yaml +4 -0
- package/templates/commands/index.yaml +225 -0
- package/templates/commands/intent/explain.md +144 -0
- package/templates/commands/memory/recall.md +164 -0
- package/templates/commands/memory/save.md +128 -0
- package/templates/commands/naggy/add.yaml +8 -0
- package/templates/commands/naggy/done.yaml +8 -0
- package/templates/commands/naggy/list.yaml +4 -0
- package/templates/commands/naggy/priority.yaml +11 -0
- package/templates/commands/naggy/remind.yaml +4 -0
- package/templates/commands/npm/audit.yaml +62 -0
- package/templates/commands/npm/publish.yaml +52 -0
- package/templates/commands/npm/version.yaml +62 -0
- package/templates/commands/optimize/analyze.yaml +34 -0
- package/templates/commands/optimize/bundle.yaml +50 -0
- package/templates/commands/optimize/report.yaml +56 -0
- package/templates/commands/pipeline/list.md +81 -0
- package/templates/commands/pipeline/run.md +127 -0
- package/templates/commands/sauron/quick.yaml +4 -0
- package/templates/commands/sauron/report.yaml +4 -0
- package/templates/commands/sauron/watch.yaml +4 -0
- package/templates/commands/supplier/audit.md +133 -0
- package/templates/commands/supplier/fix.md +121 -0
- package/templates/commands/sync/agents.yaml +4 -0
- package/templates/commands/sync/check.yaml +4 -0
- package/templates/commands/sync/commands.yaml +4 -0
- package/templates/commands/sync/docs.yaml +4 -0
- package/templates/commands/sync/fix.yaml +4 -0
- package/templates/commands/system/help.md +137 -0
- package/templates/commands/system/lists.md +86 -0
- package/templates/commands/system/status.md +163 -0
- package/templates/commands/updater/docs.md +165 -0
- package/templates/commands/updater/external.md +214 -0
- package/templates/guides/aws/common-patterns.md +169 -0
- package/templates/guides/aws/index.yaml +26 -0
- package/templates/guides/aws/well-architected.md +143 -0
- package/templates/guides/claude-code/01-overview.md +42 -0
- package/templates/guides/claude-code/03-tools.md +107 -0
- package/templates/guides/claude-code/04-agent-skills.md +90 -0
- package/templates/guides/claude-code/05-agent-sdk.md +129 -0
- package/templates/guides/claude-code/06-mcp.md +165 -0
- package/templates/guides/claude-code/07-prompt-engineering.md +100 -0
- package/templates/guides/claude-code/08-testing.md +58 -0
- package/templates/guides/claude-code/09-guardrails.md +80 -0
- package/templates/guides/claude-code/10-monitoring.md +89 -0
- package/templates/guides/claude-code/index.yaml +51 -0
- package/templates/guides/docker/compose-best-practices.md +284 -0
- package/templates/guides/docker/dockerfile-best-practices.md +262 -0
- package/templates/guides/docker/index.yaml +26 -0
- package/templates/guides/fastapi/best-practices.md +232 -0
- package/templates/guides/fastapi/index.yaml +21 -0
- package/templates/guides/go-backend/index.yaml +26 -0
- package/templates/guides/go-backend/project-layout.md +243 -0
- package/templates/guides/go-backend/uber-style.md +212 -0
- package/templates/guides/golang/concurrency.md +282 -0
- package/templates/guides/golang/effective-go.md +309 -0
- package/templates/guides/golang/error-handling.md +250 -0
- package/templates/guides/golang/index.yaml +27 -0
- package/templates/guides/index.yaml +101 -0
- package/templates/guides/kotlin/coding-conventions.md +247 -0
- package/templates/guides/kotlin/idioms.md +234 -0
- package/templates/guides/kotlin/index.yaml +26 -0
- package/templates/guides/python/index.yaml +26 -0
- package/templates/guides/python/pep8-style-guide.md +202 -0
- package/templates/guides/python/zen-of-python.md +79 -0
- package/templates/guides/rust/error-handling.md +262 -0
- package/templates/guides/rust/index.yaml +26 -0
- package/templates/guides/rust/ownership.md +180 -0
- package/templates/guides/springboot/best-practices.md +361 -0
- package/templates/guides/springboot/index.yaml +22 -0
- package/templates/guides/typescript/advanced-types.md +225 -0
- package/templates/guides/typescript/index.yaml +26 -0
- package/templates/guides/typescript/type-system.md +219 -0
- package/templates/guides/web-design/accessibility.md +66 -0
- package/templates/guides/web-design/index.yaml +20 -0
- package/templates/guides/web-design/performance.md +102 -0
- package/templates/pipelines/examples/code-review.yaml +66 -0
- package/templates/pipelines/index.yaml +18 -0
- package/templates/pipelines/templates/pipeline-template.yaml +50 -0
- package/templates/skills/backend/fastapi-best-practices/SKILL.md +269 -0
- package/templates/skills/backend/fastapi-best-practices/index.yaml +25 -0
- package/templates/skills/backend/go-backend-best-practices/SKILL.md +337 -0
- package/templates/skills/backend/go-backend-best-practices/index.yaml +26 -0
- package/templates/skills/backend/springboot-best-practices/SKILL.md +356 -0
- package/templates/skills/backend/springboot-best-practices/index.yaml +27 -0
- package/templates/skills/development/go-best-practices/SKILL.md +202 -0
- package/templates/skills/development/go-best-practices/index.yaml +25 -0
- package/templates/skills/development/kotlin-best-practices/SKILL.md +255 -0
- package/templates/skills/development/kotlin-best-practices/index.yaml +27 -0
- package/templates/skills/development/python-best-practices/SKILL.md +221 -0
- package/templates/skills/development/python-best-practices/index.yaml +25 -0
- package/templates/skills/development/react-best-practices/SKILL.md +100 -0
- package/templates/skills/development/react-best-practices/index.yaml +39 -0
- package/templates/skills/development/rust-best-practices/SKILL.md +266 -0
- package/templates/skills/development/rust-best-practices/index.yaml +26 -0
- package/templates/skills/development/typescript-best-practices/SKILL.md +320 -0
- package/templates/skills/development/typescript-best-practices/index.yaml +28 -0
- package/templates/skills/development/vercel-deploy/SKILL.md +73 -0
- package/templates/skills/development/vercel-deploy/index.yaml +30 -0
- package/templates/skills/development/web-design-guidelines/SKILL.md +117 -0
- package/templates/skills/development/web-design-guidelines/index.yaml +34 -0
- package/templates/skills/index.yaml +129 -0
- package/templates/skills/infrastructure/aws-best-practices/SKILL.md +279 -0
- package/templates/skills/infrastructure/aws-best-practices/index.yaml +27 -0
- package/templates/skills/infrastructure/docker-best-practices/SKILL.md +274 -0
- package/templates/skills/infrastructure/docker-best-practices/index.yaml +26 -0
- package/templates/skills/orchestration/intent-detection/SKILL.md +214 -0
- package/templates/skills/orchestration/intent-detection/index.yaml +30 -0
- package/templates/skills/orchestration/intent-detection/patterns/agent-triggers.yaml +333 -0
- package/templates/skills/orchestration/pipeline-execution/SKILL.md +188 -0
- package/templates/skills/orchestration/pipeline-execution/index.yaml +27 -0
- package/templates/skills/system/memory-management/SKILL.md +194 -0
- package/templates/skills/system/memory-management/index.yaml +30 -0
- package/templates/skills/system/result-aggregation/SKILL.md +163 -0
- package/templates/skills/system/result-aggregation/index.yaml +36 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# [MUST] Sync Verification Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: MUST - ENFORCED after any structural changes
|
|
4
|
+
> **ID**: R017
|
|
5
|
+
> **Violation**: Committing without verification = Rule violation
|
|
6
|
+
|
|
7
|
+
## CRITICAL
|
|
8
|
+
|
|
9
|
+
**After modifying agents, skills, guides, commands, or pipelines, you MUST run the full verification process before committing.**
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
13
|
+
║ ⚠️ ABSOLUTE PROHIBITION ║
|
|
14
|
+
║ ║
|
|
15
|
+
║ DO NOT even ASK "커밋하시겠습니까?" after structural changes ║
|
|
16
|
+
║ until sauron:watch has been executed and passed. ║
|
|
17
|
+
║ ║
|
|
18
|
+
║ WRONG: ║
|
|
19
|
+
║ [Make changes] → "커밋하시겠습니까?" ║
|
|
20
|
+
║ ║
|
|
21
|
+
║ CORRECT: ║
|
|
22
|
+
║ [Make changes] → sauron:watch → [All pass] → "커밋할까요?" ║
|
|
23
|
+
║ ║
|
|
24
|
+
║ Asking to commit before verification = Rule violation ║
|
|
25
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
30
|
+
║ MANDATORY VERIFICATION PROCESS: ║
|
|
31
|
+
║ ║
|
|
32
|
+
║ Phase 1: Manager Agent Verification (5 rounds) ║
|
|
33
|
+
║ - supplier:audit ║
|
|
34
|
+
║ - sync-checker:check ║
|
|
35
|
+
║ - updater:docs ║
|
|
36
|
+
║ ║
|
|
37
|
+
║ Phase 2: Deep Review (3 rounds) ║
|
|
38
|
+
║ - Workflow alignment ║
|
|
39
|
+
║ - Reference verification ║
|
|
40
|
+
║ - Philosophy compliance ║
|
|
41
|
+
║ ║
|
|
42
|
+
║ Phase 3: Fix all issues ║
|
|
43
|
+
║ ║
|
|
44
|
+
║ Phase 4: Commit via gitnerd ║
|
|
45
|
+
║ ║
|
|
46
|
+
║ Skipping ANY phase = Rule violation ║
|
|
47
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Phase 1: Manager Agent Verification (5 Rounds)
|
|
51
|
+
|
|
52
|
+
Run manager agents 5 times to catch all issues:
|
|
53
|
+
|
|
54
|
+
### Round 1-2: Basic Sync
|
|
55
|
+
```
|
|
56
|
+
□ supplier:audit - Check all agent dependencies
|
|
57
|
+
□ sync-checker:check - Verify registry synchronization
|
|
58
|
+
□ Fix any issues found
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Round 3-4: Deep Sync
|
|
62
|
+
```
|
|
63
|
+
□ supplier:audit - Re-verify after fixes
|
|
64
|
+
□ sync-checker:check - Re-verify registries
|
|
65
|
+
□ updater:docs - Check documentation sync
|
|
66
|
+
□ Fix any remaining issues
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Round 5: Final Verification
|
|
70
|
+
```
|
|
71
|
+
□ All agent counts match (CLAUDE.md, index.yaml, actual files)
|
|
72
|
+
□ All symlinks valid
|
|
73
|
+
□ All command registries updated
|
|
74
|
+
□ All intent-detection triggers present
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Phase 2: Deep Review (3 Rounds)
|
|
78
|
+
|
|
79
|
+
### Deep Round 1: Workflow Alignment
|
|
80
|
+
```
|
|
81
|
+
□ Agent creation workflow documented and functional
|
|
82
|
+
□ Development workflow uses proper orchestrators
|
|
83
|
+
□ Deployment workflow defined (if applicable)
|
|
84
|
+
□ All orchestrators have complete `manages:` sections
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Deep Round 2: Reference Verification
|
|
88
|
+
```
|
|
89
|
+
□ All orchestrators properly reference their managed agents
|
|
90
|
+
□ All rules are properly referenced
|
|
91
|
+
□ No orphaned agents (not managed by any orchestrator)
|
|
92
|
+
□ No circular references
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Deep Round 3: Philosophy Compliance
|
|
96
|
+
```
|
|
97
|
+
□ R006: Separation of concerns (AGENT.md = role only, no details)
|
|
98
|
+
□ R009: Parallel execution enabled for orchestrators
|
|
99
|
+
□ R010: Multi-agent tasks use orchestrators
|
|
100
|
+
□ R007/R008: Agent/tool identification documented
|
|
101
|
+
□ All MUST rules enforced, SHOULD rules recommended
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Verification Checklist Summary
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Phase 1: Manager Verification (5x)
|
|
108
|
+
□ Round 1: supplier:audit
|
|
109
|
+
□ Round 2: sync-checker:check
|
|
110
|
+
□ Round 3: supplier:audit (re-verify)
|
|
111
|
+
□ Round 4: sync-checker:check + updater:docs
|
|
112
|
+
□ Round 5: Final count verification
|
|
113
|
+
|
|
114
|
+
Phase 2: Deep Review (3x)
|
|
115
|
+
□ Round 1: Workflow alignment
|
|
116
|
+
□ Round 2: Reference verification
|
|
117
|
+
□ Round 3: Philosophy compliance
|
|
118
|
+
|
|
119
|
+
Phase 3: Fix Issues
|
|
120
|
+
□ All issues from Phase 1 fixed
|
|
121
|
+
□ All issues from Phase 2 fixed
|
|
122
|
+
□ Re-run verification if major fixes made
|
|
123
|
+
|
|
124
|
+
Phase 4: Commit
|
|
125
|
+
□ Delegate to gitnerd
|
|
126
|
+
□ Meaningful commit message
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## When to Run Full Verification
|
|
130
|
+
|
|
131
|
+
| Action | Full Verification Required |
|
|
132
|
+
|--------|---------------------------|
|
|
133
|
+
| Create new agent | **YES** |
|
|
134
|
+
| Rename agent | **YES** |
|
|
135
|
+
| Move agent | **YES** |
|
|
136
|
+
| Delete agent | **YES** |
|
|
137
|
+
| Modify agent structure | **YES** |
|
|
138
|
+
| Add/modify skill | **YES** |
|
|
139
|
+
| Add/modify guide | **YES** |
|
|
140
|
+
| Add/modify command | **YES** |
|
|
141
|
+
| Add/modify pipeline | **YES** |
|
|
142
|
+
| Change orchestrator manages section | **YES** |
|
|
143
|
+
| Update rules | **YES** |
|
|
144
|
+
|
|
145
|
+
## Workflow Diagram
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
Content Change Made
|
|
149
|
+
│
|
|
150
|
+
▼
|
|
151
|
+
┌───────────────────────────────┐
|
|
152
|
+
│ Phase 1: Manager Verification │
|
|
153
|
+
│ (5 rounds) │
|
|
154
|
+
│ supplier → sync-checker → │
|
|
155
|
+
│ updater │
|
|
156
|
+
└───────────────┬───────────────┘
|
|
157
|
+
│
|
|
158
|
+
▼
|
|
159
|
+
┌───────────────────────────────┐
|
|
160
|
+
│ Phase 2: Deep Review │
|
|
161
|
+
│ (3 rounds) │
|
|
162
|
+
│ Workflow → References → │
|
|
163
|
+
│ Philosophy │
|
|
164
|
+
└───────────────┬───────────────┘
|
|
165
|
+
│
|
|
166
|
+
┌───────┴───────┐
|
|
167
|
+
▼ ▼
|
|
168
|
+
[Issues Found] [All Clean]
|
|
169
|
+
│ │
|
|
170
|
+
▼ │
|
|
171
|
+
Fix Issues │
|
|
172
|
+
│ │
|
|
173
|
+
└───────┬───────┘
|
|
174
|
+
│
|
|
175
|
+
▼
|
|
176
|
+
┌───────────────────────────────┐
|
|
177
|
+
│ Phase 4: Commit via gitnerd │
|
|
178
|
+
└───────────────────────────────┘
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Self-Check Before Commit
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
185
|
+
║ BEFORE COMMITTING, ASK YOURSELF: ║
|
|
186
|
+
║ ║
|
|
187
|
+
║ 1. Did I complete all 5 rounds of manager verification? ║
|
|
188
|
+
║ 2. Did I complete all 3 rounds of deep review? ║
|
|
189
|
+
║ 3. Did I fix ALL discovered issues? ║
|
|
190
|
+
║ 4. Are all counts matching across all sources? ║
|
|
191
|
+
║ 5. Am I delegating to gitnerd for the commit? ║
|
|
192
|
+
║ ║
|
|
193
|
+
║ If NO to ANY → DO NOT COMMIT ║
|
|
194
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Quick Verification Commands
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Agent count check
|
|
201
|
+
find agents -name "AGENT.md" | wc -l
|
|
202
|
+
|
|
203
|
+
# Broken symlinks
|
|
204
|
+
find agents -type l ! -exec test -e {} \; -print
|
|
205
|
+
|
|
206
|
+
# Index registry count
|
|
207
|
+
grep -c "name:" agents/index.yaml
|
|
208
|
+
|
|
209
|
+
# Intent trigger coverage
|
|
210
|
+
grep -c "keywords:" skills/orchestration/intent-detection/patterns/agent-triggers.yaml
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Integration with Other Rules
|
|
214
|
+
|
|
215
|
+
| Rule | Integration |
|
|
216
|
+
|------|-------------|
|
|
217
|
+
| R009 (Parallel) | Verification checks can run in parallel |
|
|
218
|
+
| R010 (Orchestrator) | Delegate commit to gitnerd |
|
|
219
|
+
| R016 (Improvement) | Update this rule if new issues found |
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# [MUST] Tool Usage Identification Rules
|
|
2
|
+
|
|
3
|
+
> **Priority**: MUST - ENFORCED, NO EXCEPTIONS
|
|
4
|
+
> **ID**: R008
|
|
5
|
+
> **Violation**: Immediate correction required
|
|
6
|
+
|
|
7
|
+
## CRITICAL
|
|
8
|
+
|
|
9
|
+
**EVERY tool call MUST be prefixed with agent identification. This is NON-NEGOTIABLE.**
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Before EVERY tool call, output:
|
|
13
|
+
[agent-name] → Tool: <tool-name>
|
|
14
|
+
[agent-name] → Target: <file/path/url>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Failure to identify tool usage = Rule violation = Must be corrected immediately.
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
Display which agent is using which tool for transparency and debugging. This extends R007 (Agent Identification) to cover tool operations.
|
|
22
|
+
|
|
23
|
+
## Tool Usage Format
|
|
24
|
+
|
|
25
|
+
When invoking a tool, prefix with agent identification:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
[agent-name] → Tool: <tool-name>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Examples
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
[golang-expert] → Tool: Read
|
|
35
|
+
[golang-expert] → Reading: src/main.go
|
|
36
|
+
|
|
37
|
+
[supplier] → Tool: Glob
|
|
38
|
+
[supplier] → Searching: agents/**/index.yaml
|
|
39
|
+
|
|
40
|
+
[creator] → Tool: Write
|
|
41
|
+
[creator] → Writing: agents/sw-engineer/new-agent/AGENT.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Extended Format (Verbose)
|
|
45
|
+
|
|
46
|
+
For detailed tracking:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
┌─ Agent: golang-expert (sw-engineer)
|
|
50
|
+
├─ Skill: go-best-practices
|
|
51
|
+
├─ Tool: Read
|
|
52
|
+
└─ Target: src/main.go
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tool Categories
|
|
56
|
+
|
|
57
|
+
| Category | Tools | Format |
|
|
58
|
+
|----------|-------|--------|
|
|
59
|
+
| File Read | Read, Glob, Grep | `→ Reading:` / `→ Searching:` |
|
|
60
|
+
| File Write | Write, Edit | `→ Writing:` / `→ Editing:` |
|
|
61
|
+
| Network | WebFetch | `→ Fetching:` |
|
|
62
|
+
| Execution | Bash, Task | `→ Running:` / `→ Spawning:` |
|
|
63
|
+
|
|
64
|
+
## When to Display
|
|
65
|
+
|
|
66
|
+
| Situation | Display |
|
|
67
|
+
|-----------|---------|
|
|
68
|
+
| Reading files | Agent + file path |
|
|
69
|
+
| Writing files | Agent + file path |
|
|
70
|
+
| Searching | Agent + pattern |
|
|
71
|
+
| Fetching URLs | Agent + URL |
|
|
72
|
+
| Running commands | Agent + command |
|
|
73
|
+
|
|
74
|
+
## Simplified Format
|
|
75
|
+
|
|
76
|
+
For inline operations:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
[supplier → Glob] agents/**/index.yaml
|
|
80
|
+
[creator → Write] agents/sw-engineer/new-agent/AGENT.md
|
|
81
|
+
[updater → WebFetch] https://github.com/...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Integration with R007
|
|
85
|
+
|
|
86
|
+
R008 extends R007 for tool operations:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
┌─ Agent: creator (manager)
|
|
90
|
+
└─ Task: Creating new agent
|
|
91
|
+
|
|
92
|
+
[creator → Write] agents/sw-engineer/new-agent/AGENT.md
|
|
93
|
+
[creator → Write] agents/sw-engineer/new-agent/index.yaml
|
|
94
|
+
[creator → Edit] agents/index.yaml
|
|
95
|
+
|
|
96
|
+
[Done] Agent created successfully
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Benefits
|
|
100
|
+
|
|
101
|
+
1. **Debugging**: Know which agent performed which operation
|
|
102
|
+
2. **Transparency**: User sees all agent activities
|
|
103
|
+
3. **Audit Trail**: Track file changes by agent
|
|
104
|
+
4. **Error Attribution**: Identify which agent caused issues
|
|
105
|
+
|
|
106
|
+
## Implementation
|
|
107
|
+
|
|
108
|
+
Agents should:
|
|
109
|
+
1. Identify themselves before tool operations
|
|
110
|
+
2. Include tool name and target
|
|
111
|
+
3. Use consistent format across all tools
|
|
112
|
+
4. Group related operations together
|
|
@@ -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: golang-expert (sw-engineer)
|
|
83
|
+
├─ Skill: go-best-practices
|
|
84
|
+
└─ Task: Reviewing src/main.go
|
|
85
|
+
|
|
86
|
+
Reading file...
|
|
87
|
+
[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
|
+
[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,89 @@
|
|
|
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 | `golang-expert` |
|
|
31
|
+
| Progress | Task progress (current/total) | `2/5` |
|
|
32
|
+
| Parallel | Parallel instance count | `3` |
|
|
33
|
+
|
|
34
|
+
## Display Rules
|
|
35
|
+
|
|
36
|
+
### Single Agent
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
─── [Agent] creator | [Progress] 1/3 ───
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### With Parallel Execution
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
─── [Agent] secretary | [Progress] 0/4 | [Parallel] 4 ───
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Completion
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
─── [Agent] supplier | [Progress] 5/5 | [Done] ───
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Implementation
|
|
55
|
+
|
|
56
|
+
Status updates via stderr to avoid output pollution:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
echo "─── [Agent] $AGENT | [Progress] $PROGRESS ───" >&2
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Integration with Other Rules
|
|
63
|
+
|
|
64
|
+
| Rule | Integration |
|
|
65
|
+
|------|-------------|
|
|
66
|
+
| R007 (Agent ID) | HUD complements agent identification |
|
|
67
|
+
| R008 (Tool ID) | HUD shows overall progress, tool ID shows specific operations |
|
|
68
|
+
| R009 (Parallel) | HUD displays parallel instance count |
|
|
69
|
+
|
|
70
|
+
## When to Display
|
|
71
|
+
|
|
72
|
+
| Situation | Display HUD |
|
|
73
|
+
|-----------|-------------|
|
|
74
|
+
| Single file operation | No (too brief) |
|
|
75
|
+
| Multi-step task | Yes |
|
|
76
|
+
| Parallel execution | Yes |
|
|
77
|
+
| Long-running operations | Yes |
|
|
78
|
+
|
|
79
|
+
## Hook Usage
|
|
80
|
+
|
|
81
|
+
The HUD statusline hook can be triggered via:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
~/.claude/hooks/hud/update-status.sh <agent> [progress] [parallel_count]
|
|
85
|
+
|
|
86
|
+
# Examples
|
|
87
|
+
~/.claude/hooks/hud/update-status.sh "creator" "1/3"
|
|
88
|
+
~/.claude/hooks/hud/update-status.sh "secretary" "0/4" "4"
|
|
89
|
+
```
|