oh-my-customcode 0.12.1 → 0.12.2
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 +4 -8
- package/dist/cli/index.js +137 -336
- package/dist/index.js +99 -260
- package/package.json +2 -4
- package/templates/.codex/agents/arch-documenter.md +0 -33
- package/templates/.codex/agents/arch-speckit-agent.md +0 -47
- package/templates/.codex/agents/be-express-expert.md +0 -30
- package/templates/.codex/agents/be-fastapi-expert.md +0 -43
- package/templates/.codex/agents/be-go-backend-expert.md +0 -43
- package/templates/.codex/agents/be-nestjs-expert.md +0 -28
- package/templates/.codex/agents/be-springboot-expert.md +0 -40
- package/templates/.codex/agents/db-postgres-expert.md +0 -36
- package/templates/.codex/agents/db-redis-expert.md +0 -36
- package/templates/.codex/agents/db-supabase-expert.md +0 -35
- package/templates/.codex/agents/de-airflow-expert.md +0 -34
- package/templates/.codex/agents/de-dbt-expert.md +0 -34
- package/templates/.codex/agents/de-kafka-expert.md +0 -81
- package/templates/.codex/agents/de-pipeline-expert.md +0 -32
- package/templates/.codex/agents/de-snowflake-expert.md +0 -36
- package/templates/.codex/agents/de-spark-expert.md +0 -36
- package/templates/.codex/agents/fe-svelte-agent.md +0 -29
- package/templates/.codex/agents/fe-vercel-agent.md +0 -37
- package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
- package/templates/.codex/agents/infra-aws-expert.md +0 -47
- package/templates/.codex/agents/infra-docker-expert.md +0 -47
- package/templates/.codex/agents/lang-golang-expert.md +0 -43
- package/templates/.codex/agents/lang-java21-expert.md +0 -39
- package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
- package/templates/.codex/agents/lang-python-expert.md +0 -43
- package/templates/.codex/agents/lang-rust-expert.md +0 -43
- package/templates/.codex/agents/lang-typescript-expert.md +0 -43
- package/templates/.codex/agents/mgr-claude-code-bible.md +0 -58
- package/templates/.codex/agents/mgr-creator.md +0 -39
- package/templates/.codex/agents/mgr-gitnerd.md +0 -45
- package/templates/.codex/agents/mgr-sauron.md +0 -161
- package/templates/.codex/agents/mgr-supplier.md +0 -35
- package/templates/.codex/agents/mgr-sync-checker.md +0 -38
- package/templates/.codex/agents/mgr-updater.md +0 -33
- package/templates/.codex/agents/qa-engineer.md +0 -32
- package/templates/.codex/agents/qa-planner.md +0 -73
- package/templates/.codex/agents/qa-writer.md +0 -27
- package/templates/.codex/agents/sys-memory-keeper.md +0 -43
- package/templates/.codex/agents/sys-naggy.md +0 -37
- package/templates/.codex/agents/tool-bun-expert.md +0 -26
- package/templates/.codex/agents/tool-npm-expert.md +0 -30
- package/templates/.codex/agents/tool-optimizer.md +0 -34
- package/templates/.codex/codex-native-hash.txt +0 -1
- package/templates/.codex/contexts/dev.md +0 -20
- package/templates/.codex/contexts/ecomode.md +0 -63
- package/templates/.codex/contexts/index.yaml +0 -41
- package/templates/.codex/contexts/research.md +0 -28
- package/templates/.codex/contexts/review.md +0 -23
- package/templates/.codex/hooks/hooks.json +0 -150
- package/templates/.codex/install-hooks.sh +0 -100
- package/templates/.codex/rules/MAY-optimization.md +0 -29
- package/templates/.codex/rules/MUST-agent-design.md +0 -57
- package/templates/.codex/rules/MUST-agent-identification.md +0 -29
- package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
- package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
- package/templates/.codex/rules/MUST-language-policy.md +0 -27
- package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
- package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
- package/templates/.codex/rules/MUST-permissions.md +0 -30
- package/templates/.codex/rules/MUST-safety.md +0 -23
- package/templates/.codex/rules/MUST-sync-verification.md +0 -125
- package/templates/.codex/rules/MUST-tool-identification.md +0 -82
- package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
- package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
- package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
- package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
- package/templates/.codex/rules/SHOULD-interaction.md +0 -34
- package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
- package/templates/.codex/rules/index.yaml +0 -141
- package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
- package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
- package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
- package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -100
- package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -272
- package/templates/.codex/skills/create-agent/SKILL.md +0 -91
- package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
- package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
- package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
- package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
- package/templates/.codex/skills/dev-review/SKILL.md +0 -81
- package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
- package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
- package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
- package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
- package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
- package/templates/.codex/skills/help/SKILL.md +0 -125
- package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
- package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
- package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
- package/templates/.codex/skills/lists/SKILL.md +0 -78
- package/templates/.codex/skills/memory-management/SKILL.md +0 -195
- package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
- package/templates/.codex/skills/memory-save/SKILL.md +0 -126
- package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
- package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
- package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
- package/templates/.codex/skills/npm-version/SKILL.md +0 -75
- package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
- package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
- package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
- package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
- package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
- package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
- package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
- package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
- package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
- package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
- package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
- package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
- package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
- package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
- package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
- package/templates/.codex/skills/status/SKILL.md +0 -153
- package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
- package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
- package/templates/.codex/skills/update-docs/SKILL.md +0 -140
- package/templates/.codex/skills/update-external/SKILL.md +0 -149
- package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
- package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
- package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
- package/templates/.codex/uninstall-hooks.sh +0 -52
- package/templates/AGENTS.md.en +0 -39
- package/templates/AGENTS.md.ko +0 -39
- package/templates/manifest.codex.json +0 -43
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: result-aggregation
|
|
3
|
-
description: Aggregate parallel agent results into concise output
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Aggregate and format results from multiple parallel agent executions into concise, scannable output.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- After parallel agent execution completes
|
|
14
|
-
- When ecomode is active
|
|
15
|
-
- For batch operation summaries
|
|
16
|
-
- When reporting multi-agent task results
|
|
17
|
-
|
|
18
|
-
## Aggregation Formats
|
|
19
|
-
|
|
20
|
-
### Standard Batch Format
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
[Batch Complete] {completed}/{total}
|
|
24
|
-
├── {agent}: {icon} {summary}
|
|
25
|
-
├── {agent}: {icon} {summary}
|
|
26
|
-
└── {agent}: {icon} {summary}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Detailed Batch Format
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
[Batch Complete] {completed}/{total}
|
|
33
|
-
|
|
34
|
-
[1] {agent-name}
|
|
35
|
-
Status: {success|failed|partial}
|
|
36
|
-
Target: {file/path}
|
|
37
|
-
Result: {summary}
|
|
38
|
-
|
|
39
|
-
[2] {agent-name}
|
|
40
|
-
Status: {success|failed|partial}
|
|
41
|
-
Target: {file/path}
|
|
42
|
-
Result: {summary}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Error Summary Format
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
[Batch Complete] {completed}/{total} ({failures} failed)
|
|
49
|
-
|
|
50
|
-
Failures:
|
|
51
|
-
├── {agent}: {error summary}
|
|
52
|
-
└── {agent}: {error summary}
|
|
53
|
-
|
|
54
|
-
Successes:
|
|
55
|
-
├── {agent}: ✓ {summary}
|
|
56
|
-
└── {agent}: ✓ {summary}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Status Icons
|
|
60
|
-
|
|
61
|
-
| Icon | Status | Use When |
|
|
62
|
-
|------|--------|----------|
|
|
63
|
-
| ✓ | Success | Task completed successfully |
|
|
64
|
-
| ✗ | Failed | Task failed with error |
|
|
65
|
-
| ⚠ | Warning | Completed with warnings |
|
|
66
|
-
| ⏳ | Pending | Still in progress |
|
|
67
|
-
| ⊘ | Skipped | Task was skipped |
|
|
68
|
-
|
|
69
|
-
## Aggregation Rules
|
|
70
|
-
|
|
71
|
-
### 1. Ordering
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
order:
|
|
75
|
-
- Failed results first (need attention)
|
|
76
|
-
- Warnings second
|
|
77
|
-
- Successes last
|
|
78
|
-
- Within category: alphabetical by agent
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 2. Summary Length
|
|
82
|
-
|
|
83
|
-
```yaml
|
|
84
|
-
ecomode_on:
|
|
85
|
-
max_length: 50 characters
|
|
86
|
-
truncate_with: "..."
|
|
87
|
-
|
|
88
|
-
ecomode_off:
|
|
89
|
-
max_length: 200 characters
|
|
90
|
-
allow_multiline: true
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 3. Grouping
|
|
94
|
-
|
|
95
|
-
```yaml
|
|
96
|
-
group_by:
|
|
97
|
-
- status (success/failed/warning)
|
|
98
|
-
- agent_type (when mixed types)
|
|
99
|
-
- target_path (when same agent, different targets)
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Integration
|
|
103
|
-
|
|
104
|
-
### With Secretary
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
Secretary receives:
|
|
108
|
-
- List of agent results
|
|
109
|
-
- Ecomode status
|
|
110
|
-
- User display preferences
|
|
111
|
-
|
|
112
|
-
Secretary outputs:
|
|
113
|
-
- Aggregated summary using this skill
|
|
114
|
-
- Individual details if requested
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### With Ecomode
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
When ecomode active:
|
|
121
|
-
- Use compact format
|
|
122
|
-
- One line per agent
|
|
123
|
-
- Icons for status
|
|
124
|
-
- Truncate long summaries
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Examples
|
|
128
|
-
|
|
129
|
-
### Code Review Batch
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
[Batch Complete] 4/4
|
|
133
|
-
|
|
134
|
-
├── lang-golang-expert: ✓ src/main.go - 2 issues (1 naming, 1 error handling)
|
|
135
|
-
├── lang-python-expert: ✓ scripts/*.py - Clean
|
|
136
|
-
├── lang-rust-expert: ⚠ lib/core.rs - 1 unsafe block flagged
|
|
137
|
-
└── lang-typescript-expert: ✓ web/app.tsx - 3 suggestions
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Agent Creation Batch
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
[Batch Complete] 3/4 (1 failed)
|
|
144
|
-
|
|
145
|
-
✗ lang-kotlin-expert: Skill not found: kotlin-best-practices
|
|
146
|
-
✓ lang-golang-expert: Agent created at .codex/agents/lang-golang-expert.md
|
|
147
|
-
✓ lang-python-expert: Agent created at .codex/agents/lang-python-expert.md
|
|
148
|
-
✓ lang-rust-expert: Agent created at .codex/agents/lang-rust-expert.md
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Audit Batch
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
[Batch Complete] 5/5
|
|
155
|
-
|
|
156
|
-
Agents Audited:
|
|
157
|
-
├── mgr-creator: ✓ All refs valid
|
|
158
|
-
├── mgr-updater: ✓ All refs valid
|
|
159
|
-
├── mgr-supplier: ⚠ 1 deprecated ref
|
|
160
|
-
├── lang-golang-expert: ✓ All refs valid
|
|
161
|
-
└── lang-python-expert: ✓ All refs valid
|
|
162
|
-
|
|
163
|
-
Summary: 5 agents checked, 1 warning
|
|
164
|
-
```
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rust-best-practices
|
|
3
|
-
description: Idiomatic Rust patterns from official guidelines
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Apply idiomatic Rust patterns and best practices from official documentation.
|
|
10
|
-
|
|
11
|
-
## Core Principles
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Safety without garbage collection
|
|
15
|
-
Zero-cost abstractions
|
|
16
|
-
Fearless concurrency
|
|
17
|
-
Ownership as a feature
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Rules
|
|
21
|
-
|
|
22
|
-
### 1. Naming Conventions
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
crates:
|
|
26
|
-
style: snake_case or kebab-case
|
|
27
|
-
example: my_crate, my-crate
|
|
28
|
-
|
|
29
|
-
modules:
|
|
30
|
-
style: snake_case
|
|
31
|
-
example: my_module
|
|
32
|
-
|
|
33
|
-
types:
|
|
34
|
-
style: UpperCamelCase
|
|
35
|
-
example: MyStruct, MyEnum
|
|
36
|
-
|
|
37
|
-
traits:
|
|
38
|
-
style: UpperCamelCase
|
|
39
|
-
example: Iterator, Display
|
|
40
|
-
|
|
41
|
-
functions_methods:
|
|
42
|
-
style: snake_case
|
|
43
|
-
example: my_function, get_value
|
|
44
|
-
|
|
45
|
-
constants:
|
|
46
|
-
style: SCREAMING_SNAKE_CASE
|
|
47
|
-
example: MAX_SIZE
|
|
48
|
-
|
|
49
|
-
type_parameters:
|
|
50
|
-
style: single uppercase or CamelCase
|
|
51
|
-
example: T, E, Item
|
|
52
|
-
|
|
53
|
-
lifetimes:
|
|
54
|
-
style: short lowercase
|
|
55
|
-
example: 'a, 'b, 'static
|
|
56
|
-
|
|
57
|
-
macros:
|
|
58
|
-
style: snake_case!
|
|
59
|
-
example: vec!, println!
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 2. Ownership and Borrowing
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
principles:
|
|
66
|
-
- Each value has exactly one owner
|
|
67
|
-
- References cannot outlive the data they reference
|
|
68
|
-
- Either one mutable reference OR many immutable references
|
|
69
|
-
|
|
70
|
-
prefer:
|
|
71
|
-
- "&T over T" when not needing ownership
|
|
72
|
-
- "&mut T over T" when modifying without consuming
|
|
73
|
-
- "T over Box<T>" when size is known at compile time
|
|
74
|
-
|
|
75
|
-
avoid:
|
|
76
|
-
- Clone when borrowing suffices
|
|
77
|
-
- RefCell unless interior mutability is needed
|
|
78
|
-
- Unsafe unless absolutely necessary
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 3. Error Handling
|
|
82
|
-
|
|
83
|
-
```yaml
|
|
84
|
-
result_type:
|
|
85
|
-
- Return Result<T, E> for recoverable errors
|
|
86
|
-
- Use ? operator for propagation
|
|
87
|
-
- Define custom error types for libraries
|
|
88
|
-
|
|
89
|
-
option_type:
|
|
90
|
-
- Use Option<T> for nullable values
|
|
91
|
-
- Prefer map/and_then over match when appropriate
|
|
92
|
-
- Use unwrap_or, unwrap_or_else, unwrap_or_default
|
|
93
|
-
|
|
94
|
-
panic:
|
|
95
|
-
- Only for unrecoverable errors
|
|
96
|
-
- Use in tests with assert!, assert_eq!
|
|
97
|
-
- Avoid in library code
|
|
98
|
-
|
|
99
|
-
patterns: |
|
|
100
|
-
// Propagation with ?
|
|
101
|
-
fn read_file() -> Result<String, io::Error> {
|
|
102
|
-
let mut file = File::open("file.txt")?;
|
|
103
|
-
let mut contents = String::new();
|
|
104
|
-
file.read_to_string(&mut contents)?;
|
|
105
|
-
Ok(contents)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Custom error type
|
|
109
|
-
#[derive(Debug)]
|
|
110
|
-
enum MyError {
|
|
111
|
-
Io(io::Error),
|
|
112
|
-
Parse(ParseIntError),
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 4. Traits and Generics
|
|
117
|
-
|
|
118
|
-
```yaml
|
|
119
|
-
trait_design:
|
|
120
|
-
- Keep traits focused and small
|
|
121
|
-
- Use associated types for output types
|
|
122
|
-
- Implement standard traits: Debug, Clone, Default, PartialEq
|
|
123
|
-
|
|
124
|
-
standard_traits:
|
|
125
|
-
- Debug: for debugging output
|
|
126
|
-
- Clone: explicit duplication
|
|
127
|
-
- Default: default value construction
|
|
128
|
-
- PartialEq, Eq: equality comparison
|
|
129
|
-
- PartialOrd, Ord: ordering
|
|
130
|
-
- Hash: for HashMap keys
|
|
131
|
-
- Display: user-facing output
|
|
132
|
-
- From/Into: type conversion
|
|
133
|
-
|
|
134
|
-
generics:
|
|
135
|
-
- Use trait bounds to specify requirements
|
|
136
|
-
- Prefer impl Trait in argument position
|
|
137
|
-
- Use where clauses for complex bounds
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### 5. Memory Management
|
|
141
|
-
|
|
142
|
-
```yaml
|
|
143
|
-
stack_vs_heap:
|
|
144
|
-
- Stack: fixed-size, Copy types
|
|
145
|
-
- Heap: dynamic-size, Box, Vec, String
|
|
146
|
-
|
|
147
|
-
smart_pointers:
|
|
148
|
-
- Box<T>: heap allocation with single owner
|
|
149
|
-
- Rc<T>: reference counting (single-threaded)
|
|
150
|
-
- Arc<T>: atomic reference counting (multi-threaded)
|
|
151
|
-
- RefCell<T>: interior mutability
|
|
152
|
-
|
|
153
|
-
avoid_leaks:
|
|
154
|
-
- Drop trait for cleanup
|
|
155
|
-
- RAII pattern for resources
|
|
156
|
-
- Weak references to break cycles
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 6. Concurrency
|
|
160
|
-
|
|
161
|
-
```yaml
|
|
162
|
-
send_sync:
|
|
163
|
-
- Send: safe to transfer between threads
|
|
164
|
-
- Sync: safe to share references between threads
|
|
165
|
-
|
|
166
|
-
primitives:
|
|
167
|
-
- Mutex<T>: mutual exclusion
|
|
168
|
-
- RwLock<T>: multiple readers or one writer
|
|
169
|
-
- Arc<T>: thread-safe reference counting
|
|
170
|
-
- mpsc: channels for message passing
|
|
171
|
-
|
|
172
|
-
patterns: |
|
|
173
|
-
// Shared state with Arc and Mutex
|
|
174
|
-
let counter = Arc::new(Mutex::new(0));
|
|
175
|
-
let counter_clone = Arc::clone(&counter);
|
|
176
|
-
|
|
177
|
-
thread::spawn(move || {
|
|
178
|
-
let mut num = counter_clone.lock().unwrap();
|
|
179
|
-
*num += 1;
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// Message passing
|
|
183
|
-
let (tx, rx) = mpsc::channel();
|
|
184
|
-
thread::spawn(move || {
|
|
185
|
-
tx.send(value).unwrap();
|
|
186
|
-
});
|
|
187
|
-
let received = rx.recv().unwrap();
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### 7. API Design
|
|
191
|
-
|
|
192
|
-
```yaml
|
|
193
|
-
guidelines:
|
|
194
|
-
- Accept borrowed data when possible
|
|
195
|
-
- Return owned data when the caller needs it
|
|
196
|
-
- Use Into/AsRef for flexible parameters
|
|
197
|
-
- Implement standard conversion traits
|
|
198
|
-
|
|
199
|
-
constructors:
|
|
200
|
-
- new() for primary constructor
|
|
201
|
-
- with_* for alternative constructors
|
|
202
|
-
- Builder pattern for many parameters
|
|
203
|
-
|
|
204
|
-
methods:
|
|
205
|
-
- is_* for boolean queries
|
|
206
|
-
- as_* for cheap conversions (borrows)
|
|
207
|
-
- to_* for expensive conversions (copies)
|
|
208
|
-
- into_* for ownership transfers
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### 8. Documentation
|
|
212
|
-
|
|
213
|
-
```yaml
|
|
214
|
-
rules:
|
|
215
|
-
- Document all public items
|
|
216
|
-
- Include examples in doc comments
|
|
217
|
-
- Use # Examples section
|
|
218
|
-
- Document panics, errors, safety
|
|
219
|
-
|
|
220
|
-
format: |
|
|
221
|
-
/// Brief description.
|
|
222
|
-
///
|
|
223
|
-
/// More detailed explanation if needed.
|
|
224
|
-
///
|
|
225
|
-
/// # Examples
|
|
226
|
-
///
|
|
227
|
-
/// ```
|
|
228
|
-
/// let result = my_function(42);
|
|
229
|
-
/// assert_eq!(result, 84);
|
|
230
|
-
/// ```
|
|
231
|
-
///
|
|
232
|
-
/// # Panics
|
|
233
|
-
///
|
|
234
|
-
/// Panics if the input is zero.
|
|
235
|
-
pub fn my_function(x: i32) -> i32 {
|
|
236
|
-
x * 2
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### 9. Project Structure
|
|
241
|
-
|
|
242
|
-
```yaml
|
|
243
|
-
layout:
|
|
244
|
-
- src/lib.rs or src/main.rs: crate root
|
|
245
|
-
- src/bin/: additional binaries
|
|
246
|
-
- tests/: integration tests
|
|
247
|
-
- benches/: benchmarks
|
|
248
|
-
- examples/: example programs
|
|
249
|
-
|
|
250
|
-
modules:
|
|
251
|
-
- One module per file
|
|
252
|
-
- mod.rs or filename.rs for module
|
|
253
|
-
- pub use for re-exports
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## Application
|
|
257
|
-
|
|
258
|
-
When writing or reviewing Rust code:
|
|
259
|
-
|
|
260
|
-
1. **Always** handle ownership correctly
|
|
261
|
-
2. **Always** handle errors with Result/Option
|
|
262
|
-
3. **Prefer** borrowing over cloning
|
|
263
|
-
4. **Prefer** zero-cost abstractions
|
|
264
|
-
5. **Implement** standard traits (Debug, Clone, etc.)
|
|
265
|
-
6. **Document** public APIs with examples
|
|
266
|
-
7. **Avoid** unsafe unless necessary
|
|
267
|
-
8. **Use** clippy for linting
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sauron-watch
|
|
3
|
-
description: Full R016 verification (5+3 rounds) before commit
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Sauron Watch Skill
|
|
8
|
-
|
|
9
|
-
Execute full R016 verification process with 5 rounds of manager agent verification and 3 rounds of deep review.
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Ensure complete synchronization of agents, commands, documentation, and project structure before committing changes.
|
|
14
|
-
|
|
15
|
-
## Workflow
|
|
16
|
-
|
|
17
|
-
### Phase 1: Manager Agent Verification (5 rounds)
|
|
18
|
-
|
|
19
|
-
#### Round 1-2: Basic Sync
|
|
20
|
-
```
|
|
21
|
-
□ /audit-agents - Check all agent dependencies
|
|
22
|
-
□ /sync-check - Verify registry synchronization
|
|
23
|
-
□ Fix any issues found
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
#### Round 3-4: Deep Sync
|
|
27
|
-
```
|
|
28
|
-
□ /audit-agents - Re-verify after fixes
|
|
29
|
-
□ /sync-check - Re-verify registries
|
|
30
|
-
□ /update-docs - Check documentation sync
|
|
31
|
-
□ Fix any remaining issues
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
#### Round 5: Final Verification
|
|
35
|
-
```
|
|
36
|
-
□ All agent counts match (AGENTS.md, index.yaml, actual files)
|
|
37
|
-
□ All symlinks valid
|
|
38
|
-
□ All command registries updated
|
|
39
|
-
□ All intent-detection triggers present
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Phase 2: Deep Review (3 rounds)
|
|
43
|
-
|
|
44
|
-
#### Deep Round 1: Workflow Alignment
|
|
45
|
-
```
|
|
46
|
-
□ Agent creation workflow documented and functional
|
|
47
|
-
□ Development workflow uses proper orchestrators
|
|
48
|
-
□ Deployment workflow defined (if applicable)
|
|
49
|
-
□ All orchestrators have complete `manages:` sections
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
#### Deep Round 2: Reference Verification
|
|
53
|
-
```
|
|
54
|
-
□ All orchestrators properly reference their managed agents
|
|
55
|
-
□ All rules are properly referenced
|
|
56
|
-
□ No orphaned agents (not managed by any orchestrator)
|
|
57
|
-
□ No circular references
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
#### Deep Round 3: Philosophy Compliance
|
|
61
|
-
```
|
|
62
|
-
□ R006: Separation of concerns (AGENT.md = role only, no details)
|
|
63
|
-
□ R009: Parallel execution enabled for orchestrators
|
|
64
|
-
□ R010: Multi-agent tasks use orchestrators
|
|
65
|
-
□ R007/R008: Agent/tool identification documented
|
|
66
|
-
□ All MUST rules enforced, SHOULD rules recommended
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Phase 3: Fix Issues
|
|
70
|
-
```
|
|
71
|
-
□ All issues from Phase 1 fixed
|
|
72
|
-
□ All issues from Phase 2 fixed
|
|
73
|
-
□ Re-run verification if major fixes made
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Phase 4: Commit Ready
|
|
77
|
-
```
|
|
78
|
-
□ All verification passed
|
|
79
|
-
□ Ready to delegate to mgr-gitnerd for commit
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Output Format
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
[mgr-sauron:watch]
|
|
86
|
-
|
|
87
|
-
Starting full R016 verification...
|
|
88
|
-
|
|
89
|
-
═══════════════════════════════════════════════════════════
|
|
90
|
-
PHASE 1: Manager Agent Verification (5 rounds)
|
|
91
|
-
═══════════════════════════════════════════════════════════
|
|
92
|
-
|
|
93
|
-
[Round 1/5] Basic sync - /audit-agents
|
|
94
|
-
✓ All agents have valid dependencies
|
|
95
|
-
|
|
96
|
-
[Round 2/5] Basic sync - /sync-check
|
|
97
|
-
✓ All registries synchronized
|
|
98
|
-
|
|
99
|
-
[Round 3/5] Deep sync - /audit-agents
|
|
100
|
-
✓ Dependencies verified after fixes
|
|
101
|
-
|
|
102
|
-
[Round 4/5] Deep sync - /sync-check + /update-docs
|
|
103
|
-
✓ Registries verified
|
|
104
|
-
✓ Documentation synchronized
|
|
105
|
-
|
|
106
|
-
[Round 5/5] Final verification
|
|
107
|
-
✓ Agent counts match across all sources
|
|
108
|
-
✓ All symlinks valid
|
|
109
|
-
✓ Command registries updated
|
|
110
|
-
✓ Intent triggers present
|
|
111
|
-
|
|
112
|
-
═══════════════════════════════════════════════════════════
|
|
113
|
-
PHASE 2: Deep Review (3 rounds)
|
|
114
|
-
═══════════════════════════════════════════════════════════
|
|
115
|
-
|
|
116
|
-
[Round 1/3] Workflow alignment
|
|
117
|
-
✓ Agent creation workflow documented
|
|
118
|
-
✓ Development workflow uses orchestrators
|
|
119
|
-
✓ Orchestrators have complete manages sections
|
|
120
|
-
|
|
121
|
-
[Round 2/3] Reference verification
|
|
122
|
-
✓ All orchestrator references valid
|
|
123
|
-
✓ All rules referenced
|
|
124
|
-
✓ No orphaned agents
|
|
125
|
-
|
|
126
|
-
[Round 3/3] Philosophy compliance
|
|
127
|
-
✓ R006 separation enforced
|
|
128
|
-
✓ R009 parallel execution enabled
|
|
129
|
-
✓ R010 orchestrator coordination documented
|
|
130
|
-
✓ R007/R008 identification rules present
|
|
131
|
-
|
|
132
|
-
═══════════════════════════════════════════════════════════
|
|
133
|
-
VERIFICATION COMPLETE
|
|
134
|
-
═══════════════════════════════════════════════════════════
|
|
135
|
-
|
|
136
|
-
Status: ✓ ALL CHECKS PASSED
|
|
137
|
-
|
|
138
|
-
Ready to commit. 커밋할까요?
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Related
|
|
142
|
-
|
|
143
|
-
- R016: Sync Verification Rules
|
|
144
|
-
- mgr-gitnerd: Git operations agent
|