oh-my-customcode 0.99.3 → 0.100.1
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 +3 -3
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/agents/mgr-supplier.md +1 -1
- package/templates/.claude/rules/MUST-permissions.md +12 -0
- package/templates/.claude/skills/adversarial-review/SKILL.md +4 -0
- package/templates/.claude/skills/deep-plan/SKILL.md +30 -9
- package/templates/.claude/skills/deep-verify/SKILL.md +4 -0
- package/templates/.claude/skills/omcustom-release-notes/SKILL.md +4 -0
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +166 -0
- package/templates/.claude/skills/post-release-followup/SKILL.md +9 -5
- package/templates/.claude/skills/pre-generation-arch-check/SKILL.md +115 -0
- package/templates/.claude/skills/professor-triage/SKILL.md +88 -84
- package/templates/.claude/skills/release-plan/SKILL.md +30 -26
- package/templates/.claude/skills/structured-dev-cycle/SKILL.md +4 -0
- package/templates/.claude/skills/token-efficiency-audit/SKILL.md +242 -0
- package/templates/CLAUDE.md +1 -1
- package/templates/manifest.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
**[한국어 문서 (Korean)](./README_ko.md)**
|
|
15
15
|
|
|
16
|
-
48 agents.
|
|
16
|
+
48 agents. 109 skills. 22 rules. One command.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install -g oh-my-customcode && cd your-project && omcustom init
|
|
@@ -132,7 +132,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
|
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
135
|
-
### Skills (
|
|
135
|
+
### Skills (109)
|
|
136
136
|
|
|
137
137
|
| Category | Count | Includes |
|
|
138
138
|
|----------|-------|----------|
|
|
@@ -272,7 +272,7 @@ your-project/
|
|
|
272
272
|
├── CLAUDE.md # Entry point
|
|
273
273
|
├── .claude/
|
|
274
274
|
│ ├── agents/ # 48 agent definitions
|
|
275
|
-
│ ├── skills/ #
|
|
275
|
+
│ ├── skills/ # 109 skill modules
|
|
276
276
|
│ ├── rules/ # 22 governance rules (R000-R021)
|
|
277
277
|
│ ├── hooks/ # 15 lifecycle hook scripts
|
|
278
278
|
│ ├── schemas/ # Tool input validation schemas
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -30,3 +30,15 @@ Approve?
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
On insufficient permission: do not attempt, notify user, suggest alternative.
|
|
33
|
+
|
|
34
|
+
## Agent Tool Permission Mode
|
|
35
|
+
|
|
36
|
+
When spawning subagents via the Agent tool, always pass `mode: "bypassPermissions"` explicitly. The Agent tool's default mode is `acceptEdits`, which **overrides** the agent frontmatter `permissionMode` field.
|
|
37
|
+
|
|
38
|
+
| Setting | Effect |
|
|
39
|
+
|---------|--------|
|
|
40
|
+
| Agent frontmatter `permissionMode: bypassPermissions` | Ignored if Agent tool `mode` not set |
|
|
41
|
+
| Agent tool `mode: "bypassPermissions"` | **Required** — actually controls subagent permissions |
|
|
42
|
+
| Agent tool `mode` omitted | Defaults to `acceptEdits` → prompts for Bash, WebFetch |
|
|
43
|
+
|
|
44
|
+
Skills that spawn agents MUST include `mode: "bypassPermissions"` in their Agent tool call instructions. This applies to all routing skills, pipeline skills, and any skill that delegates work to subagents.
|
|
@@ -78,3 +78,7 @@ Fix: Recommended remediation
|
|
|
78
78
|
- [ ] Do file operations stay within R002-declared access scope?
|
|
79
79
|
- [ ] Are domain boundaries respected (backend agent not editing frontend files)?
|
|
80
80
|
- [ ] Could an agent's task contract be tightened without losing functionality?
|
|
81
|
+
|
|
82
|
+
## Permission Mode
|
|
83
|
+
|
|
84
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -82,22 +82,39 @@ Phase 2: Reality-Check Planning
|
|
|
82
82
|
- Each ADOPT item: Does it already exist? Partially implemented?
|
|
83
83
|
- Each ADAPT item: What is the current state to adapt from?
|
|
84
84
|
- Each AVOID item: Are the alternatives already available?
|
|
85
|
-
3. **
|
|
85
|
+
3. **Deliverable Dependency Verification**: After exploration, verify inter-deliverable dependencies:
|
|
86
|
+
- For each deliverable pair, check: do they share files, functions, or modules?
|
|
87
|
+
- Classify each pair: `independent` (parallel-safe), `sequential` (order required), `shared-state` (synchronization needed)
|
|
88
|
+
- **Default bias**: Assume `independent` unless exploration finds concrete shared state
|
|
89
|
+
- Build dependency matrix:
|
|
86
90
|
|
|
87
91
|
```
|
|
88
|
-
|
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
| "Migrate to v3" | Already on v3.1 | Overestimate | Remove from plan |
|
|
93
|
-
| "Add rate limiting" | Basic limiter exists | Partial gap | Adapt existing |
|
|
92
|
+
| Deliverable A | Deliverable B | Classification | Evidence |
|
|
93
|
+
|---------------|---------------|----------------|----------|
|
|
94
|
+
| D1: Auth | D2: API | independent | No shared files |
|
|
95
|
+
| D1: Auth | D3: Tests | sequential | D3 tests D1 output |
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
- **Orchestrator override**: The dependency classification is advisory. The orchestrator or user can reclassify pairs when the automated analysis is overly conservative.
|
|
99
|
+
|
|
100
|
+
4. **Gap Analysis**: Build a reconciliation table:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
| Research Finding | Actual Code State | Gap Type | Action | Dependencies |
|
|
104
|
+
|-----------------|-------------------|----------|--------|-------------|
|
|
105
|
+
| "No caching" | Redis client exists | Overestimate | Remove from plan | — |
|
|
106
|
+
| "Need auth middleware" | No auth layer | Real gap | Keep in plan | D3 (sequential) |
|
|
107
|
+
| "Migrate to v3" | Already on v3.1 | Overestimate | Remove from plan | — |
|
|
108
|
+
| "Add rate limiting" | Basic limiter exists | Partial gap | Adapt existing | independent |
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
5. **Refined Plan**: Write implementation plan containing ONLY real gaps:
|
|
97
112
|
- Remove overestimates (already implemented)
|
|
98
113
|
- Adjust partial gaps (adapt, don't rebuild)
|
|
99
114
|
- Prioritize real gaps by impact
|
|
100
|
-
|
|
115
|
+
6. **User Approval**: `ExitPlanMode` presents the refined plan for user review
|
|
116
|
+
- Include dependency matrix in plan output
|
|
117
|
+
- Display override option: "Dependency classifications are advisory. Reply with reclassifications if needed."
|
|
101
118
|
|
|
102
119
|
### Phase 3: Plan Verification Research
|
|
103
120
|
|
|
@@ -342,3 +359,7 @@ phases_completed: 3
|
|
|
342
359
|
verdict: PASS|REVISE
|
|
343
360
|
---
|
|
344
361
|
```
|
|
362
|
+
|
|
363
|
+
## Permission Mode
|
|
364
|
+
|
|
365
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -109,3 +109,7 @@ Each agent receives the full diff and returns findings as structured JSON:
|
|
|
109
109
|
- This skill replaces ad-hoc cross-verification with a repeatable process
|
|
110
110
|
- Round 7 philosophy check references CLAUDE.md architecture section and R006/R010/R021 rules
|
|
111
111
|
- Regression check compares function signatures, export lists, and test counts against develop baseline
|
|
112
|
+
|
|
113
|
+
## Permission Mode
|
|
114
|
+
|
|
115
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -115,3 +115,7 @@ mgr-gitnerd: gh release create -> create release with notes
|
|
|
115
115
|
- Uses git history and gh CLI for data gathering
|
|
116
116
|
- Claude Code analyzes and generates notes in-context
|
|
117
117
|
- Resource count changes auto-detected from CLAUDE.md history
|
|
118
|
+
|
|
119
|
+
## Permission Mode
|
|
120
|
+
|
|
121
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
name: auto-dev
|
|
2
|
+
description: "Automated development pipeline — from issue triage to release"
|
|
3
|
+
version: "2.0.0"
|
|
4
|
+
|
|
5
|
+
# Design rule: each pipeline run produces ONE bounded release unit (3-7 issues), not all open issues.
|
|
6
|
+
# This pipeline is a project-agnostic template. Project-specific overrides belong in
|
|
7
|
+
# the project's own workflows/auto-dev.yaml (e.g., AgentNav, second-brain).
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- name: pre-triage
|
|
11
|
+
prompt: |
|
|
12
|
+
Phase 1 — Ensure required labels exist, then scan issues.
|
|
13
|
+
|
|
14
|
+
1. Create labels if missing (idempotent):
|
|
15
|
+
gh label create in-progress --color "FBCA04" --description "Work in progress" --force 2>/dev/null
|
|
16
|
+
gh label create verify-ready --color "0E8A16" --description "Ready for verification" --force 2>/dev/null
|
|
17
|
+
gh label create needs-review --color "D93F0B" --description "Needs manual review" --force 2>/dev/null
|
|
18
|
+
|
|
19
|
+
2. Scan open GitHub issues:
|
|
20
|
+
gh issue list --state open --limit 100 --json number,title,labels,body,milestone
|
|
21
|
+
|
|
22
|
+
3. Group by label and compute for each issue:
|
|
23
|
+
- dependencies: parse "see #N", "depends on #N", "#N 참조" from body
|
|
24
|
+
- blocked_by_decision: true if body references any decision-needed issue
|
|
25
|
+
- effort: XS/S/M/L from scope
|
|
26
|
+
- order: topological sort over dependencies
|
|
27
|
+
|
|
28
|
+
4. Output: dependency-sorted issue table with blocked_by_decision flag.
|
|
29
|
+
description: "Ensure labels exist, scan issues, dependency-analyze"
|
|
30
|
+
|
|
31
|
+
- name: scope-selection
|
|
32
|
+
prompt: |
|
|
33
|
+
Select a single bounded release scope (3-7 issues) for THIS pipeline run.
|
|
34
|
+
|
|
35
|
+
Selection rules:
|
|
36
|
+
1. Determine release tier:
|
|
37
|
+
- No tags yet → v0.1.0
|
|
38
|
+
- Otherwise: highest-priority open tier (bug → chore → feature)
|
|
39
|
+
2. Exclude:
|
|
40
|
+
- blocked_by_decision == true
|
|
41
|
+
- Issues requiring manual/human action
|
|
42
|
+
3. Sort by dependency: prerequisites before dependents
|
|
43
|
+
4. Cap at 7 issues; if priority issues < 7, stop at that priority (don't mix tiers)
|
|
44
|
+
5. Minimum 1 issue; if 0 eligible, halt with "no eligible issues for auto-dev run"
|
|
45
|
+
|
|
46
|
+
Create release milestone and assign scoped issues.
|
|
47
|
+
Output markdown release manifest:
|
|
48
|
+
| order | # | title | prerequisite | effort |
|
|
49
|
+
|
|
50
|
+
Persist manifest as pipeline state for subsequent steps.
|
|
51
|
+
description: "Pick 3-7 issues as v{X.Y.Z} scope, create milestone"
|
|
52
|
+
depends_on: pre-triage
|
|
53
|
+
|
|
54
|
+
- name: triage
|
|
55
|
+
skill: professor-triage
|
|
56
|
+
description: "Cross-analysis triage with priority assessment (scoped to release manifest)"
|
|
57
|
+
depends_on: scope-selection
|
|
58
|
+
|
|
59
|
+
- name: plan
|
|
60
|
+
skill: release-plan
|
|
61
|
+
description: "Release unit plan from triaged issues"
|
|
62
|
+
depends_on: triage
|
|
63
|
+
|
|
64
|
+
- name: deep-plan
|
|
65
|
+
skill: deep-plan
|
|
66
|
+
description: "Research-validated implementation plan (research → plan → verify)"
|
|
67
|
+
depends_on: plan
|
|
68
|
+
|
|
69
|
+
- name: implement
|
|
70
|
+
prompt: |
|
|
71
|
+
Execute the deep-plan output for the scoped release manifest.
|
|
72
|
+
|
|
73
|
+
Per-issue lifecycle:
|
|
74
|
+
1. Start: gh issue edit <N> --add-label in-progress --assignee @me
|
|
75
|
+
2. Comment: gh issue comment <N> --body "Implementation started via auto-dev pipeline"
|
|
76
|
+
3. Dispatch specialist agents per file domain:
|
|
77
|
+
- Detect file types in scope and route to matching agent
|
|
78
|
+
- Use specialized agents (lang-*, be-*, fe-*, infra-*) over general-purpose
|
|
79
|
+
4. TDD via superpowers:test-driven-development when tests apply
|
|
80
|
+
5. Commit via mgr-gitnerd with `Fixes #<N>` trailer in body
|
|
81
|
+
6. On success: remove in-progress, add verify-ready
|
|
82
|
+
7. On failure: remove in-progress, add needs-review, comment error summary
|
|
83
|
+
|
|
84
|
+
Rules:
|
|
85
|
+
- Parallel execution per R009 (max 4 concurrent, respect dependencies)
|
|
86
|
+
- Issues whose prerequisites failed in-run MUST be skipped (log reason)
|
|
87
|
+
- No direct orchestrator writes (R010)
|
|
88
|
+
- All Agent tool calls MUST pass mode: "bypassPermissions" to prevent permission prompts during unattended execution
|
|
89
|
+
|
|
90
|
+
## Local CI-mimic verification (MUST run before marking implement done)
|
|
91
|
+
|
|
92
|
+
After all implementation tasks complete, run these scripts in sequence and halt on failure:
|
|
93
|
+
|
|
94
|
+
1. bash .github/scripts/verify-template-sync.sh
|
|
95
|
+
2. bash .github/scripts/verify-wiki-sync.sh
|
|
96
|
+
|
|
97
|
+
If either fails:
|
|
98
|
+
- For wiki-sync failures: delegate to wiki-curator to generate missing pages (`/omcustom:wiki ingest <path>`)
|
|
99
|
+
- For template-sync failures: delegate to mgr-updater to sync `.claude/` -> `templates/.claude/`
|
|
100
|
+
- After fixes, re-run the scripts until both pass
|
|
101
|
+
|
|
102
|
+
This mirrors CI and prevents the known 1-2 wasted push cycles per release (ref: issue #927, v0.98.0 PR #925).
|
|
103
|
+
description: "Per-issue implementation with lifecycle, specialist routing, and CI-mimic verification"
|
|
104
|
+
depends_on: deep-plan
|
|
105
|
+
|
|
106
|
+
- name: verify-build
|
|
107
|
+
prompt: |
|
|
108
|
+
Project-specific build and test verification.
|
|
109
|
+
|
|
110
|
+
Auto-detect project type and run appropriate checks:
|
|
111
|
+
- Node/Bun: package.json → install + lint + type-check + test
|
|
112
|
+
- Python: py_compile + pytest
|
|
113
|
+
- Go: go build + go vet + go test
|
|
114
|
+
- Docker: docker build (if Dockerfile exists)
|
|
115
|
+
- Static site: file existence + format validation
|
|
116
|
+
|
|
117
|
+
Halt on first failure. Report exact command + stderr.
|
|
118
|
+
Do NOT proceed to release if any check fails.
|
|
119
|
+
description: "Auto-detected build + test verification"
|
|
120
|
+
depends_on: implement
|
|
121
|
+
|
|
122
|
+
- name: deep-verify
|
|
123
|
+
skill: deep-verify
|
|
124
|
+
description: "Multi-angle release quality verification"
|
|
125
|
+
depends_on: verify-build
|
|
126
|
+
|
|
127
|
+
- name: release
|
|
128
|
+
prompt: |
|
|
129
|
+
Create a GitHub Release.
|
|
130
|
+
|
|
131
|
+
1. Version:
|
|
132
|
+
- No existing tags → v0.1.0
|
|
133
|
+
- Otherwise: semver bump (patch for bugfix, minor for features)
|
|
134
|
+
2. Release notes via omcustom-release-notes skill
|
|
135
|
+
3. Delegate to mgr-gitnerd:
|
|
136
|
+
- git tag + push
|
|
137
|
+
- gh release create
|
|
138
|
+
4. Close milestone
|
|
139
|
+
5. Close verify-ready issues with "Fixed in v{version}"
|
|
140
|
+
Label needs-review issues as "Deferred from v{version}"
|
|
141
|
+
|
|
142
|
+
Adapt release mechanism to project:
|
|
143
|
+
- npm project: PR + merge + npm publish verification
|
|
144
|
+
- Non-npm: direct tag on main (trunk-based)
|
|
145
|
+
description: "Git tag + GitHub Release + close milestone/issues"
|
|
146
|
+
depends_on: deep-verify
|
|
147
|
+
|
|
148
|
+
- name: ci-check
|
|
149
|
+
prompt: |
|
|
150
|
+
Post-release CI verification.
|
|
151
|
+
|
|
152
|
+
1. Check if .github/workflows/ has CI workflows
|
|
153
|
+
If NOT: skip with "No CI configured. Skipping." and continue.
|
|
154
|
+
2. If CI exists:
|
|
155
|
+
- gh run list --limit 5
|
|
156
|
+
- Wait for runs triggered by the new tag/push
|
|
157
|
+
- If failures: diagnose, fix, re-verify
|
|
158
|
+
3. For npm projects: verify npm publish succeeded (npm view <pkg> version)
|
|
159
|
+
4. Report final CI status.
|
|
160
|
+
description: "Post-release CI verification and fix loop"
|
|
161
|
+
depends_on: release
|
|
162
|
+
|
|
163
|
+
- name: post-release-followup
|
|
164
|
+
skill: post-release-followup
|
|
165
|
+
description: "Register follow-ups from this release as new issues"
|
|
166
|
+
depends_on: ci-check
|
|
@@ -46,9 +46,9 @@ Remove duplicates (same issue referenced from multiple sources). Categorize:
|
|
|
46
46
|
|
|
47
47
|
| Category | Criteria | Default Action |
|
|
48
48
|
|----------|----------|----------------|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
49
|
+
| **즉시 실행** | P1/P2 잔여 이슈, MEDIUM+ 검증 발견사항, Critical/High PR 리뷰 발견사항 | 즉시 실행 |
|
|
50
|
+
| **이슈 등록** | P3 이슈, LOW 검증 발견사항, 새 TODO, Medium PR 리뷰 발견사항 | 이슈로 등록 |
|
|
51
|
+
| **참고** | 이미 추적 중인 이슈, 외관 관련 메모 | 건너뛰기 |
|
|
52
52
|
|
|
53
53
|
### 3. Present to User
|
|
54
54
|
|
|
@@ -117,8 +117,8 @@ When creating follow-up issues:
|
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
119
|
gh issue create \
|
|
120
|
-
--title "{
|
|
121
|
-
--body "##
|
|
120
|
+
--title "{간결한 설명}" \
|
|
121
|
+
--body "## 출처\n\nv{version} 릴리즈 워크플로우에서 발견.\n\n## 컨텍스트\n\n{triage/verify에서의 상세 컨텍스트}\n\n## 권장 조치\n\n{권장 사항}" \
|
|
122
122
|
--label "professor"
|
|
123
123
|
```
|
|
124
124
|
|
|
@@ -132,3 +132,7 @@ Add priority label (`P1`, `P2`, `P3`) based on categorization.
|
|
|
132
132
|
- Issue creation uses `gh` CLI directly (read-only operation pattern)
|
|
133
133
|
- If no follow-up candidates found, report "No follow-up actions needed" and complete
|
|
134
134
|
- PR review feedback is available shortly after PR creation — the omc_pr_analyzer bot comments automatically
|
|
135
|
+
|
|
136
|
+
## Permission Mode
|
|
137
|
+
|
|
138
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pre-generation-arch-check
|
|
3
|
+
description: Pre-generation architecture check — detect R006 separation-of-concerns and compilation metaphor violations before code generation begins
|
|
4
|
+
scope: core
|
|
5
|
+
user-invocable: false
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pre-Generation Architecture Check
|
|
10
|
+
|
|
11
|
+
AASM-inspired pre-generation architecture guard. Detects design violations before code generation (the "pre-compile lint" phase), complementing adversarial-review and deep-verify which operate post-generation.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
This skill fills the PRE-generation gap in the verification pipeline:
|
|
16
|
+
|
|
17
|
+
| Phase | Skill | When |
|
|
18
|
+
|-------|-------|------|
|
|
19
|
+
| Pre-generation | **pre-generation-arch-check** | Before code is written |
|
|
20
|
+
| Post-generation | adversarial-review | After code is written |
|
|
21
|
+
| Post-generation | deep-verify | After changes are committed |
|
|
22
|
+
|
|
23
|
+
Inspired by Contexty's AASM (AI Anti-pattern Severity Matrix) mechanism. Detects when a requested change might violate:
|
|
24
|
+
- R006 separation of concerns (agents vs skills vs guides)
|
|
25
|
+
- Compilation metaphor boundaries (source/build/spec/linker/stdlib)
|
|
26
|
+
- R010 orchestrator delegation rules
|
|
27
|
+
- Protected path rules (.claude/agents/, .claude/skills/, guides/)
|
|
28
|
+
|
|
29
|
+
## Input
|
|
30
|
+
|
|
31
|
+
- **Request summary**: What the user or pipeline is asking to generate
|
|
32
|
+
- **Target files/paths**: Where changes will be made
|
|
33
|
+
|
|
34
|
+
## Processing — Anti-Pattern Detection
|
|
35
|
+
|
|
36
|
+
Check for each of the following anti-patterns against the request summary and target paths:
|
|
37
|
+
|
|
38
|
+
### 1. Skill-in-Agent (WARN)
|
|
39
|
+
An agent file (`.claude/agents/*.md`) body contains detailed step-by-step instructions, scripts, or workflow logic that belongs in a skill file.
|
|
40
|
+
- **Signal**: Agent body exceeds ~50 lines OR contains code blocks / numbered step sequences
|
|
41
|
+
- **Suggestion**: Extract instructions into `.claude/skills/{name}/SKILL.md`, reference from agent `skills:` frontmatter
|
|
42
|
+
|
|
43
|
+
### 2. Agent-in-Skill (WARN)
|
|
44
|
+
A skill file contains agent configuration fields (`model:`, `tools:`, `memory:`, `permissionMode:`).
|
|
45
|
+
- **Signal**: Proposed skill SKILL.md frontmatter contains agent-only fields
|
|
46
|
+
- **Suggestion**: Move agent configuration to `.claude/agents/{name}.md`; keep skill focused on instructions
|
|
47
|
+
|
|
48
|
+
### 3. Guide-in-Skill (WARN)
|
|
49
|
+
A skill file contains reference documentation, best-practices tutorials, or conceptual explanations that belong in `guides/`.
|
|
50
|
+
- **Signal**: Proposed SKILL.md body contains "## Background", "## Concepts", or sections > 100 lines of prose
|
|
51
|
+
- **Suggestion**: Move reference content to `guides/{topic}/`, link from skill
|
|
52
|
+
|
|
53
|
+
### 4. Cross-Concern Write Without mgr-creator (BLOCK)
|
|
54
|
+
A single atomic change spans two or more of: `.claude/agents/`, `.claude/skills/`, `guides/` — without routing through mgr-creator.
|
|
55
|
+
- **Signal**: Target paths include files in 2+ protected directories in the same request
|
|
56
|
+
- **Suggestion**: Route the request through mgr-creator (R010 protected path rule)
|
|
57
|
+
|
|
58
|
+
### 5. Direct Orchestrator Write (BLOCK)
|
|
59
|
+
An implementation step would have the orchestrator (main conversation) directly write or edit files, bypassing subagent delegation.
|
|
60
|
+
- **Signal**: Request implies "I will write X" from orchestrator context rather than "delegate to specialist"
|
|
61
|
+
- **Suggestion**: Delegate file writes to appropriate specialist agent per R010 delegation table
|
|
62
|
+
|
|
63
|
+
### 6. Spec-Build Confusion (WARN)
|
|
64
|
+
Rules (`.claude/rules/`) are being modified in the same atomic change as source code or agent/skill files.
|
|
65
|
+
- **Signal**: Target paths include both `.claude/rules/*.md` and any code or `.claude/agents/` or `.claude/skills/` files
|
|
66
|
+
- **Suggestion**: Separate rule updates (spec changes) from agent/skill/code changes (build changes) into distinct commits
|
|
67
|
+
|
|
68
|
+
## Output Format
|
|
69
|
+
|
|
70
|
+
When no violations are detected:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
[ARCH-CHECK] No violations detected — proceed with generation
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
When violations are detected:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
[ARCH-WARNING] {count} potential violation(s) detected:
|
|
80
|
+
├── {pattern-name} ({severity}): {description}
|
|
81
|
+
│ └── Suggestion: {fix}
|
|
82
|
+
├── {pattern-name} ({severity}): {description}
|
|
83
|
+
│ └── Suggestion: {fix}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Severity Levels
|
|
87
|
+
|
|
88
|
+
| Severity | Action |
|
|
89
|
+
|----------|--------|
|
|
90
|
+
| WARN | Advisory — proceed with caution, note in generation plan |
|
|
91
|
+
| BLOCK | Halt — requires architectural redesign before proceeding |
|
|
92
|
+
|
|
93
|
+
BLOCK violations must be resolved before generation continues. WARN violations are logged and surfaced to the user but do not halt execution (consistent with R021 advisory-first enforcement model).
|
|
94
|
+
|
|
95
|
+
## Integration
|
|
96
|
+
|
|
97
|
+
Auto-invoked at structured-dev-cycle Phase 1 (planning phase) before any file generation begins.
|
|
98
|
+
|
|
99
|
+
This skill is advisory only — it does NOT hard-block execution. This is consistent with R021's advisory-first enforcement model. Future promotion to a PreToolUse hook is possible if violation rates warrant escalation.
|
|
100
|
+
|
|
101
|
+
Invocation pattern:
|
|
102
|
+
```
|
|
103
|
+
[structured-dev-cycle Phase 1]
|
|
104
|
+
→ pre-generation-arch-check
|
|
105
|
+
→ returns [ARCH-CHECK] or [ARCH-WARNING]
|
|
106
|
+
→ continue to Phase 2 (generation) with findings surfaced
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Cross-References
|
|
110
|
+
|
|
111
|
+
- `.claude/rules/MUST-agent-design.md` (R006) — separation of concerns
|
|
112
|
+
- `.claude/rules/MUST-orchestrator-coordination.md` (R010) — protected paths and delegation
|
|
113
|
+
- `.claude/skills/adversarial-review/` — post-generation security counterpart
|
|
114
|
+
- `.claude/skills/deep-verify/` — post-generation quality counterpart
|
|
115
|
+
- Source concept: Contexty AASM (https://github.com/ttalkkak-lab/opencode-contexty)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: professor-triage
|
|
3
3
|
description: Analyze GitHub issues against current codebase and perform automated triage with priority assessment
|
|
4
4
|
scope: harness
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.2.0
|
|
6
6
|
user-invocable: true
|
|
7
7
|
effort: high
|
|
8
8
|
context: fork
|
|
@@ -126,27 +126,27 @@ For each analyzed issue, generate multi-perspective analysis comments and artifa
|
|
|
126
126
|
```
|
|
127
127
|
## 🏛️ Senior Architect Analysis
|
|
128
128
|
|
|
129
|
-
###
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
| {
|
|
129
|
+
### 아키텍처 영향
|
|
130
|
+
| 컴포넌트 | 영향 | 위험도 |
|
|
131
|
+
|----------|------|--------|
|
|
132
|
+
| {컴포넌트} | {설명} | {High/Medium/Low} |
|
|
133
133
|
|
|
134
|
-
###
|
|
135
|
-
{
|
|
134
|
+
### 코드 수준 분석
|
|
135
|
+
{Phase 2 코드베이스 분석의 구체적 file:line 참조}
|
|
136
136
|
|
|
137
|
-
###
|
|
138
|
-
-
|
|
139
|
-
-
|
|
137
|
+
### 전략적 평가
|
|
138
|
+
- **실현 가능성**: {근거가 포함된 평가}
|
|
139
|
+
- **우선순위 권장**: {P1/P2/P3 및 근거}
|
|
140
140
|
|
|
141
|
-
###
|
|
142
|
-
|
|
|
143
|
-
|
|
144
|
-
| {
|
|
141
|
+
### 리스크 및 고려사항
|
|
142
|
+
| 리스크 | 가능성 | 완화 방안 |
|
|
143
|
+
|--------|--------|----------|
|
|
144
|
+
| {리스크} | {High/Medium/Low} | {완화 방안} |
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
**예상 작업량**: {XS/S/M/L/XL}
|
|
147
147
|
|
|
148
148
|
---
|
|
149
|
-
_🏛️ Senior Architect perspective — `/professor-triage` v2.
|
|
149
|
+
_🏛️ Senior Architect perspective — `/professor-triage` v2.2.0_
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
**4B: 🤝 Project Colleague Review** — Delegate to arch-documenter (model: sonnet) to post GitHub comment:
|
|
@@ -154,19 +154,19 @@ _🏛️ Senior Architect perspective — `/professor-triage` v2.1.0_
|
|
|
154
154
|
```
|
|
155
155
|
## 🤝 Project Colleague Review
|
|
156
156
|
|
|
157
|
-
###
|
|
158
|
-
{
|
|
157
|
+
### 구현 아이디어
|
|
158
|
+
{구체적 코드 위치 및 file:line 참조가 포함된 변경 제안}
|
|
159
159
|
|
|
160
|
-
###
|
|
161
|
-
- {
|
|
160
|
+
### 놓치기 쉬운 세부사항
|
|
161
|
+
- {이름 충돌, 유효성 검사 우회, 경쟁 조건, 엣지 케이스}
|
|
162
162
|
|
|
163
|
-
###
|
|
164
|
-
1. {
|
|
165
|
-
2. {
|
|
166
|
-
3. {
|
|
163
|
+
### 권장 다음 단계
|
|
164
|
+
1. {구체적 file/function 참조가 포함된 실행 가능한 단계}
|
|
165
|
+
2. {실행 가능한 단계}
|
|
166
|
+
3. {실행 가능한 단계}
|
|
167
167
|
|
|
168
168
|
---
|
|
169
|
-
_🤝 Project Colleague perspective — `/professor-triage` v2.
|
|
169
|
+
_🤝 Project Colleague perspective — `/professor-triage` v2.2.0_
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
Note: Do NOT include a "First Impressions" (첫인상) section in the Colleague Review — this was explicitly excluded per user feedback.
|
|
@@ -176,38 +176,38 @@ Note: Do NOT include a "First Impressions" (첫인상) section in the Colleague
|
|
|
176
176
|
```
|
|
177
177
|
## 🎓 Professor Synthesis
|
|
178
178
|
|
|
179
|
-
###
|
|
180
|
-
|
|
|
181
|
-
|
|
182
|
-
| {
|
|
179
|
+
### 코드베이스 검증
|
|
180
|
+
| 주장 (Architect/Colleague) | 검증 | 근거 |
|
|
181
|
+
|---------------------------|------|------|
|
|
182
|
+
| {주장} | ✅/⚠️/❌ | {file:line 또는 git 근거} |
|
|
183
183
|
|
|
184
|
-
###
|
|
185
|
-
|
|
|
186
|
-
|
|
187
|
-
| {
|
|
184
|
+
### 합의 및 이견
|
|
185
|
+
| 주제 | Architect | Colleague | 판정 |
|
|
186
|
+
|------|-----------|-----------|------|
|
|
187
|
+
| {주제} | {입장} | {입장} | {종합 판단} |
|
|
188
188
|
|
|
189
|
-
###
|
|
190
|
-
|
|
|
191
|
-
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
189
|
+
### 우선순위 매트릭스
|
|
190
|
+
| 차원 | 평가 |
|
|
191
|
+
|------|------|
|
|
192
|
+
| 긴급성 | {High/Medium/Low} |
|
|
193
|
+
| 중요성 | {High/Medium/Low} |
|
|
194
|
+
| 규모 | {XS/S/M/L/XL} |
|
|
195
|
+
| 권장 순서 | {배치 내 N/M} |
|
|
196
196
|
|
|
197
|
-
###
|
|
198
|
-
{
|
|
197
|
+
### 누락된 관점
|
|
198
|
+
{Architect나 Colleague 모두 제기하지 않은 고려사항}
|
|
199
199
|
|
|
200
|
-
###
|
|
201
|
-
|
|
|
202
|
-
|
|
203
|
-
| 1 | {
|
|
204
|
-
| 2 | {
|
|
200
|
+
### 실행 로드맵
|
|
201
|
+
| 단계 | 작업 | 파일 | 의존성 |
|
|
202
|
+
|------|------|------|--------|
|
|
203
|
+
| 1 | {작업} | {파일} | — |
|
|
204
|
+
| 2 | {작업} | {파일} | 단계 1 |
|
|
205
205
|
|
|
206
|
-
###
|
|
207
|
-
{
|
|
206
|
+
### 최종 결론
|
|
207
|
+
{확정적 권장 사항이 포함된 2-3문장 종합}
|
|
208
208
|
|
|
209
209
|
---
|
|
210
|
-
_🎓 Professor Synthesis — `/professor-triage` v2.
|
|
210
|
+
_🎓 Professor Synthesis — `/professor-triage` v2.2.0_
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
**4D: Issue Triage Comment (MANDATORY)** — Every analyzed issue MUST receive a triage comment. This is not optional — even for issues created in the same session or with existing analysis. Skipping comments breaks the triage audit trail. Delegate to mgr-gitnerd to post on each analyzed issue:
|
|
@@ -215,14 +215,14 @@ _🎓 Professor Synthesis — `/professor-triage` v2.1.0_
|
|
|
215
215
|
```
|
|
216
216
|
## 🔬 Professor Triage — Codebase Analysis Result
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
218
|
+
**결정**: {Close (Already Resolved) | Close (Not Applicable) | Close (Duplicate of #NNN) | Open — action required | Open — monitoring}
|
|
219
|
+
**근거**: {코드베이스 분석 기반 1-2줄 요약}
|
|
220
|
+
**영향 파일**: {N}개 분석 — {N}✅ {N}⚠️ {N}❌
|
|
221
|
+
**리스크**: {P1/P2/P3} | **규모**: {XS/S/M/L/XL}
|
|
222
|
+
**전체 리포트**: {artifact path}
|
|
223
223
|
|
|
224
224
|
---
|
|
225
|
-
|
|
225
|
+
_`/professor-triage` v2.2.0에 의해 현재 코드베이스 대비 분석됨 — 관련 이슈 {N}개_
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
**4E: Artifact Report** — Delegate to arch-documenter to write:
|
|
@@ -233,37 +233,37 @@ Timestamps use local machine time (consistent with other artifact skills).
|
|
|
233
233
|
|
|
234
234
|
Template:
|
|
235
235
|
```
|
|
236
|
-
# Professor Triage
|
|
236
|
+
# Professor Triage 리포트 — YYYY-MM-DD
|
|
237
237
|
|
|
238
|
-
##
|
|
239
|
-
| # |
|
|
240
|
-
|
|
238
|
+
## 분석 대상
|
|
239
|
+
| # | 제목 | 라벨 | 생성일 |
|
|
240
|
+
|---|------|------|--------|
|
|
241
241
|
|
|
242
|
-
##
|
|
242
|
+
## 이슈별 분석
|
|
243
243
|
### #NNN — title
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
|
|
252
|
-
##
|
|
253
|
-
###
|
|
254
|
-
###
|
|
255
|
-
###
|
|
256
|
-
###
|
|
257
|
-
|
|
258
|
-
##
|
|
259
|
-
### Architect
|
|
260
|
-
### Colleague
|
|
261
|
-
### Professor Synthesis
|
|
262
|
-
|
|
263
|
-
##
|
|
264
|
-
|
|
|
265
|
-
|
|
266
|
-
##
|
|
244
|
+
- **영향 파일**: N개 분석 — N✅ N⚠️ N❌
|
|
245
|
+
- **아키텍처 영향**: ...
|
|
246
|
+
- **구현 경로**: ...
|
|
247
|
+
- **리스크/우선순위**: P1/P2/P3
|
|
248
|
+
- **규모**: XS/S/M/L/XL
|
|
249
|
+
- **이미 해결됨?**: Yes/No/Partial — 근거
|
|
250
|
+
- **권장 조치**: ...
|
|
251
|
+
|
|
252
|
+
## 교차 분석
|
|
253
|
+
### 공통 패턴
|
|
254
|
+
### 중복/병합 후보
|
|
255
|
+
### 상충 발견사항 해결
|
|
256
|
+
### 우선순위 매트릭스
|
|
257
|
+
|
|
258
|
+
## 다관점 요약
|
|
259
|
+
### Architect 주요 사항
|
|
260
|
+
### Colleague 주요 사항
|
|
261
|
+
### Professor Synthesis 핵심 포인트
|
|
262
|
+
|
|
263
|
+
## 실행된 조치
|
|
264
|
+
| 이슈 | 조치 | 상태 |
|
|
265
|
+
|
|
266
|
+
## 보류 중인 조치 (확인 필요)
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
### Phase 4F: Comment Verification Gate
|
|
@@ -319,3 +319,7 @@ Present to user and wait for approval before executing:
|
|
|
319
319
|
- Phase 4F: Verification gate for all 4 comment types
|
|
320
320
|
- Phase 5: `mgr-gitnerd` for all GitHub operations
|
|
321
321
|
- No external dependencies (omc_issue_analyzer removed in v2.0.0, multi-perspective analysis restored in v2.1.0)
|
|
322
|
+
|
|
323
|
+
## Permission Mode
|
|
324
|
+
|
|
325
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -131,21 +131,21 @@ Apply semantic versioning to each release group in sequence:
|
|
|
131
131
|
For each release group, produce:
|
|
132
132
|
|
|
133
133
|
```markdown
|
|
134
|
-
## vX.Y.Z
|
|
134
|
+
## vX.Y.Z 릴리즈 계획
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
**예상 범위**: {XS|S|M|L 합계} | **이슈**: N | **병렬 가능**: N
|
|
137
137
|
|
|
138
|
-
| # |
|
|
139
|
-
|
|
140
|
-
| #NNN | P2 | S |
|
|
141
|
-
| #NNN | P1 | XS |
|
|
138
|
+
| # | 우선순위 | 규모 | 제목 | 의존성 |
|
|
139
|
+
|---|----------|------|------|--------|
|
|
140
|
+
| #NNN | P2 | S | 이슈 제목 | 없음 |
|
|
141
|
+
| #NNN | P1 | XS | 이슈 제목 | 없음 |
|
|
142
142
|
|
|
143
|
-
###
|
|
144
|
-
1. #NNN — {
|
|
145
|
-
2. #NNN — {
|
|
143
|
+
### 구현 순서
|
|
144
|
+
1. #NNN — {한줄 설명} (권장 에이전트: {agent-type})
|
|
145
|
+
2. #NNN — {한줄 설명} (권장 에이전트: {agent-type})
|
|
146
146
|
|
|
147
|
-
###
|
|
148
|
-
- {
|
|
147
|
+
### 참고 사항
|
|
148
|
+
- {의존성 제약, 호환성 이슈, 리스크 등}
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
### Completeness Check
|
|
@@ -159,18 +159,18 @@ Before generating the plan document, verify:
|
|
|
159
159
|
If any issue is missing from release bins, halt and report the discrepancy.
|
|
160
160
|
|
|
161
161
|
**Agent suggestion heuristic**:
|
|
162
|
-
|
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
162
|
+
| 이슈 도메인 | 권장 에이전트 |
|
|
163
|
+
|-------------|--------------|
|
|
164
|
+
| 문서, CLAUDE.md, README | arch-documenter |
|
|
165
|
+
| 규칙 (R00x) | mgr-claude-code-bible |
|
|
166
|
+
| 에이전트 (.claude/agents/) | mgr-creator / mgr-updater |
|
|
167
|
+
| 스킬 (.claude/skills/) | mgr-creator / mgr-updater |
|
|
168
168
|
| CI, GitHub Actions | mgr-gitnerd |
|
|
169
169
|
| TypeScript/Node | lang-typescript-expert |
|
|
170
170
|
| Python | lang-python-expert |
|
|
171
171
|
| Go | lang-golang-expert |
|
|
172
|
-
|
|
|
173
|
-
|
|
|
172
|
+
| 테스트 | qa-engineer |
|
|
173
|
+
| 일반 수정 | general-purpose |
|
|
174
174
|
|
|
175
175
|
### Phase 7: Output
|
|
176
176
|
|
|
@@ -184,16 +184,16 @@ Use today's date and the first planned release version in the filename.
|
|
|
184
184
|
|
|
185
185
|
File header format:
|
|
186
186
|
```markdown
|
|
187
|
-
#
|
|
187
|
+
# 릴리즈 계획 — YYYY-MM-DD 생성
|
|
188
188
|
|
|
189
|
-
>
|
|
190
|
-
>
|
|
189
|
+
> 출처: YYYY-MM-DD 기준 `verify-done` 라벨 오픈 이슈
|
|
190
|
+
> 제외된 이슈 (이미 오픈 PR에 포함): #NNN, #NNN
|
|
191
191
|
|
|
192
|
-
{
|
|
192
|
+
{릴리즈 그룹}
|
|
193
193
|
|
|
194
|
-
##
|
|
195
|
-
|
|
|
196
|
-
|
|
194
|
+
## 요약
|
|
195
|
+
| 릴리즈 | 이슈 수 | 규모 | P1 | P2 | P3 |
|
|
196
|
+
|--------|---------|------|----|----|-----|
|
|
197
197
|
| vX.Y.Z | N | S | 0 | 3 | 1 |
|
|
198
198
|
```
|
|
199
199
|
|
|
@@ -205,3 +205,7 @@ File header format:
|
|
|
205
205
|
- User confirms before any downstream action (implementation, commits)
|
|
206
206
|
- Zero network calls except `gh` CLI (local API)
|
|
207
207
|
- If no eligible issues found, report and stop — do not generate empty plan
|
|
208
|
+
|
|
209
|
+
## Permission Mode
|
|
210
|
+
|
|
211
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
@@ -190,6 +190,10 @@ rm -f /tmp/.claude-dev-stage # Clear (disable blocking)
|
|
|
190
190
|
- **Single session**: The fixed path `/tmp/.claude-dev-stage` does not support concurrent Claude Code sessions. Running multiple sessions simultaneously may cause stage state conflicts.
|
|
191
191
|
- **World-writable path**: The `/tmp/` directory is accessible to all users. For multi-user environments, consider using a user-scoped path like `/tmp/.claude-dev-stage-$(id -u)`.
|
|
192
192
|
|
|
193
|
+
## Permission Mode
|
|
194
|
+
|
|
195
|
+
When spawning agents via the Agent tool during this skill's execution, always pass `mode: "bypassPermissions"`. The Agent tool default (`acceptEdits`) overrides agent frontmatter `permissionMode`, causing permission prompts during unattended execution.
|
|
196
|
+
|
|
193
197
|
## Display Format
|
|
194
198
|
|
|
195
199
|
```
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-efficiency-audit
|
|
3
|
+
description: Three-layer token defense stack — audit current settings, apply safe/CI levers, and monitor status
|
|
4
|
+
scope: package
|
|
5
|
+
user-invocable: true
|
|
6
|
+
argument-hint: "[audit|apply-interactive|apply-ci|status]"
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Token Efficiency Audit Skill
|
|
11
|
+
|
|
12
|
+
Layer 3 of the three-layer token defense stack. Audits current Claude Code settings against the token efficiency lever reference table, applies safe interactive levers, and reports combined layer status.
|
|
13
|
+
|
|
14
|
+
Reference guide: `guides/claude-code/14-token-efficiency.md`
|
|
15
|
+
|
|
16
|
+
## Three-Layer Stack
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
20
|
+
│ Layer 1: cc-token-saver (CACHE DEFENSE) │
|
|
21
|
+
│ Before session — protect prompt cache TTL from idle expiry │
|
|
22
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
23
|
+
│ Layer 2: R013 Ecomode (RUNTIME COMPRESSION) │
|
|
24
|
+
│ During session — compact output, aggregate results, prune input│
|
|
25
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
26
|
+
│ Layer 3: token-efficiency-audit (PRE-SESSION PREVENTION) │
|
|
27
|
+
│ Config time — disable injections before they happen │
|
|
28
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Each layer is independently deployable and non-overlapping. Layer 3 (this skill) operates at config time — it prevents overhead from ever entering the context window.
|
|
32
|
+
|
|
33
|
+
## Modes
|
|
34
|
+
|
|
35
|
+
### audit (default)
|
|
36
|
+
|
|
37
|
+
1. Read `.claude/settings.json` (project-level, git-tracked)
|
|
38
|
+
2. Read `.claude/settings.local.json` (local, not git-tracked)
|
|
39
|
+
3. Check each lever from the Interactive Session Levers table in the guide:
|
|
40
|
+
- `includeGitInstructions`
|
|
41
|
+
- `autoConnectIde`
|
|
42
|
+
- `attribution.commit`
|
|
43
|
+
- `attribution.pr`
|
|
44
|
+
- `env.BASH_MAX_OUTPUT_LENGTH`
|
|
45
|
+
- `env.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`
|
|
46
|
+
- `env.MAX_MCP_OUTPUT_TOKENS`
|
|
47
|
+
4. Output a table:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
[Token Efficiency Audit]
|
|
51
|
+
Reference: guides/claude-code/14-token-efficiency.md (CC v2.1.114+)
|
|
52
|
+
|
|
53
|
+
| Lever | Current | Recommended | Gap | Location |
|
|
54
|
+
|-------------------------------------|-------------|-------------|--------|-----------------------|
|
|
55
|
+
| includeGitInstructions | true | false | ⚠ SET | settings.json |
|
|
56
|
+
| autoConnectIde | true | false | ⚠ SET | settings.json |
|
|
57
|
+
| attribution.commit | auto text | "" | ⚠ SET | settings.json |
|
|
58
|
+
| attribution.pr | auto text | "" | ⚠ SET | settings.json |
|
|
59
|
+
| BASH_MAX_OUTPUT_LENGTH | unlimited | 15000 | ⚠ SET | settings.local.json |
|
|
60
|
+
| CLAUDE_CODE_FILE_READ_MAX_OUTPUT... | unlimited | 8000 | ⚠ SET | settings.local.json |
|
|
61
|
+
| MAX_MCP_OUTPUT_TOKENS | unlimited | 8000 | ⚠ SET | settings.local.json |
|
|
62
|
+
|
|
63
|
+
Run /token-efficiency-audit apply-interactive to apply all safe levers.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Gap column values:
|
|
67
|
+
- `OK` — already at recommended value
|
|
68
|
+
- `⚠ SET` — currently at default, recommended change available
|
|
69
|
+
- `CUSTOM` — non-default value that differs from recommendation (display actual value)
|
|
70
|
+
|
|
71
|
+
### apply-interactive
|
|
72
|
+
|
|
73
|
+
Applies Interactive Session Levers only (safe for development use).
|
|
74
|
+
|
|
75
|
+
1. Read `.claude/settings.json` and `.claude/settings.local.json` (create if not exists)
|
|
76
|
+
2. Apply to `settings.json`:
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"includeGitInstructions": false,
|
|
80
|
+
"autoConnectIde": false,
|
|
81
|
+
"attribution": {
|
|
82
|
+
"commit": "",
|
|
83
|
+
"pr": ""
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
3. Apply to `settings.local.json` (env block):
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"env": {
|
|
91
|
+
"BASH_MAX_OUTPUT_LENGTH": "15000",
|
|
92
|
+
"CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS": "8000",
|
|
93
|
+
"MAX_MCP_OUTPUT_TOKENS": "8000"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
4. Preserve all existing settings (merge, do not overwrite unrelated keys)
|
|
98
|
+
5. Report applied changes:
|
|
99
|
+
```
|
|
100
|
+
[Done] Interactive levers applied
|
|
101
|
+
|
|
102
|
+
settings.json:
|
|
103
|
+
includeGitInstructions: true → false
|
|
104
|
+
autoConnectIde: true → false
|
|
105
|
+
attribution.commit: (auto) → ""
|
|
106
|
+
attribution.pr: (auto) → ""
|
|
107
|
+
|
|
108
|
+
settings.local.json:
|
|
109
|
+
BASH_MAX_OUTPUT_LENGTH: (none) → 15000
|
|
110
|
+
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS: (none) → 8000
|
|
111
|
+
MAX_MCP_OUTPUT_TOKENS: (none) → 8000
|
|
112
|
+
|
|
113
|
+
Note: settings.json is git-tracked. Commit if appropriate.
|
|
114
|
+
Takes effect on next claude session restart.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### apply-ci
|
|
118
|
+
|
|
119
|
+
Applies CI/Worker-Only Levers. These disable core oh-my-customcode functionality.
|
|
120
|
+
|
|
121
|
+
**R001 Risk: HIGH** — Display this warning prominently BEFORE applying:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
⚠ WARNING — CI/WORKER LEVERS
|
|
125
|
+
|
|
126
|
+
These settings disable core oh-my-customcode functionality:
|
|
127
|
+
• CLAUDE_CODE_DISABLE_CLAUDE_MDS=1 → ALL rules and routing offline (R010 disabled)
|
|
128
|
+
• CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1 → All 48 agents unavailable
|
|
129
|
+
• ENABLE_CLAUDEAI_MCP_SERVERS=false → MCP-dependent skills unavailable
|
|
130
|
+
• CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 → No persistent memory across sessions
|
|
131
|
+
|
|
132
|
+
Only use for CI/worker pipelines. Never apply to interactive development sessions.
|
|
133
|
+
|
|
134
|
+
Type "yes" to confirm, or anything else to cancel:
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
1. Require explicit user confirmation ("yes") before proceeding
|
|
138
|
+
2. On confirmation, apply to `settings.local.json`:
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"env": {
|
|
142
|
+
"CLAUDE_CODE_DISABLE_CLAUDE_MDS": "1",
|
|
143
|
+
"CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS": "1",
|
|
144
|
+
"ENABLE_CLAUDEAI_MCP_SERVERS": "false",
|
|
145
|
+
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "1"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
3. Report:
|
|
150
|
+
```
|
|
151
|
+
[Done] CI/Worker levers applied to settings.local.json
|
|
152
|
+
|
|
153
|
+
This file is NOT git-tracked.
|
|
154
|
+
To undo: remove the four env keys or run /token-efficiency-audit status
|
|
155
|
+
```
|
|
156
|
+
4. On cancellation: `[Cancelled] No changes made.`
|
|
157
|
+
|
|
158
|
+
### status
|
|
159
|
+
|
|
160
|
+
Reports current state of all three layers.
|
|
161
|
+
|
|
162
|
+
1. Check Layer 1 — cc-token-saver:
|
|
163
|
+
- Check if plugin is present (look for cc-token-saver in `.claude/` plugin config or known plugin markers)
|
|
164
|
+
- Report: Installed / Not installed
|
|
165
|
+
2. Check Layer 2 — R013 Ecomode:
|
|
166
|
+
- Read `.claude/settings.json` for ecomode config
|
|
167
|
+
- Report: threshold, result_format, max_result_length if set; otherwise "auto-threshold (4 tasks)"
|
|
168
|
+
3. Check Layer 3 — Settings levers:
|
|
169
|
+
- Run the same lever checks as `audit` mode
|
|
170
|
+
- Summarize: N/7 levers at recommended values
|
|
171
|
+
4. Check OTel availability:
|
|
172
|
+
- Look for `CLAUDE_CODE_ENABLE_TELEMETRY` in settings
|
|
173
|
+
- If present: report "OTel enabled — use /monitoring-setup status for metrics"
|
|
174
|
+
5. Output:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
[Token Efficiency Status]
|
|
178
|
+
|
|
179
|
+
Layer 1: cc-token-saver ✓ Installed / ✗ Not installed
|
|
180
|
+
Layer 2: R013 Ecomode ✓ Active (threshold: 4) / ✗ Not configured
|
|
181
|
+
Layer 3: Settings levers 4/7 at recommended
|
|
182
|
+
|
|
183
|
+
Layer 3 details:
|
|
184
|
+
includeGitInstructions: false ✓
|
|
185
|
+
autoConnectIde: true ⚠
|
|
186
|
+
attribution.commit: "" ✓
|
|
187
|
+
attribution.pr: "" ✓
|
|
188
|
+
BASH_MAX_OUTPUT_LENGTH: 15000 ✓
|
|
189
|
+
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS: unlimited ⚠
|
|
190
|
+
MAX_MCP_OUTPUT_TOKENS: unlimited ⚠
|
|
191
|
+
|
|
192
|
+
Run /token-efficiency-audit apply-interactive to fix ⚠ levers.
|
|
193
|
+
OTel: not enabled — run /monitoring-setup enable to measure effectiveness.
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Codex Levers
|
|
197
|
+
|
|
198
|
+
When Codex CLI is in use (detected by presence of `~/.codex/config.toml`):
|
|
199
|
+
|
|
200
|
+
Recommended settings in `config.toml`:
|
|
201
|
+
```toml
|
|
202
|
+
[features]
|
|
203
|
+
apps = false
|
|
204
|
+
|
|
205
|
+
[apps._default]
|
|
206
|
+
enabled = false
|
|
207
|
+
|
|
208
|
+
web_search = "disabled"
|
|
209
|
+
|
|
210
|
+
tool_output_token_limit = 10000
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Non-interactive Codex CLI flag reference: `guides/claude-code/13-cli-flags.md`
|
|
214
|
+
|
|
215
|
+
## Guardrails
|
|
216
|
+
|
|
217
|
+
### The Re-Call Trap
|
|
218
|
+
|
|
219
|
+
Setting output limits too low forces repeated re-call loops — the model issues `tail -n 50 output.txt` or re-reads files in chunks, costing more tokens than the original uncapped output.
|
|
220
|
+
|
|
221
|
+
**Enforce these minimum floors (never go below):**
|
|
222
|
+
|
|
223
|
+
| Variable | Safe minimum | Recommended |
|
|
224
|
+
|----------|-------------|-------------|
|
|
225
|
+
| `BASH_MAX_OUTPUT_LENGTH` | 10000 | 15000 |
|
|
226
|
+
| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | 4000 | 8000 |
|
|
227
|
+
| `MAX_MCP_OUTPUT_TOKENS` | 4000 | 8000 |
|
|
228
|
+
| Codex `tool_output_token_limit` | 5000 | 10000 |
|
|
229
|
+
|
|
230
|
+
If a user requests values below these floors, warn them of the re-call trap risk before applying.
|
|
231
|
+
|
|
232
|
+
### Version Drift
|
|
233
|
+
|
|
234
|
+
Settings defaults change with minor CC version releases. After each upgrade, re-run `/token-efficiency-audit audit` to verify active defaults. Reference baseline: CC v2.1.114+ / Codex v0.121.0+.
|
|
235
|
+
|
|
236
|
+
## Cross-References
|
|
237
|
+
|
|
238
|
+
- `guides/claude-code/14-token-efficiency.md` — Full three-layer stack guide and lever table
|
|
239
|
+
- `.claude/rules/SHOULD-ecomode.md` (R013) — Layer 2 specification
|
|
240
|
+
- `.claude/skills/monitoring-setup/SKILL.md` — Measure effectiveness via OTel metrics
|
|
241
|
+
- `guides/cc-token-saver/README.md` — Layer 1 detailed guide
|
|
242
|
+
- `guides/claude-code/13-cli-flags.md` — Non-interactive/CI CLI flags
|
package/templates/CLAUDE.md
CHANGED
|
@@ -114,7 +114,7 @@ project/
|
|
|
114
114
|
+-- CLAUDE.md # 진입점
|
|
115
115
|
+-- .claude/
|
|
116
116
|
| +-- agents/ # 서브에이전트 정의 (48 파일)
|
|
117
|
-
| +-- skills/ # 스킬 (
|
|
117
|
+
| +-- skills/ # 스킬 (109 디렉토리)
|
|
118
118
|
| +-- rules/ # 전역 규칙 (R000-R022)
|
|
119
119
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
120
120
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
package/templates/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.100.1",
|
|
3
3
|
"lastUpdated": "2026-04-18T00: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": 109
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "guides",
|