oh-my-customcode 0.36.0 → 0.36.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 +167 -236
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +37 -7
- package/templates/.claude/hooks/scripts/audit-log.sh +55 -0
- package/templates/.claude/hooks/scripts/schema-validator.sh +88 -0
- package/templates/.claude/hooks/scripts/secret-filter.sh +67 -0
- package/templates/.claude/hooks/scripts/session-compliance-report.sh +65 -0
- package/templates/.claude/schemas/tool-inputs.json +62 -0
- package/templates/.claude/skills/omcustom-release-notes/SKILL.md +117 -0
- package/templates/.claude/skills/omcustom-takeover/SKILL.md +115 -0
- package/templates/.claude/skills/reasoning-sandwich/SKILL.md +64 -0
- package/templates/CLAUDE.md.en +2 -1
- package/templates/CLAUDE.md.ko +2 -1
- package/templates/manifest.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# oh-my-customcode
|
|
6
6
|
|
|
7
|
-
> **Your
|
|
7
|
+
> **Your AI Agent Stack. Compiled, Not Configured.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/oh-my-customcode)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -13,294 +13,245 @@
|
|
|
13
13
|
|
|
14
14
|
**[한국어 문서 (Korean)](./README_ko.md)**
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
44 agents. 74 skills. 20 rules. One command.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g oh-my-customcode && cd your-project && omcustom init
|
|
20
|
+
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
---
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|---------|-------------|
|
|
24
|
-
| **Batteries Included** | 44 agents, 71 skills, 25 guides, 19 rules, 1 hook, 4 contexts, ontology graph - ready to use out of the box |
|
|
25
|
-
| **Sub-Agent Model** | Supports hierarchical agent orchestration with specialized roles |
|
|
26
|
-
| **Dead Simple Customization** | Create a folder + markdown file = new agent or skill |
|
|
27
|
-
| **Mix and Match** | Use built-in components, create your own, or combine both |
|
|
28
|
-
| **Non-Destructive** | Your customizations live alongside defaults, never overwritten |
|
|
29
|
-
| **Dynamic Agent Creation** | No matching expert? The system creates one on-the-fly, connecting relevant skills and guides |
|
|
24
|
+
## Philosophy
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
oh-my-customcode is built on two ideas:
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
# Install globally
|
|
35
|
-
npm install -g oh-my-customcode
|
|
28
|
+
**1. Agent systems are compiled, not configured.**
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
| Compile Concept | oh-my-customcode |
|
|
31
|
+
|----------------|-----------------|
|
|
32
|
+
| Source code | `.claude/skills/` — reusable knowledge and workflows |
|
|
33
|
+
| Build artifacts | `.claude/agents/` — executable specialists assembled from skills |
|
|
34
|
+
| Compiler | `mgr-sauron` (R017) — structural verification and integrity |
|
|
35
|
+
| Spec | `.claude/rules/` — constraints and build rules |
|
|
36
|
+
| Linker | Routing skills — connect agents to tasks |
|
|
37
|
+
| Standard library | `guides/` — shared reference documentation |
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Skills are source. Agents are compiled output. Sauron verifies the build. This separation means skills evolve independently of agents, and agents can be recompiled from updated skills at any time.
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
**2. If it can't be done, make it work.**
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
When no specialist exists for a task, oh-my-customcode does not fail. It creates one.
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
```
|
|
46
|
+
User: "Review this Terraform module"
|
|
47
|
+
→ Routing: no terraform expert found
|
|
48
|
+
→ mgr-creator discovers: infra-aws-expert skills + docker-best-practices guide
|
|
49
|
+
→ Creates: infra-terraform-expert.md
|
|
50
|
+
→ Executes the review immediately
|
|
51
|
+
→ Agent persists for future use
|
|
52
|
+
```
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
This is not a fallback. It is the design. The system treats missing expertise as a build problem — find the right skills, compile a new agent, execute.
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
---
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"Make code reviews stricter"
|
|
58
|
-
"Set up a deploy review pipeline"
|
|
59
|
-
```
|
|
58
|
+
## How It Works
|
|
59
|
+
|
|
60
|
+
### Orchestration
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
The main conversation acts as a singleton orchestrator (R010). It never writes files directly. Every action is delegated through routing skills to specialized agents.
|
|
62
63
|
|
|
63
64
|
```
|
|
64
65
|
User (natural language)
|
|
65
|
-
→
|
|
66
|
-
→
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
→ Routing skill (intent detection, confidence scoring)
|
|
67
|
+
→ Specialized agent (isolated execution)
|
|
68
|
+
→ Result returned to orchestrator
|
|
69
|
+
→ Response to user
|
|
69
70
|
```
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
Four routing skills cover the full domain:
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
| Routing Skill | Routes To |
|
|
75
|
+
|--------------|-----------|
|
|
76
|
+
| secretary-routing | Manager agents (mgr-*), system agents (sys-*) |
|
|
77
|
+
| dev-lead-routing | Language, backend, frontend, tooling, DB, infra, arch agents |
|
|
78
|
+
| de-lead-routing | Data engineering agents (de-*) |
|
|
79
|
+
| qa-lead-routing | QA team (qa-planner, qa-writer, qa-engineer) |
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
### Model Selection
|
|
76
82
|
|
|
77
|
-
|
|
78
|
-
|-------|-------|---------|
|
|
79
|
-
| `opus` | Complex reasoning, architecture | Code review, design analysis |
|
|
80
|
-
| `sonnet` | General tasks (default) | Agent creation, code generation |
|
|
81
|
-
| `haiku` | Fast, simple operations | File search, validation |
|
|
83
|
+
Each agent runs on the model optimized for its task:
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
| Model | When | Examples |
|
|
86
|
+
|-------|------|---------|
|
|
87
|
+
| `opus` | Complex reasoning, architecture | Design review, research synthesis |
|
|
88
|
+
| `sonnet` | Implementation, general tasks | Code generation, agent creation |
|
|
89
|
+
| `haiku` | Fast validation, search | File search, count verification |
|
|
90
|
+
|
|
91
|
+
The reasoning-sandwich pattern formalizes this: opus for pre-analysis, sonnet for implementation, haiku for post-verification.
|
|
92
|
+
|
|
93
|
+
### Parallel Execution
|
|
94
|
+
|
|
95
|
+
Independent tasks run in parallel (R009). Up to 4 concurrent agents per message:
|
|
84
96
|
|
|
85
97
|
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
dev-lead-routing (routing skill)
|
|
91
|
-
├── lang-golang-expert:sonnet — Go implementation
|
|
92
|
-
├── lang-python-expert:sonnet — Python implementation
|
|
93
|
-
└── qa-engineer:sonnet — test generation
|
|
98
|
+
Agent(lang-golang-expert):sonnet ┐
|
|
99
|
+
Agent(lang-python-expert):sonnet ├─ All spawned in one message
|
|
100
|
+
Agent(qa-engineer):sonnet │
|
|
101
|
+
Agent(arch-documenter):haiku ┘
|
|
94
102
|
```
|
|
95
103
|
|
|
96
|
-
|
|
104
|
+
---
|
|
97
105
|
|
|
98
|
-
|
|
106
|
+
### Agents (44)
|
|
99
107
|
|
|
100
|
-
|
|
108
|
+
| Category | Count | Agents |
|
|
109
|
+
|----------|-------|--------|
|
|
110
|
+
| Languages | 6 | lang-golang, lang-python, lang-rust, lang-kotlin, lang-typescript, lang-java21 |
|
|
111
|
+
| Backend | 6 | be-fastapi, be-springboot, be-go-backend, be-express, be-nestjs, be-django |
|
|
112
|
+
| Frontend | 4 | fe-vercel, fe-vuejs, fe-svelte, fe-flutter |
|
|
113
|
+
| Data Engineering | 6 | de-airflow, de-dbt, de-spark, de-kafka, de-snowflake, de-pipeline |
|
|
114
|
+
| Database | 3 | db-supabase, db-postgres, db-redis |
|
|
115
|
+
| Tooling | 3 | tool-npm, tool-optimizer, tool-bun |
|
|
116
|
+
| Architecture | 2 | arch-documenter, arch-speckit |
|
|
117
|
+
| Infrastructure | 2 | infra-docker, infra-aws |
|
|
118
|
+
| QA | 3 | qa-planner, qa-writer, qa-engineer |
|
|
119
|
+
| Security | 1 | sec-codeql |
|
|
120
|
+
| Managers | 6 | mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, mgr-sauron, mgr-claude-code-bible |
|
|
121
|
+
| System | 2 | sys-memory-keeper, sys-naggy |
|
|
122
|
+
|
|
123
|
+
Each agent declares its tools, model, memory scope, and limitations in YAML frontmatter. Tool budgets are enforced per agent type for accuracy.
|
|
101
124
|
|
|
102
|
-
|
|
103
|
-
|---------|-------------|
|
|
104
|
-
| `/omcustom:analysis` | Analyze project and auto-configure agents, skills, rules |
|
|
105
|
-
| `/research` | 10-team parallel deep analysis with cross-verification |
|
|
125
|
+
---
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
### Skills (74)
|
|
108
128
|
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
|
129
|
+
| Category | Count | Includes |
|
|
130
|
+
|----------|-------|----------|
|
|
131
|
+
| Best Practices | 22 | Go, Python, TypeScript, Kotlin, Rust, React, FastAPI, Spring Boot, Django, Flutter, Docker, AWS, Postgres, Redis, Kafka, dbt, Spark, Snowflake, Airflow, and more |
|
|
132
|
+
| Routing | 4 | secretary, dev-lead, de-lead, qa-lead |
|
|
133
|
+
| Workflow | 12 | structured-dev-cycle, deep-plan, research, evaluator-optimizer, dag-orchestration, worker-reviewer-pipeline, reasoning-sandwich, and more |
|
|
134
|
+
| Development | 7 | dev-review, dev-refactor, analysis, create-agent, intent-detection, web-design-guidelines, omcustom-takeover |
|
|
135
|
+
| Operations | 9 | update-docs, audit-agents, sauron-watch, monitoring-setup, fix-refs, release-notes, and more |
|
|
136
|
+
| Memory | 3 | memory-save, memory-recall, memory-management |
|
|
137
|
+
| Package | 3 | npm-publish, npm-version, npm-audit |
|
|
138
|
+
| Optimization | 3 | optimize-analyze, optimize-bundle, optimize-report |
|
|
139
|
+
| Security | 2 | cve-triage, jinja2-prompts |
|
|
140
|
+
| Other | 8 | codex-exec, vercel-deploy, skills-sh-search, result-aggregation, writing-clearly-and-concisely, and more |
|
|
113
141
|
|
|
114
|
-
|
|
142
|
+
Skills use a 3-tier scope system: `core` (universal), `harness` (agent/skill maintenance), `package` (project-specific).
|
|
115
143
|
|
|
116
|
-
|
|
117
|
-
|---------|-------------|
|
|
118
|
-
| `/omcustom:create-agent` | Create new agent |
|
|
119
|
-
| `/omcustom:update-docs` | Sync project structure and documentation |
|
|
120
|
-
| `/omcustom:update-external` | Update agents from external sources |
|
|
121
|
-
| `/omcustom:audit-agents` | Audit agent dependencies |
|
|
122
|
-
| `/omcustom:fix-refs` | Fix broken references |
|
|
144
|
+
---
|
|
123
145
|
|
|
124
|
-
|
|
146
|
+
## Commands
|
|
125
147
|
|
|
126
|
-
|
|
127
|
-
|---------|-------------|
|
|
128
|
-
| `/memory-save` | Save session context to claude-mem |
|
|
129
|
-
| `/memory-recall` | Search and recall memories |
|
|
148
|
+
All commands are invoked inside the Claude Code conversation.
|
|
130
149
|
|
|
131
|
-
|
|
150
|
+
### Development
|
|
132
151
|
|
|
133
|
-
| Command |
|
|
152
|
+
| Command | What it does |
|
|
134
153
|
|---------|-------------|
|
|
135
|
-
| `/
|
|
136
|
-
| `/
|
|
137
|
-
| `/
|
|
154
|
+
| `/dev-review` | Code review against best practices |
|
|
155
|
+
| `/dev-refactor` | Refactor for structure and patterns |
|
|
156
|
+
| `/structured-dev-cycle` | 6-stage development: plan → verify → implement → verify → compound → done |
|
|
157
|
+
| `/deep-plan` | Research-validated planning |
|
|
158
|
+
| `/research` | 10-team parallel analysis with cross-verification |
|
|
138
159
|
|
|
139
|
-
|
|
160
|
+
### Agent Management
|
|
140
161
|
|
|
141
|
-
| Command |
|
|
162
|
+
| Command | What it does |
|
|
142
163
|
|---------|-------------|
|
|
143
|
-
| `/
|
|
144
|
-
| `/
|
|
145
|
-
| `/
|
|
164
|
+
| `/omcustom:analysis` | Analyze project, auto-configure agents and skills |
|
|
165
|
+
| `/omcustom:create-agent` | Create a new agent |
|
|
166
|
+
| `/omcustom:takeover` | Extract canonical spec from existing agent or skill |
|
|
167
|
+
| `/omcustom:audit-agents` | Audit agent dependencies |
|
|
168
|
+
| `/omcustom:update-docs` | Sync project structure and documentation |
|
|
169
|
+
| `/omcustom:sauron-watch` | Full structural verification (5+3 rounds) |
|
|
146
170
|
|
|
147
|
-
|
|
171
|
+
### Package & Release
|
|
148
172
|
|
|
149
|
-
| Command |
|
|
173
|
+
| Command | What it does |
|
|
150
174
|
|---------|-------------|
|
|
151
|
-
| `/omcustom:
|
|
152
|
-
| `/omcustom:
|
|
153
|
-
| `/
|
|
154
|
-
| `/
|
|
155
|
-
| `/structured-dev-cycle` | 6-phase structured development cycle |
|
|
156
|
-
| `/omcustom:lists` | Show all available commands |
|
|
157
|
-
| `/omcustom:status` | System status and health checks |
|
|
158
|
-
| `/omcustom:help` | Help information |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## What's Included
|
|
175
|
+
| `/omcustom:npm-publish` | Publish to npm |
|
|
176
|
+
| `/omcustom:npm-version` | Semantic versioning |
|
|
177
|
+
| `/omcustom:npm-audit` | Dependency security audit |
|
|
178
|
+
| `/omcustom:release-notes` | Generate release notes from git history |
|
|
163
179
|
|
|
164
|
-
###
|
|
180
|
+
### Memory & System
|
|
165
181
|
|
|
166
|
-
|
|
|
167
|
-
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
| **Tooling** | 3 | tool-npm-expert, tool-optimizer, tool-bun-expert |
|
|
174
|
-
| **Data Engineering** | 6 | de-airflow-expert, de-dbt-expert, de-spark-expert, de-kafka-expert, de-snowflake-expert, de-pipeline-expert |
|
|
175
|
-
| **Database** | 3 | db-supabase-expert, db-postgres-expert, db-redis-expert |
|
|
176
|
-
| **Architecture** | 2 | arch-documenter, arch-speckit-agent |
|
|
177
|
-
| **Infrastructure** | 2 | infra-docker-expert, infra-aws-expert |
|
|
178
|
-
| **QA** | 3 | qa-planner, qa-writer, qa-engineer |
|
|
179
|
-
| **Security** | 1 | sec-codeql-expert |
|
|
180
|
-
| **Total** | **44** | |
|
|
181
|
-
|
|
182
|
-
### Skills (71)
|
|
183
|
-
|
|
184
|
-
| Category | Count | Skills |
|
|
185
|
-
|----------|-------|--------|
|
|
186
|
-
| **Routing** | 4 | secretary-routing, dev-lead-routing, de-lead-routing, qa-lead-routing |
|
|
187
|
-
| **Best Practices** | 21 | go-best-practices, python-best-practices, typescript-best-practices, kotlin-best-practices, rust-best-practices, react-best-practices, fastapi-best-practices, springboot-best-practices, go-backend-best-practices, django-best-practices, docker-best-practices, aws-best-practices, postgres-best-practices, supabase-postgres-best-practices, redis-best-practices, airflow-best-practices, dbt-best-practices, kafka-best-practices, snowflake-best-practices, flutter-best-practices, java21-best-practices |
|
|
188
|
-
| **Development** | 6 | dev-review, dev-refactor, create-agent, intent-detection, web-design-guidelines, analysis |
|
|
189
|
-
| **Data Engineering** | 2 | spark-best-practices, pipeline-architecture-patterns |
|
|
190
|
-
| **Optimization** | 3 | optimize-analyze, optimize-bundle, optimize-report |
|
|
191
|
-
| **Memory** | 3 | memory-save, memory-recall, memory-management |
|
|
192
|
-
| **Package Management** | 3 | npm-publish, npm-version, npm-audit |
|
|
193
|
-
| **Operations** | 7 | update-docs, update-external, audit-agents, fix-refs, sauron-watch, monitoring-setup, claude-code-bible |
|
|
194
|
-
| **Utilities** | 5 | lists, help, status, result-aggregation, writing-clearly-and-concisely |
|
|
195
|
-
| **Quality & Workflow** | 11 | multi-model-verification, structured-dev-cycle, model-escalation, stuck-recovery, dag-orchestration, task-decomposition, worker-reviewer-pipeline, pr-auto-improve, pipeline-guards, deep-plan, evaluator-optimizer |
|
|
196
|
-
| **Security** | 2 | cve-triage, jinja2-prompts |
|
|
197
|
-
| **Research** | 1 | research |
|
|
198
|
-
| **Deploy** | 2 | vercel-deploy, codex-exec |
|
|
199
|
-
| **External** | 1 | skills-sh-search |
|
|
200
|
-
|
|
201
|
-
Skills use a 3-tier scope system (`core`, `harness`, `package`) to control deployment behavior during `omcustom init`. Core and harness skills are installed by default; package-scoped skills (e.g., npm-publish) are excluded.
|
|
202
|
-
|
|
203
|
-
### Guides (25)
|
|
182
|
+
| Command | What it does |
|
|
183
|
+
|---------|-------------|
|
|
184
|
+
| `/memory-save` | Save session context |
|
|
185
|
+
| `/memory-recall` | Search and recall memories |
|
|
186
|
+
| `/omcustom:monitoring-setup` | OTel monitoring toggle |
|
|
187
|
+
| `/omcustom:lists` | Show all commands |
|
|
188
|
+
| `/omcustom:status` | System health check |
|
|
204
189
|
|
|
205
|
-
|
|
206
|
-
- Agent creation and management
|
|
207
|
-
- Skill development
|
|
208
|
-
- Pipeline workflows
|
|
209
|
-
- Sub-agent orchestration
|
|
210
|
-
- Best practices and patterns
|
|
211
|
-
- Data engineering workflows
|
|
212
|
-
- Database optimization
|
|
190
|
+
---
|
|
213
191
|
|
|
214
192
|
### Rules (19)
|
|
215
193
|
|
|
216
194
|
| Priority | Count | Purpose |
|
|
217
195
|
|----------|-------|---------|
|
|
218
|
-
| **MUST** |
|
|
219
|
-
| **SHOULD** | 6 |
|
|
220
|
-
| **MAY** | 1 | Optimization
|
|
196
|
+
| **MUST** | 13 | Safety, permissions, agent design, identification, orchestration, verification, completion |
|
|
197
|
+
| **SHOULD** | 6 | Interaction, error handling, memory, HUD, ecomode, ontology routing |
|
|
198
|
+
| **MAY** | 1 | Optimization |
|
|
221
199
|
|
|
222
|
-
|
|
200
|
+
Key rules: R010 (orchestrator never writes files), R009 (parallel execution mandatory), R017 (sauron verification before push), R020 (completion verification before declaring done).
|
|
223
201
|
|
|
224
|
-
|
|
202
|
+
---
|
|
225
203
|
|
|
226
|
-
###
|
|
204
|
+
### Guides (25)
|
|
227
205
|
|
|
228
|
-
|
|
206
|
+
Reference documentation covering best practices, architecture decisions, and integration patterns. Located in `guides/` at project root, covering topics from agent design to CI/CD to observability.
|
|
229
207
|
|
|
230
|
-
|
|
208
|
+
---
|
|
231
209
|
|
|
232
|
-
|
|
210
|
+
## Safety
|
|
233
211
|
|
|
234
|
-
|
|
212
|
+
oh-my-customcode includes three security hooks that run on every tool call:
|
|
235
213
|
|
|
236
|
-
|
|
|
237
|
-
|
|
238
|
-
|
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
| **Hybrid Search** | 4-signal ranking (keyword, graph, community, importance) |
|
|
242
|
-
| **Token Budget** | Adaptive budget management — reduces token usage by 75-95% |
|
|
243
|
-
| **MCP Server** | Direct integration with Claude Code via MCP protocol |
|
|
214
|
+
| Hook | Trigger | Action |
|
|
215
|
+
|------|---------|--------|
|
|
216
|
+
| secret-filter | Bash, Read output | Detects AWS keys, API tokens, private keys, bearer tokens |
|
|
217
|
+
| audit-log | Edit, Write, Bash, Agent | Append-only JSONL at `~/.claude/audit.jsonl` |
|
|
218
|
+
| schema-validator | Write, Edit, Bash input | Validates tool inputs, flags dangerous patterns |
|
|
244
219
|
|
|
245
|
-
|
|
220
|
+
All security hooks are advisory (exit 0). They warn but never block.
|
|
246
221
|
|
|
247
222
|
---
|
|
248
223
|
|
|
249
|
-
## CLI
|
|
224
|
+
## CLI
|
|
250
225
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
| `omcustom security` | Scan for security issues in hooks and configs |
|
|
261
|
-
|
|
262
|
-
**Global Options:**
|
|
263
|
-
| Option | Description |
|
|
264
|
-
|--------|-------------|
|
|
265
|
-
| `--skip-version-check` | Skip CLI tool version pre-flight check |
|
|
266
|
-
| `-v, --version` | Show version number |
|
|
267
|
-
| `-h, --help` | Show help |
|
|
226
|
+
```bash
|
|
227
|
+
omcustom init # Initialize in project
|
|
228
|
+
omcustom init --lang ko # Initialize with Korean
|
|
229
|
+
omcustom update # Update to latest
|
|
230
|
+
omcustom list # List components
|
|
231
|
+
omcustom doctor # Verify installation
|
|
232
|
+
omcustom doctor --fix # Auto-fix issues
|
|
233
|
+
omcustom security # Scan for security issues
|
|
234
|
+
```
|
|
268
235
|
|
|
269
236
|
---
|
|
270
237
|
|
|
271
238
|
## Project Structure
|
|
272
239
|
|
|
273
|
-
After `omcustom init`:
|
|
274
|
-
|
|
275
240
|
```
|
|
276
241
|
your-project/
|
|
277
|
-
├── CLAUDE.md
|
|
242
|
+
├── CLAUDE.md # Entry point
|
|
278
243
|
├── .claude/
|
|
279
|
-
│ ├── agents/
|
|
280
|
-
│
|
|
281
|
-
│
|
|
282
|
-
│
|
|
283
|
-
│
|
|
284
|
-
│ ├──
|
|
285
|
-
│
|
|
286
|
-
│
|
|
287
|
-
|
|
288
|
-
│ │ └── ...
|
|
289
|
-
│ ├── ontology/ # Ontology knowledge graph for RAG context
|
|
290
|
-
│ │ ├── schema.yaml
|
|
291
|
-
│ │ ├── agents.yaml
|
|
292
|
-
│ │ ├── skills.yaml
|
|
293
|
-
│ │ ├── rules.yaml
|
|
294
|
-
│ │ └── graphs/
|
|
295
|
-
│ ├── rules/ # Behavior rules (19 total)
|
|
296
|
-
│ ├── hooks/ # Event hooks (1 total)
|
|
297
|
-
│ └── contexts/ # Context files (4 total)
|
|
298
|
-
└── templates/
|
|
299
|
-
└── guides/ # Reference docs (25 total)
|
|
244
|
+
│ ├── agents/ # 44 agent definitions
|
|
245
|
+
│ ├── skills/ # 74 skill modules
|
|
246
|
+
│ ├── rules/ # 20 governance rules (R000-R020)
|
|
247
|
+
│ ├── hooks/ # 15 lifecycle hook scripts
|
|
248
|
+
│ ├── schemas/ # Tool input validation schemas
|
|
249
|
+
│ ├── specs/ # Extracted canonical specs
|
|
250
|
+
│ ├── contexts/ # 4 shared context files
|
|
251
|
+
│ └── ontology/ # Knowledge graph for RAG
|
|
252
|
+
└── guides/ # 25 reference documents
|
|
300
253
|
```
|
|
301
254
|
|
|
302
|
-
**Note**: In the official Claude Code format, there is no command registry — slash commands and natural language agent references are used.
|
|
303
|
-
|
|
304
255
|
---
|
|
305
256
|
|
|
306
257
|
## Development
|
|
@@ -309,30 +260,10 @@ your-project/
|
|
|
309
260
|
bun install # Install dependencies
|
|
310
261
|
bun run dev # Development mode
|
|
311
262
|
bun test # Run tests
|
|
312
|
-
bun run build #
|
|
263
|
+
bun run build # Production build
|
|
313
264
|
```
|
|
314
265
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
| Gate | Tool | Threshold |
|
|
318
|
-
|------|------|-----------|
|
|
319
|
-
| Lint | Biome | Zero errors (complexity enforced) |
|
|
320
|
-
| Test Coverage | Bun test | 95% (pre-commit), 97% (CI) |
|
|
321
|
-
| Security Audit | bun pm audit | No high/critical vulnerabilities |
|
|
322
|
-
| Dependabot | GitHub | Weekly scans, auto-PR for updates |
|
|
323
|
-
|
|
324
|
-
Pre-commit hooks automatically enforce lint, test, and coverage gates before each commit.
|
|
325
|
-
|
|
326
|
-
### Requirements
|
|
327
|
-
|
|
328
|
-
- Node.js >= 18.0.0
|
|
329
|
-
- Claude Code CLI
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Contributing
|
|
334
|
-
|
|
335
|
-
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
266
|
+
Requirements: Node.js >= 18.0.0, Claude Code CLI.
|
|
336
267
|
|
|
337
268
|
---
|
|
338
269
|
|
|
@@ -343,7 +274,7 @@ Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
343
274
|
---
|
|
344
275
|
|
|
345
276
|
<p align="center">
|
|
346
|
-
<strong>
|
|
277
|
+
<strong>No expert? Create one. Connect knowledge. Execute.</strong>
|
|
347
278
|
</p>
|
|
348
279
|
|
|
349
280
|
<p align="center">
|
package/package.json
CHANGED
|
@@ -72,6 +72,16 @@
|
|
|
72
72
|
],
|
|
73
73
|
"description": "Validate file content hash before Edit — advisory staleness warning"
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
"matcher": "tool == \"Write\" || tool == \"Edit\" || tool == \"Bash\"",
|
|
77
|
+
"hooks": [
|
|
78
|
+
{
|
|
79
|
+
"type": "command",
|
|
80
|
+
"command": "bash .claude/hooks/scripts/schema-validator.sh"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"description": "Schema-based tool input validation — Phase 1 advisory only"
|
|
84
|
+
},
|
|
75
85
|
{
|
|
76
86
|
"matcher": "tool == \"Task\" || tool == \"Agent\"",
|
|
77
87
|
"hooks": [
|
|
@@ -222,6 +232,26 @@
|
|
|
222
232
|
],
|
|
223
233
|
"description": "Context budget advisor — track tool usage patterns and advise ecomode activation"
|
|
224
234
|
},
|
|
235
|
+
{
|
|
236
|
+
"matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"Task\" || tool == \"Agent\"",
|
|
237
|
+
"hooks": [
|
|
238
|
+
{
|
|
239
|
+
"type": "command",
|
|
240
|
+
"command": "bash .claude/hooks/scripts/stuck-detector.sh"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"description": "Detect repetitive failure loops and advise recovery strategies"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"Task\" || tool == \"Agent\"",
|
|
247
|
+
"hooks": [
|
|
248
|
+
{
|
|
249
|
+
"type": "command",
|
|
250
|
+
"command": "bash .claude/hooks/scripts/cost-cap-advisor.sh"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"description": "Advisory cost cap monitoring — warn when session cost approaches configurable limit"
|
|
254
|
+
},
|
|
225
255
|
{
|
|
226
256
|
"matcher": "tool == \"Read\"",
|
|
227
257
|
"hooks": [
|
|
@@ -233,24 +263,24 @@
|
|
|
233
263
|
"description": "Store content hashes for Read operations — enables Edit staleness detection"
|
|
234
264
|
},
|
|
235
265
|
{
|
|
236
|
-
"matcher": "tool == \"
|
|
266
|
+
"matcher": "tool == \"Bash\" || tool == \"Read\"",
|
|
237
267
|
"hooks": [
|
|
238
268
|
{
|
|
239
269
|
"type": "command",
|
|
240
|
-
"command": "bash .claude/hooks/scripts/
|
|
270
|
+
"command": "bash .claude/hooks/scripts/secret-filter.sh"
|
|
241
271
|
}
|
|
242
272
|
],
|
|
243
|
-
"description": "Detect
|
|
273
|
+
"description": "Detect potential secrets in Bash/Read output — advisory warning only"
|
|
244
274
|
},
|
|
245
275
|
{
|
|
246
|
-
"matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"
|
|
276
|
+
"matcher": "tool == \"Edit\" || tool == \"Write\" || tool == \"Bash\" || tool == \"Agent\"",
|
|
247
277
|
"hooks": [
|
|
248
278
|
{
|
|
249
279
|
"type": "command",
|
|
250
|
-
"command": "bash .claude/hooks/scripts/
|
|
280
|
+
"command": "bash .claude/hooks/scripts/audit-log.sh"
|
|
251
281
|
}
|
|
252
282
|
],
|
|
253
|
-
"description": "
|
|
283
|
+
"description": "Append-only audit log for state-changing tool operations"
|
|
254
284
|
}
|
|
255
285
|
],
|
|
256
286
|
"Stop": [
|
|
@@ -269,7 +299,7 @@
|
|
|
269
299
|
"hooks": [
|
|
270
300
|
{
|
|
271
301
|
"type": "prompt",
|
|
272
|
-
"prompt": "Session-end memory checkpoint (R011 enforcement). Check conversation history for these
|
|
302
|
+
"prompt": "Session-end memory checkpoint (R011 enforcement). Check conversation history for these 2 steps: 1) sys-memory-keeper was delegated to update MEMORY.md 2) claude-mem save was attempted via ToolSearch + mcp__plugin_claude-mem_mcp-search__save_memory. Note: episodic-memory auto-indexes after session — no manual verification needed. Decision rules: If BOTH were attempted (success or failure both count): approve. If MCP tools are unavailable after ToolSearch attempt: approve with note. If session had no explicit session-end signal from user (quick question, no memory work): approve. If any step was NOT attempted despite user signaling session end: block with systemMessage listing the missing steps."
|
|
273
303
|
}
|
|
274
304
|
],
|
|
275
305
|
"description": "Enforce R011 session-end memory saves — block stop if claude-mem or episodic-memory saves were skipped"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Audit Log Hook — Append-only JSONL persistence
|
|
3
|
+
# Trigger: PostToolUse on Edit, Write, Bash, Agent
|
|
4
|
+
# Purpose: Persistent audit trail for security and compliance
|
|
5
|
+
# Protocol: stdin JSON -> log entry -> stdout pass-through
|
|
6
|
+
# Always exits 0 (advisory only)
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
input=$(cat)
|
|
11
|
+
|
|
12
|
+
# Extract fields from hook input
|
|
13
|
+
tool_name=$(echo "$input" | jq -r '.tool_name // "unknown"')
|
|
14
|
+
file_path=$(echo "$input" | jq -r '.tool_input.file_path // .tool_input.command // ""' | head -c 200)
|
|
15
|
+
agent_type=$(echo "$input" | jq -r '.agent_type // "unknown"')
|
|
16
|
+
model=$(echo "$input" | jq -r '.model // "unknown"')
|
|
17
|
+
is_error=$(echo "$input" | jq -r '.tool_output.is_error // false')
|
|
18
|
+
timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
19
|
+
|
|
20
|
+
# Determine outcome
|
|
21
|
+
if [ "$is_error" = "true" ]; then
|
|
22
|
+
outcome="error"
|
|
23
|
+
else
|
|
24
|
+
outcome="success"
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Audit log location
|
|
28
|
+
AUDIT_LOG="${HOME}/.claude/audit.jsonl"
|
|
29
|
+
|
|
30
|
+
# Ensure directory exists
|
|
31
|
+
mkdir -p "$(dirname "$AUDIT_LOG")"
|
|
32
|
+
|
|
33
|
+
# Write audit entry (append-only JSONL)
|
|
34
|
+
jq -cn \
|
|
35
|
+
--arg ts "$timestamp" \
|
|
36
|
+
--arg tool "$tool_name" \
|
|
37
|
+
--arg path "$file_path" \
|
|
38
|
+
--arg agent "$agent_type" \
|
|
39
|
+
--arg model "$model" \
|
|
40
|
+
--arg outcome "$outcome" \
|
|
41
|
+
--arg ppid "${PPID}" \
|
|
42
|
+
'{timestamp: $ts, tool: $tool, path: $path, agent_type: $agent, model: $model, outcome: $outcome, session_ppid: $ppid}' \
|
|
43
|
+
>> "$AUDIT_LOG" 2>/dev/null || true
|
|
44
|
+
|
|
45
|
+
# Daily rotation check (rotate if > 10MB)
|
|
46
|
+
if [ -f "$AUDIT_LOG" ]; then
|
|
47
|
+
file_size=$(stat -f%z "$AUDIT_LOG" 2>/dev/null || stat -c%s "$AUDIT_LOG" 2>/dev/null || echo "0")
|
|
48
|
+
if [ "$file_size" -gt 10485760 ]; then
|
|
49
|
+
mv "$AUDIT_LOG" "${AUDIT_LOG}.$(date -u +%Y%m%d%H%M%S)" 2>/dev/null || true
|
|
50
|
+
fi
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Pass through
|
|
54
|
+
echo "$input"
|
|
55
|
+
exit 0
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Schema Validator Hook — PreToolUse input validation
|
|
3
|
+
# Trigger: PreToolUse on Write, Edit, Bash
|
|
4
|
+
# Purpose: Validate tool inputs against JSON Schema definitions
|
|
5
|
+
# Phase 1: Advisory only (exit 0 with stderr warning)
|
|
6
|
+
# Protocol: stdin JSON -> validate -> stdout pass-through
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
input=$(cat)
|
|
11
|
+
|
|
12
|
+
# Extract tool info
|
|
13
|
+
tool_name=$(echo "$input" | jq -r '.tool_name // "unknown"')
|
|
14
|
+
tool_input=$(echo "$input" | jq -r '.tool_input // {}')
|
|
15
|
+
|
|
16
|
+
SCHEMA_FILE=".claude/schemas/tool-inputs.json"
|
|
17
|
+
|
|
18
|
+
# Skip if schema file doesn't exist
|
|
19
|
+
if [ ! -f "$SCHEMA_FILE" ]; then
|
|
20
|
+
echo "$input"
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
warnings=()
|
|
25
|
+
|
|
26
|
+
case "$tool_name" in
|
|
27
|
+
"Write")
|
|
28
|
+
file_path=$(echo "$tool_input" | jq -r '.file_path // ""')
|
|
29
|
+
content=$(echo "$tool_input" | jq -r '.content // ""')
|
|
30
|
+
|
|
31
|
+
if [ -z "$file_path" ]; then
|
|
32
|
+
warnings+=("[Schema] Write: file_path is empty or missing")
|
|
33
|
+
fi
|
|
34
|
+
if [ -z "$content" ]; then
|
|
35
|
+
warnings+=("[Schema] Write: content is empty — creating empty file?")
|
|
36
|
+
fi
|
|
37
|
+
;;
|
|
38
|
+
|
|
39
|
+
"Edit")
|
|
40
|
+
file_path=$(echo "$tool_input" | jq -r '.file_path // ""')
|
|
41
|
+
old_string=$(echo "$tool_input" | jq -r '.old_string // ""')
|
|
42
|
+
new_string=$(echo "$tool_input" | jq -r '.new_string // ""')
|
|
43
|
+
|
|
44
|
+
if [ -z "$file_path" ]; then
|
|
45
|
+
warnings+=("[Schema] Edit: file_path is empty or missing")
|
|
46
|
+
fi
|
|
47
|
+
if [ -z "$old_string" ]; then
|
|
48
|
+
warnings+=("[Schema] Edit: old_string is empty")
|
|
49
|
+
fi
|
|
50
|
+
if [ "$old_string" = "$new_string" ]; then
|
|
51
|
+
warnings+=("[Schema] Edit: old_string equals new_string — no-op edit")
|
|
52
|
+
fi
|
|
53
|
+
;;
|
|
54
|
+
|
|
55
|
+
"Bash")
|
|
56
|
+
command=$(echo "$tool_input" | jq -r '.command // ""')
|
|
57
|
+
|
|
58
|
+
if [ -z "$command" ]; then
|
|
59
|
+
warnings+=("[Schema] Bash: command is empty")
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# Check dangerous patterns
|
|
63
|
+
if echo "$command" | grep -qE 'rm\s+-rf\s+/[^.]'; then
|
|
64
|
+
warnings+=("[Schema] Bash: DANGER — recursive delete from root detected")
|
|
65
|
+
fi
|
|
66
|
+
if echo "$command" | grep -qE '^\s*sudo\s+'; then
|
|
67
|
+
warnings+=("[Schema] Bash: elevated privilege command detected")
|
|
68
|
+
fi
|
|
69
|
+
if echo "$command" | grep -qE '> /dev/sd'; then
|
|
70
|
+
warnings+=("[Schema] Bash: direct disk write detected")
|
|
71
|
+
fi
|
|
72
|
+
if echo "$command" | grep -qE 'mkfs\.'; then
|
|
73
|
+
warnings+=("[Schema] Bash: filesystem format command detected")
|
|
74
|
+
fi
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
|
|
78
|
+
# Output warnings (advisory only)
|
|
79
|
+
if [ ${#warnings[@]} -gt 0 ]; then
|
|
80
|
+
for w in "${warnings[@]}"; do
|
|
81
|
+
echo "$w" >&2
|
|
82
|
+
done
|
|
83
|
+
echo "[Schema] Phase 1: advisory only — not blocking" >&2
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Always pass through (Phase 1)
|
|
87
|
+
echo "$input"
|
|
88
|
+
exit 0
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Secret Output Filter Hook — Detect potential secrets in tool output
|
|
3
|
+
# Trigger: PostToolUse on Bash, Read
|
|
4
|
+
# Purpose: Advisory warning when potential secrets detected in output
|
|
5
|
+
# Protocol: stdin JSON -> scan -> stdout pass-through
|
|
6
|
+
# Always exits 0 (advisory only, never blocks)
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
input=$(cat)
|
|
11
|
+
|
|
12
|
+
# Extract output to scan
|
|
13
|
+
tool_name=$(echo "$input" | jq -r '.tool_name // "unknown"')
|
|
14
|
+
output=$(echo "$input" | jq -r '.tool_output.output // ""')
|
|
15
|
+
|
|
16
|
+
# Skip if no output
|
|
17
|
+
if [ -z "$output" ] || [ "$output" = "null" ]; then
|
|
18
|
+
echo "$input"
|
|
19
|
+
exit 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Secret patterns to detect
|
|
23
|
+
detected=false
|
|
24
|
+
|
|
25
|
+
# AWS Access Key ID
|
|
26
|
+
if echo "$output" | grep -qE 'AKIA[0-9A-Z]{16}'; then
|
|
27
|
+
echo "[Security] Potential AWS Access Key detected in ${tool_name} output" >&2
|
|
28
|
+
detected=true
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# OpenAI/Anthropic API Key
|
|
32
|
+
if echo "$output" | grep -qE 'sk-[a-zA-Z0-9]{32,}'; then
|
|
33
|
+
echo "[Security] Potential API key (sk-*) detected in ${tool_name} output" >&2
|
|
34
|
+
detected=true
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# GitHub Personal Access Token
|
|
38
|
+
if echo "$output" | grep -qE 'ghp_[a-zA-Z0-9]{36}'; then
|
|
39
|
+
echo "[Security] Potential GitHub PAT detected in ${tool_name} output" >&2
|
|
40
|
+
detected=true
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Private Key
|
|
44
|
+
if echo "$output" | grep -qE '-----BEGIN.*PRIVATE KEY-----'; then
|
|
45
|
+
echo "[Security] Potential private key detected in ${tool_name} output" >&2
|
|
46
|
+
detected=true
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# Bearer Token (long)
|
|
50
|
+
if echo "$output" | grep -qE 'Bearer [a-zA-Z0-9._-]{20,}'; then
|
|
51
|
+
echo "[Security] Potential Bearer token detected in ${tool_name} output" >&2
|
|
52
|
+
detected=true
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# GitHub OAuth Token
|
|
56
|
+
if echo "$output" | grep -qE 'gho_[a-zA-Z0-9]{36}'; then
|
|
57
|
+
echo "[Security] Potential GitHub OAuth token detected in ${tool_name} output" >&2
|
|
58
|
+
detected=true
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
if [ "$detected" = true ]; then
|
|
62
|
+
echo "[Security] Review output carefully — do NOT commit or expose secrets" >&2
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Pass through (always)
|
|
66
|
+
echo "$input"
|
|
67
|
+
exit 0
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Stop hook: Session compliance report (R265 Phase 1)
|
|
3
|
+
# Reads violation logs collected by PreToolUse hooks during the session
|
|
4
|
+
# Advisory only — never blocks session termination
|
|
5
|
+
# Ref: https://github.com/baekenough/oh-my-customcode/issues/265
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
input=$(cat)
|
|
10
|
+
|
|
11
|
+
VIOLATIONS_FILE="/tmp/.claude-violations-${PPID}"
|
|
12
|
+
TASK_COUNT_FILE="/tmp/.claude-task-count-${PPID}"
|
|
13
|
+
|
|
14
|
+
echo "" >&2
|
|
15
|
+
echo "╔══════════════════════════════════════════════╗" >&2
|
|
16
|
+
echo "║ Session Compliance Report ║" >&2
|
|
17
|
+
echo "╚══════════════════════════════════════════════╝" >&2
|
|
18
|
+
|
|
19
|
+
# Count total Agent/Task calls
|
|
20
|
+
if [ -f "$TASK_COUNT_FILE" ]; then
|
|
21
|
+
TOTAL_TASKS=$(cat "$TASK_COUNT_FILE")
|
|
22
|
+
echo "[Compliance] Agent/Task calls this session: ${TOTAL_TASKS}" >&2
|
|
23
|
+
else
|
|
24
|
+
TOTAL_TASKS=0
|
|
25
|
+
echo "[Compliance] Agent/Task calls this session: 0" >&2
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Check violations
|
|
29
|
+
if [ -f "$VIOLATIONS_FILE" ] && [ -s "$VIOLATIONS_FILE" ]; then
|
|
30
|
+
VIOLATION_COUNT=$(wc -l < "$VIOLATIONS_FILE" | tr -d ' ')
|
|
31
|
+
echo "[Compliance] Violations detected: ${VIOLATION_COUNT}" >&2
|
|
32
|
+
echo "" >&2
|
|
33
|
+
|
|
34
|
+
# Group by rule
|
|
35
|
+
R010_COUNT=$(grep -c '"rule":"R010"' "$VIOLATIONS_FILE" 2>/dev/null || echo "0")
|
|
36
|
+
R018_COUNT=$(grep -c '"rule":"R018"' "$VIOLATIONS_FILE" 2>/dev/null || echo "0")
|
|
37
|
+
|
|
38
|
+
if [ "$R010_COUNT" -gt 0 ]; then
|
|
39
|
+
echo " R010 (Git Delegation): ${R010_COUNT} violation(s)" >&2
|
|
40
|
+
grep '"rule":"R010"' "$VIOLATIONS_FILE" | jq -r '.detail' 2>/dev/null | while read -r detail; do
|
|
41
|
+
echo " - ${detail}" >&2
|
|
42
|
+
done
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
if [ "$R018_COUNT" -gt 0 ]; then
|
|
46
|
+
echo " R018 (Agent Teams): ${R018_COUNT} violation(s)" >&2
|
|
47
|
+
grep '"rule":"R018"' "$VIOLATIONS_FILE" | jq -r '.detail' 2>/dev/null | while read -r detail; do
|
|
48
|
+
echo " - ${detail}" >&2
|
|
49
|
+
done
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
echo "" >&2
|
|
53
|
+
echo "[Compliance] Review violations above and consider rule updates per R016." >&2
|
|
54
|
+
else
|
|
55
|
+
echo "[Compliance] No violations detected. All clear!" >&2
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "────────────────────────────────────────────────" >&2
|
|
59
|
+
|
|
60
|
+
# Cleanup temp files (best effort)
|
|
61
|
+
rm -f "$VIOLATIONS_FILE" 2>/dev/null || true
|
|
62
|
+
|
|
63
|
+
# CRITICAL: Always pass through input and exit 0
|
|
64
|
+
echo "$input"
|
|
65
|
+
exit 0
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"description": "Tool input validation schemas for PreToolUse hook",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Write": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["file_path", "content"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"file_path": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"description": "Absolute file path to write"
|
|
13
|
+
},
|
|
14
|
+
"content": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "File content to write"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"Edit": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": ["file_path", "old_string", "new_string"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"file_path": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "Absolute file path to edit"
|
|
28
|
+
},
|
|
29
|
+
"old_string": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"description": "Text to find and replace"
|
|
33
|
+
},
|
|
34
|
+
"new_string": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Replacement text"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalValidation": {
|
|
40
|
+
"rule": "old_string !== new_string",
|
|
41
|
+
"message": "old_string and new_string must be different"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"Bash": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["command"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"command": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"description": "Shell command to execute"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"dangerousPatterns": [
|
|
55
|
+
{ "pattern": "rm\\s+-rf\\s+/", "message": "Dangerous recursive delete from root" },
|
|
56
|
+
{ "pattern": "sudo\\s+", "message": "Elevated privilege command detected" },
|
|
57
|
+
{ "pattern": "> /dev/sd", "message": "Direct disk write detected" },
|
|
58
|
+
{ "pattern": "mkfs\\.", "message": "Filesystem format command detected" }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omcustom-release-notes
|
|
3
|
+
description: Generate structured release notes from git history and closed issues within Claude Code session
|
|
4
|
+
scope: harness
|
|
5
|
+
user-invocable: true
|
|
6
|
+
argument-hint: "<version> [--previous-tag <tag>]"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Release Notes Generator
|
|
10
|
+
|
|
11
|
+
Generate structured release notes directly within the Claude Code session, using git history and GitHub issues. No external API calls needed — Claude Code itself analyzes and generates the notes.
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Replaces the CI-based `release-notes.yml` workflow that previously used Claude API (`ANTHROPIC_API_KEY`). The release notes are now generated in-session and passed directly to `gh release create --notes`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/omcustom:release-notes 0.36.0
|
|
21
|
+
/omcustom:release-notes 0.36.0 --previous-tag v0.35.3
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Phase 1: Gather Context
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 1. Determine previous tag
|
|
30
|
+
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^v${VERSION}$" | head -1)
|
|
31
|
+
|
|
32
|
+
# 2. Get commit history
|
|
33
|
+
git log ${PREV_TAG}..HEAD --pretty=format:"%h %s"
|
|
34
|
+
|
|
35
|
+
# 3. Get changed files
|
|
36
|
+
git diff --name-status ${PREV_TAG}..HEAD
|
|
37
|
+
|
|
38
|
+
# 4. Get closed issues since previous tag
|
|
39
|
+
gh issue list --state closed --search "closed:>$(git log -1 --format=%ci ${PREV_TAG} | cut -d' ' -f1)" --json number,title,labels
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Phase 2: Classify Changes
|
|
43
|
+
|
|
44
|
+
Categorize commits using Conventional Commits:
|
|
45
|
+
|
|
46
|
+
| Prefix | Category | Emoji |
|
|
47
|
+
|--------|----------|-------|
|
|
48
|
+
| feat: | Features | :rocket: |
|
|
49
|
+
| fix: | Bug Fixes | :bug: |
|
|
50
|
+
| docs: | Documentation | :books: |
|
|
51
|
+
| refactor: | Refactoring | :recycle: |
|
|
52
|
+
| test: | Tests | :test_tube: |
|
|
53
|
+
| chore: | Chores | :wrench: |
|
|
54
|
+
| security | Security | :lock: |
|
|
55
|
+
|
|
56
|
+
### Phase 3: Generate Notes
|
|
57
|
+
|
|
58
|
+
Output format:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Release v{VERSION}
|
|
62
|
+
|
|
63
|
+
## Highlights
|
|
64
|
+
(1-3 key features/changes)
|
|
65
|
+
|
|
66
|
+
## :rocket: Features
|
|
67
|
+
- **{title}** (#{issue}): {description}
|
|
68
|
+
|
|
69
|
+
## :bug: Bug Fixes
|
|
70
|
+
- **{title}** (#{issue}): {description}
|
|
71
|
+
|
|
72
|
+
## :lock: Security
|
|
73
|
+
- {security changes}
|
|
74
|
+
|
|
75
|
+
## :books: Documentation
|
|
76
|
+
- {doc changes}
|
|
77
|
+
|
|
78
|
+
## :recycle: Other Changes
|
|
79
|
+
- {other changes}
|
|
80
|
+
|
|
81
|
+
## Resource Changes
|
|
82
|
+
| Resource | Before | After | Delta |
|
|
83
|
+
|----------|--------|-------|-------|
|
|
84
|
+
| Rules | {n} | {n} | {delta} |
|
|
85
|
+
| Skills | {n} | {n} | {delta} |
|
|
86
|
+
| Agents | {n} | {n} | {delta} |
|
|
87
|
+
|
|
88
|
+
## Breaking Changes
|
|
89
|
+
{if any, otherwise omit section}
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
_Release notes generated with Claude Code_
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Phase 4: Apply
|
|
96
|
+
|
|
97
|
+
The generated notes can be:
|
|
98
|
+
1. **Direct**: Passed to `gh release create --notes "{notes}"`
|
|
99
|
+
2. **File**: Written to `release_notes.md` for review before use
|
|
100
|
+
3. **Update**: Used with `gh release edit v{VERSION} --notes "{notes}"`
|
|
101
|
+
|
|
102
|
+
## Integration
|
|
103
|
+
|
|
104
|
+
This skill is designed to be used during the release process:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
/omcustom:npm-version patch|minor|major -> version bump
|
|
108
|
+
/omcustom:release-notes {version} -> generate notes
|
|
109
|
+
mgr-gitnerd: gh release create -> create release with notes
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Notes
|
|
113
|
+
|
|
114
|
+
- No external API keys required
|
|
115
|
+
- Uses git history and gh CLI for data gathering
|
|
116
|
+
- Claude Code analyzes and generates notes in-context
|
|
117
|
+
- Resource count changes auto-detected from CLAUDE.md history
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omcustom-takeover
|
|
3
|
+
description: Extract canonical spec from existing agent or skill files
|
|
4
|
+
scope: harness
|
|
5
|
+
user-invocable: true
|
|
6
|
+
argument-hint: "<agent-name>"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Takeover Skill
|
|
10
|
+
|
|
11
|
+
Extract a canonical specification from an existing agent or skill file. Inspired by codespeak.dev's reverse compilation concept — deriving specs from existing implementations.
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
When an agent or skill has evolved organically without a formal spec, `takeover` reverse-engineers a structured specification that captures its intent, invariants, workflow contract, and I/O contract.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/omcustom:takeover <agent-name>
|
|
21
|
+
/omcustom:takeover <skill-name>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Phase 1: Read Target
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
1. Determine target type:
|
|
30
|
+
- Agent: read .claude/agents/<name>.md
|
|
31
|
+
- Skill: read .claude/skills/<name>/SKILL.md
|
|
32
|
+
2. Parse frontmatter (YAML metadata)
|
|
33
|
+
3. Parse body (markdown content)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Phase 2: Extract Spec Components
|
|
37
|
+
|
|
38
|
+
Extract these components from the target:
|
|
39
|
+
|
|
40
|
+
| Component | Source | Description |
|
|
41
|
+
|-----------|--------|-------------|
|
|
42
|
+
| `intent` | Description field + first paragraph | One-line purpose statement |
|
|
43
|
+
| `invariants` | Rules referenced, constraints mentioned | Things that must always be true |
|
|
44
|
+
| `workflow_contract` | Workflow/stages sections | Input → processing → output steps |
|
|
45
|
+
| `io_contract` | Tools field, input/output patterns | What the agent consumes and produces |
|
|
46
|
+
| `dependencies` | Skills field, guide references | External knowledge required |
|
|
47
|
+
| `boundaries` | Limitations field, disallowedTools | What the agent explicitly cannot do |
|
|
48
|
+
|
|
49
|
+
### Phase 3: Generate Spec
|
|
50
|
+
|
|
51
|
+
Output structured spec to `.claude/specs/<name>.spec.md`:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
---
|
|
55
|
+
name: <name>
|
|
56
|
+
type: agent | skill
|
|
57
|
+
source: .claude/agents/<name>.md | .claude/skills/<name>/SKILL.md
|
|
58
|
+
generated: <ISO-8601 timestamp>
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Spec: <name>
|
|
62
|
+
|
|
63
|
+
## Intent
|
|
64
|
+
<one-line purpose>
|
|
65
|
+
|
|
66
|
+
## Invariants
|
|
67
|
+
- <rule or constraint that must always hold>
|
|
68
|
+
- ...
|
|
69
|
+
|
|
70
|
+
## Workflow Contract
|
|
71
|
+
### Input
|
|
72
|
+
<what the agent/skill receives>
|
|
73
|
+
|
|
74
|
+
### Processing
|
|
75
|
+
1. <step>
|
|
76
|
+
2. <step>
|
|
77
|
+
|
|
78
|
+
### Output
|
|
79
|
+
<what the agent/skill produces>
|
|
80
|
+
|
|
81
|
+
## I/O Contract
|
|
82
|
+
### Consumes
|
|
83
|
+
- Tools: [<tools used>]
|
|
84
|
+
- Files: [<files read>]
|
|
85
|
+
- MCP: [<MCP tools if any>]
|
|
86
|
+
|
|
87
|
+
### Produces
|
|
88
|
+
- Files: [<files created/modified>]
|
|
89
|
+
- Output: [<what is returned>]
|
|
90
|
+
|
|
91
|
+
## Dependencies
|
|
92
|
+
- Skills: [<referenced skills>]
|
|
93
|
+
- Guides: [<referenced guides>]
|
|
94
|
+
- Rules: [<rules enforced>]
|
|
95
|
+
|
|
96
|
+
## Boundaries
|
|
97
|
+
- <what the agent explicitly cannot do>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Phase 4: Report
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
[Done] Spec extracted: .claude/specs/<name>.spec.md
|
|
104
|
+
├── Intent: <summary>
|
|
105
|
+
├── Invariants: <count> rules
|
|
106
|
+
├── Workflow: <step count> steps
|
|
107
|
+
└── Dependencies: <count> refs
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Notes
|
|
111
|
+
|
|
112
|
+
- Specs are git-untracked (under `.claude/`)
|
|
113
|
+
- Regenerate anytime with `/omcustom:takeover <name>`
|
|
114
|
+
- Used by `/dev-refactor --spec` for invariant-preserving refactoring
|
|
115
|
+
- Advisory output — human review recommended before using as contract
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reasoning-sandwich
|
|
3
|
+
description: Template for pre-reasoning → action → post-verification model allocation
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Reasoning Sandwich Pattern
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
A model allocation pattern that wraps implementation actions with stronger-model reasoning phases. The "sandwich" structure ensures complex tasks get proper analysis before and verification after the core action.
|
|
13
|
+
|
|
14
|
+
## Pattern
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
[Pre-reasoning] → stronger model (opus)
|
|
18
|
+
├── Analyze requirements
|
|
19
|
+
├── Identify edge cases
|
|
20
|
+
└── Define success criteria
|
|
21
|
+
|
|
22
|
+
[Action] → balanced model (sonnet)
|
|
23
|
+
├── Implement solution
|
|
24
|
+
├── Generate code/content
|
|
25
|
+
└── Execute plan
|
|
26
|
+
|
|
27
|
+
[Post-verification] → balanced or lighter model (sonnet/haiku)
|
|
28
|
+
├── Verify against criteria
|
|
29
|
+
├── Check for regressions
|
|
30
|
+
└── Validate completeness
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Model Allocation Table
|
|
34
|
+
|
|
35
|
+
| Phase | Recommended Model | Rationale |
|
|
36
|
+
|-------|------------------|-----------|
|
|
37
|
+
| Pre-reasoning (analyze/plan) | opus | Complex architectural reasoning, edge case detection |
|
|
38
|
+
| Action (implement/generate) | sonnet | Optimized for code generation, balanced cost |
|
|
39
|
+
| Post-verification (review/test) | sonnet or haiku | Structural verification, checklist validation |
|
|
40
|
+
|
|
41
|
+
## When to Apply
|
|
42
|
+
|
|
43
|
+
| Scenario | Apply Sandwich? | Reason |
|
|
44
|
+
|----------|----------------|--------|
|
|
45
|
+
| New feature implementation | Yes | Needs analysis → code → verification |
|
|
46
|
+
| Bug fix with clear root cause | No | Direct action sufficient |
|
|
47
|
+
| Architecture decision | Yes | Heavy pre-reasoning, lighter action |
|
|
48
|
+
| Batch file edits | No | Mechanical action, no reasoning needed |
|
|
49
|
+
| Security-sensitive changes | Yes | Extra verification phase critical |
|
|
50
|
+
|
|
51
|
+
## Integration
|
|
52
|
+
|
|
53
|
+
This pattern is used by:
|
|
54
|
+
- `structured-dev-cycle` — stages map to sandwich phases
|
|
55
|
+
- `evaluator-optimizer` — generator/evaluator model selection guidance
|
|
56
|
+
- `deep-plan` — research (pre) → plan (action) → verify (post)
|
|
57
|
+
|
|
58
|
+
## Anti-patterns
|
|
59
|
+
|
|
60
|
+
| Anti-pattern | Problem | Fix |
|
|
61
|
+
|-------------|---------|-----|
|
|
62
|
+
| Opus for everything | Wasteful, slow | Reserve opus for reasoning-heavy phases |
|
|
63
|
+
| Haiku for planning | Insufficient depth | Use opus for complex analysis |
|
|
64
|
+
| Skipping verification | False completion risk | Always include post-verification phase |
|
package/templates/CLAUDE.md.en
CHANGED
|
@@ -167,6 +167,7 @@ Violation = immediate correction. No exception for "small changes".
|
|
|
167
167
|
| `/omcustom:npm-publish` | Publish package to npm registry |
|
|
168
168
|
| `/omcustom:npm-version` | Manage semantic versions |
|
|
169
169
|
| `/omcustom:npm-audit` | Audit dependencies |
|
|
170
|
+
| `/omcustom:release-notes` | Generate release notes from git history |
|
|
170
171
|
| `/codex-exec` | Execute Codex CLI prompts |
|
|
171
172
|
| `/optimize-analyze` | Analyze bundle and performance |
|
|
172
173
|
| `/optimize-bundle` | Optimize bundle size |
|
|
@@ -186,7 +187,7 @@ project/
|
|
|
186
187
|
+-- CLAUDE.md # Entry point
|
|
187
188
|
+-- .claude/
|
|
188
189
|
| +-- agents/ # Subagent definitions (44 files)
|
|
189
|
-
| +-- skills/ # Skills (
|
|
190
|
+
| +-- skills/ # Skills (74 directories)
|
|
190
191
|
| +-- rules/ # Global rules (R000-R020)
|
|
191
192
|
| +-- hooks/ # Hook scripts (security, validation, HUD)
|
|
192
193
|
| +-- contexts/ # Context files (ecomode)
|
package/templates/CLAUDE.md.ko
CHANGED
|
@@ -167,6 +167,7 @@ oh-my-customcode로 구동됩니다.
|
|
|
167
167
|
| `/omcustom:npm-publish` | npm 레지스트리에 패키지 배포 |
|
|
168
168
|
| `/omcustom:npm-version` | 시맨틱 버전 관리 |
|
|
169
169
|
| `/omcustom:npm-audit` | 의존성 감사 |
|
|
170
|
+
| `/omcustom:release-notes` | 릴리즈 노트 생성 (git 히스토리 기반) |
|
|
170
171
|
| `/codex-exec` | Codex CLI 프롬프트 실행 |
|
|
171
172
|
| `/optimize-analyze` | 번들 및 성능 분석 |
|
|
172
173
|
| `/optimize-bundle` | 번들 크기 최적화 |
|
|
@@ -186,7 +187,7 @@ project/
|
|
|
186
187
|
+-- CLAUDE.md # 진입점
|
|
187
188
|
+-- .claude/
|
|
188
189
|
| +-- agents/ # 서브에이전트 정의 (44 파일)
|
|
189
|
-
| +-- skills/ # 스킬 (
|
|
190
|
+
| +-- skills/ # 스킬 (74 디렉토리)
|
|
190
191
|
| +-- rules/ # 전역 규칙 (R000-R020)
|
|
191
192
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
192
193
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
package/templates/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.36.
|
|
2
|
+
"version": "0.36.2",
|
|
3
3
|
"lastUpdated": "2026-03-14T00:00:00.000Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"name": "skills",
|
|
19
19
|
"path": ".claude/skills",
|
|
20
20
|
"description": "Reusable skill modules (includes slash commands)",
|
|
21
|
-
"files":
|
|
21
|
+
"files": 74
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "guides",
|