create-ai-project 1.16.0 → 1.16.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/.claude/agents-en/document-reviewer.md +1 -0
- package/.claude/agents-en/prd-creator.md +2 -0
- package/.claude/agents-en/skill-creator.md +132 -0
- package/.claude/agents-en/skill-reviewer.md +123 -0
- package/.claude/agents-ja/document-reviewer.md +1 -0
- package/.claude/agents-ja/prd-creator.md +2 -0
- package/.claude/agents-ja/skill-creator.md +132 -0
- package/.claude/agents-ja/skill-reviewer.md +123 -0
- package/.claude/commands-en/build.md +1 -1
- package/.claude/commands-en/create-skill.md +93 -0
- package/.claude/commands-en/design.md +1 -1
- package/.claude/commands-en/implement.md +1 -1
- package/.claude/commands-en/plan.md +1 -1
- package/.claude/commands-en/refine-skill.md +27 -24
- package/.claude/commands-en/reverse-engineer.md +71 -10
- package/.claude/commands-en/review.md +3 -1
- package/.claude/commands-en/update-doc.md +22 -2
- package/.claude/commands-ja/build.md +1 -1
- package/.claude/commands-ja/create-skill.md +93 -0
- package/.claude/commands-ja/design.md +1 -1
- package/.claude/commands-ja/implement.md +1 -1
- package/.claude/commands-ja/plan.md +1 -1
- package/.claude/commands-ja/refine-skill.md +27 -24
- package/.claude/commands-ja/reverse-engineer.md +71 -10
- package/.claude/commands-ja/review.md +3 -1
- package/.claude/commands-ja/update-doc.md +22 -2
- package/.claude/skills-en/skill-optimization/SKILL.md +145 -0
- package/.claude/skills-en/skill-optimization/references/creation-guide.md +58 -0
- package/.claude/skills-en/skill-optimization/references/review-criteria.md +51 -0
- package/.claude/skills-en/task-analyzer/references/skills-index.yaml +32 -14
- package/.claude/skills-ja/skill-optimization/SKILL.md +145 -0
- package/.claude/skills-ja/skill-optimization/references/creation-guide.md +58 -0
- package/.claude/skills-ja/skill-optimization/references/review-criteria.md +51 -0
- package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +40 -15
- package/CHANGELOG.md +43 -0
- package/README.ja.md +59 -67
- package/README.md +47 -61
- package/docs/guides/en/quickstart.md +18 -0
- package/docs/guides/en/skills-editing-guide.md +53 -5
- package/docs/guides/en/use-cases.md +30 -4
- package/docs/guides/ja/quickstart.md +18 -0
- package/docs/guides/ja/skills-editing-guide.md +53 -5
- package/docs/guides/ja/use-cases.md +30 -4
- package/package.json +1 -1
|
@@ -34,6 +34,8 @@ Design Doc準拠率を検証:
|
|
|
34
34
|
- コード品質チェック
|
|
35
35
|
- 実装完全性の評価
|
|
36
36
|
|
|
37
|
+
**出力を保存**: `$STEP_2_OUTPUT`
|
|
38
|
+
|
|
37
39
|
### 3. 判定と対応
|
|
38
40
|
|
|
39
41
|
**判定基準(プロジェクト段階を考慮)**:
|
|
@@ -60,7 +62,7 @@ Design Doc準拠率を検証:
|
|
|
60
62
|
1. **TodoWrite更新**: 作業ステップを登録。必ず含める: 最初に「スキル制約の確認」、最後に「スキル忠実度の検証」。タスクテンプレート(documentation-criteriaスキル参照)に従いタスクファイル作成 → `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
61
63
|
2. **task-executor実行**: 自動修正を段階的実行(5ファイル超過で停止)
|
|
62
64
|
3. **quality-fixer実行**: 品質ゲート通過を確認
|
|
63
|
-
4. **再検証**:
|
|
65
|
+
4. **再検証**: 修正後のDesign Doc準拠率を再検証する。前回の準拠問題: $STEP_2_OUTPUT。各問題が解決されたことを確認する。
|
|
64
66
|
|
|
65
67
|
### 4. 最終レポート
|
|
66
68
|
```
|
|
@@ -11,7 +11,7 @@ description: 既存設計ドキュメント(Design Doc / PRD / ADR)をレビ
|
|
|
11
11
|
**初期アクション**: 実行前にステップ1-6をTodoWriteに登録する。
|
|
12
12
|
|
|
13
13
|
**実行プロトコル**:
|
|
14
|
-
1.
|
|
14
|
+
1. **全作業をサブエージェントに委譲** — 役割はサブエージェントの呼び出し、データの受け渡し、結果の報告
|
|
15
15
|
2. **更新フローを実行**:
|
|
16
16
|
- 対象特定 → 変更内容確認 → ドキュメント更新 → レビュー → 整合性チェック
|
|
17
17
|
- **`[停止: ...]`マーカーで必ず停止** → 次に進む前にユーザー承認を待つ
|
|
@@ -125,9 +125,29 @@ prompt: |
|
|
|
125
125
|
- 変更履歴の完全性
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
**出力を保存**: `$STEP_5_OUTPUT`
|
|
129
|
+
|
|
128
130
|
**レビュー結果に基づく対応**:
|
|
129
131
|
- 承認 → ステップ6へ進む
|
|
130
|
-
- 要修正 →
|
|
132
|
+
- 要修正 → 以下のプロンプトでステップ4に戻る:
|
|
133
|
+
```
|
|
134
|
+
subagent_type: [ステップ2の更新エージェント]
|
|
135
|
+
description: "レビューフィードバックに基づき[タイプ]を修正"
|
|
136
|
+
prompt: |
|
|
137
|
+
動作モード: update
|
|
138
|
+
既存ドキュメント: [ステップ1のパス]
|
|
139
|
+
|
|
140
|
+
## 前回のレビューフィードバック
|
|
141
|
+
$STEP_5_OUTPUT
|
|
142
|
+
|
|
143
|
+
severity別に対処する:
|
|
144
|
+
- critical: 必須修正
|
|
145
|
+
- important: 推奨修正
|
|
146
|
+
- recommended: 任意修正
|
|
147
|
+
|
|
148
|
+
修正を適用し変更履歴を更新する。
|
|
149
|
+
```
|
|
150
|
+
(最大2回)
|
|
131
151
|
- **2回のリジェクト後** → 人間レビュー用にフラグ、蓄積されたフィードバックをユーザーに提示して終了
|
|
132
152
|
|
|
133
153
|
レビュー結果をユーザーに提示して承認を得る。
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-optimization
|
|
3
|
+
description: Evaluates and optimizes skill file quality against 8 content patterns and 9 editing principles. Use when creating skills, refining skill content, or auditing skill quality.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Content Optimization
|
|
7
|
+
|
|
8
|
+
## Core Philosophy
|
|
9
|
+
|
|
10
|
+
1. **Evidence-Based**: Grounded in prompt engineering research, applied to skill authoring
|
|
11
|
+
2. **Concrete**: Each pattern provides detection criteria and transform methods
|
|
12
|
+
3. **Structure-Focused**: Optimizes expression and organization; domain knowledge remains unchanged
|
|
13
|
+
|
|
14
|
+
## Content Optimization Patterns
|
|
15
|
+
|
|
16
|
+
### P1: Critical (Must Fix)
|
|
17
|
+
|
|
18
|
+
Issues that directly reduce LLM execution accuracy when consuming the skill.
|
|
19
|
+
|
|
20
|
+
#### BP-001: Negative Instructions → Positive Form
|
|
21
|
+
|
|
22
|
+
| Detection | Transform |
|
|
23
|
+
|-----------|-----------|
|
|
24
|
+
| "don't", "do not", "never", "avoid" in skill instructions | Reframe as positive directive with equivalent constraint |
|
|
25
|
+
|
|
26
|
+
**Skill example:**
|
|
27
|
+
- Before: "Don't use generic variable names"
|
|
28
|
+
- After: "Use descriptive variable names that reflect purpose (e.g., `userId` not `x`)"
|
|
29
|
+
|
|
30
|
+
**Why critical for skills**: LLM attention mechanisms focus on negated content. Skill instructions with "don't" increase probability of the forbidden behavior.
|
|
31
|
+
|
|
32
|
+
#### BP-002: Vague Instructions → Specific Criteria
|
|
33
|
+
|
|
34
|
+
| Detection | Transform |
|
|
35
|
+
|-----------|-----------|
|
|
36
|
+
| "appropriate", "good", "proper", "best", "should be clear" | Replace with measurable if-then criteria or concrete thresholds |
|
|
37
|
+
| Missing output format, scope, or success criteria | Add explicit constraints |
|
|
38
|
+
|
|
39
|
+
**Skill example:**
|
|
40
|
+
- Before: "Handle errors appropriately"
|
|
41
|
+
- After: "Error handling criteria: 1. try-catch for external API calls, file I/O, JSON.parse 2. Log: error.name, error.stack, timestamp 3. Re-throw with context if caller needs to handle"
|
|
42
|
+
|
|
43
|
+
**Why critical for skills**: Accounts for ~40% of execution variance. Every vague instruction forces LLM to guess.
|
|
44
|
+
|
|
45
|
+
#### BP-003: Missing Output Format → Structured Output
|
|
46
|
+
|
|
47
|
+
| Detection | Transform |
|
|
48
|
+
|-----------|-----------|
|
|
49
|
+
| Skill describes what to do but not the expected deliverable format | Add output section with structure, fields, and example |
|
|
50
|
+
|
|
51
|
+
**Skill example:**
|
|
52
|
+
- Before: "Analyze the code for issues"
|
|
53
|
+
- After: "Output format: `## Issues Found` with table: | Severity | Location | Description | Suggested Fix |"
|
|
54
|
+
|
|
55
|
+
**Why critical for skills**: Structured output constraints reduce hallucination and make skill results consistent.
|
|
56
|
+
|
|
57
|
+
### P2: High Impact (Should Fix)
|
|
58
|
+
|
|
59
|
+
Issues that reduce skill effectiveness when addressed.
|
|
60
|
+
|
|
61
|
+
#### BP-004: Unstructured Content → Organized Format
|
|
62
|
+
|
|
63
|
+
| Detection | Transform |
|
|
64
|
+
|-----------|-----------|
|
|
65
|
+
| Wall of text without headings | Apply standard section order (see below) |
|
|
66
|
+
| Multiple topics mixed in one section | Split into distinct headed sections |
|
|
67
|
+
| No tables for reference data | Convert lists of criteria/patterns to tables |
|
|
68
|
+
|
|
69
|
+
**Standard skill section order:**
|
|
70
|
+
1. Context/Prerequisites
|
|
71
|
+
2. Core concepts (definitions, patterns)
|
|
72
|
+
3. Process/Methodology (step-by-step)
|
|
73
|
+
4. Output format/Examples
|
|
74
|
+
5. Quality checklist
|
|
75
|
+
6. References
|
|
76
|
+
|
|
77
|
+
**Conditional**: Skip restructuring if skill is under 30 lines and covers a single topic.
|
|
78
|
+
|
|
79
|
+
#### BP-005: Missing Context → Explicit Prerequisites
|
|
80
|
+
|
|
81
|
+
| Detection | Transform |
|
|
82
|
+
|-----------|-----------|
|
|
83
|
+
| Skill assumes knowledge not stated | Add Prerequisites section listing required context |
|
|
84
|
+
| Domain terms used without definition | Add definitions inline or in a glossary table |
|
|
85
|
+
| No "when to use" guidance | Add trigger conditions with concrete scenarios |
|
|
86
|
+
|
|
87
|
+
**Skill example:**
|
|
88
|
+
- Before: "Apply the strangler pattern for migration"
|
|
89
|
+
- After: "**Prerequisite**: Existing monolith with identifiable module boundaries. **When to use**: Replacing legacy module while maintaining production traffic."
|
|
90
|
+
|
|
91
|
+
#### BP-006: Complex Content → Decomposed Steps
|
|
92
|
+
|
|
93
|
+
| Detection | Transform |
|
|
94
|
+
|-----------|-----------|
|
|
95
|
+
| 3+ objectives in one instruction | Break into numbered steps with checkpoints |
|
|
96
|
+
| Sequential dependencies not explicit | Add dependency markers between steps |
|
|
97
|
+
| No intermediate verification | Insert checkpoint after each step |
|
|
98
|
+
|
|
99
|
+
**Conditional**: Skip decomposition for simple reference tables or single-criteria rules.
|
|
100
|
+
|
|
101
|
+
**Key insight**: Goal is evaluable granularity with quality checkpoints, not decomposition for its own sake.
|
|
102
|
+
|
|
103
|
+
### P3: Enhancement (Could Fix)
|
|
104
|
+
|
|
105
|
+
Incremental improvements for specific contexts.
|
|
106
|
+
|
|
107
|
+
#### BP-007: Biased Examples → Diverse Coverage
|
|
108
|
+
|
|
109
|
+
| Detection | Transform |
|
|
110
|
+
|-----------|-----------|
|
|
111
|
+
| All examples share same pattern/structure | Add edge cases and exceptions |
|
|
112
|
+
| Only happy-path examples | Add error cases, boundary conditions |
|
|
113
|
+
| Examples all same complexity | Include simple, moderate, and complex |
|
|
114
|
+
|
|
115
|
+
#### BP-008: No Uncertainty Permission → Explicit Escalation
|
|
116
|
+
|
|
117
|
+
| Detection | Transform |
|
|
118
|
+
|-----------|-----------|
|
|
119
|
+
| Skill demands definitive answers always | Add escalation criteria for ambiguous cases |
|
|
120
|
+
| No "when to stop" guidance | Add explicit stopping conditions |
|
|
121
|
+
|
|
122
|
+
**Skill example:**
|
|
123
|
+
- Before: "Determine the root cause"
|
|
124
|
+
- After: "Determine the root cause. If root cause is uncertain after 3 investigation cycles, report top 3 hypotheses with confidence levels and evidence for each."
|
|
125
|
+
|
|
126
|
+
## 9 Skill Editing Principles
|
|
127
|
+
|
|
128
|
+
Measurable quality criteria for skill content. Each principle includes a pass/fail test.
|
|
129
|
+
|
|
130
|
+
| # | Principle | Pass Criteria | Fail Example |
|
|
131
|
+
|---|-----------|---------------|--------------|
|
|
132
|
+
| 1 | Context efficiency | Every sentence contributes to LLM decision-making. No filler. | "This is an important skill that helps with..." |
|
|
133
|
+
| 2 | Deduplication | No concept explained twice within the skill or across skills | Same error handling rules in both coding-standards and typescript-rules |
|
|
134
|
+
| 3 | Grouping | Related criteria in single section (minimize read operations) | Scattered error handling rules across 4 sections |
|
|
135
|
+
| 4 | Measurability | All criteria use if-then format or concrete thresholds | "Write clean code" without definition of clean |
|
|
136
|
+
| 5 | Positive form | Instructions state what to do (BP-001 applied) | "Don't use any" instead of "Use only X" |
|
|
137
|
+
| 6 | Consistent notation | Uniform heading levels, list styles, table formats | Mix of `-`, `*`, `1.` in same context |
|
|
138
|
+
| 7 | Explicit prerequisites | All assumed knowledge stated | Uses "DI" without defining Dependency Injection |
|
|
139
|
+
| 8 | Priority ordering | Most important items first, exceptions last | Edge cases before common patterns |
|
|
140
|
+
| 9 | Scope boundaries | Explicit coverage: what this skill addresses vs references to other skills | Overlapping guidance with no cross-reference |
|
|
141
|
+
|
|
142
|
+
## References
|
|
143
|
+
|
|
144
|
+
- **Creating skills**: See [references/creation-guide.md](references/creation-guide.md) for generation flow and description guidelines
|
|
145
|
+
- **Reviewing skills**: See [references/review-criteria.md](references/review-criteria.md) for evaluation flow and grading
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Skill Creation Guide
|
|
2
|
+
|
|
3
|
+
Guide for generating new skill content from raw user knowledge.
|
|
4
|
+
|
|
5
|
+
## Creation Flow
|
|
6
|
+
|
|
7
|
+
### Step 1: Analysis
|
|
8
|
+
|
|
9
|
+
**Input**: Raw user knowledge (rules, patterns, examples, criteria)
|
|
10
|
+
|
|
11
|
+
**Process**:
|
|
12
|
+
1. Classify content: definitions, patterns, processes, criteria, examples
|
|
13
|
+
2. Detect issues using BP patterns (BP-001 through BP-008)
|
|
14
|
+
3. Estimate size: small (<80 lines), medium (80-250), large (250+)
|
|
15
|
+
4. Identify cross-references to existing skills
|
|
16
|
+
|
|
17
|
+
**Output**: Content classification + issue list.
|
|
18
|
+
|
|
19
|
+
### Step 2: Generate Optimized Content
|
|
20
|
+
|
|
21
|
+
**Input**: Classified content + issue list
|
|
22
|
+
|
|
23
|
+
**Process**:
|
|
24
|
+
1. Apply transforms in priority order: P1 → P2 → P3
|
|
25
|
+
2. Structure content following standard section order:
|
|
26
|
+
- Context/Prerequisites
|
|
27
|
+
- Core concepts (definitions, patterns)
|
|
28
|
+
- Process/Methodology (step-by-step)
|
|
29
|
+
- Output format/Examples
|
|
30
|
+
- Quality checklist
|
|
31
|
+
- References
|
|
32
|
+
3. **Balance checks**:
|
|
33
|
+
- Over-optimization: Content exceeds scope of user's input → trim
|
|
34
|
+
- Clarity trade-off: Structure obscures main point → simplify
|
|
35
|
+
4. Verify 9 principles pass
|
|
36
|
+
|
|
37
|
+
**Output**: Optimized SKILL.md content.
|
|
38
|
+
|
|
39
|
+
## Description Guidelines
|
|
40
|
+
|
|
41
|
+
For skill frontmatter `description` field:
|
|
42
|
+
|
|
43
|
+
| Rule | Example |
|
|
44
|
+
|------|---------|
|
|
45
|
+
| Third-person, verb-first | "Evaluates code quality..." not "This skill evaluates..." |
|
|
46
|
+
| Include "Use when:" trigger | "Use when creating tests or reviewing test quality." |
|
|
47
|
+
| Target ~200 characters | Shorter descriptions reduce context pressure across all loaded skills |
|
|
48
|
+
| Specific over generic | "Applies 8 content patterns" not "Improves quality" |
|
|
49
|
+
| No implementation details | Describe what it does, not how |
|
|
50
|
+
|
|
51
|
+
**Template**: `{Verb}s {what} against {criteria}. Use when {trigger scenarios}.`
|
|
52
|
+
|
|
53
|
+
## Split Decision
|
|
54
|
+
|
|
55
|
+
If generated content exceeds 400 lines:
|
|
56
|
+
- Extract reference data (large tables, example collections) to `references/`
|
|
57
|
+
- Keep SKILL.md under 250 lines with references to extracted files
|
|
58
|
+
- All reference files one level deep from SKILL.md
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Skill Review Criteria
|
|
2
|
+
|
|
3
|
+
Criteria for evaluating existing or generated skill content quality.
|
|
4
|
+
|
|
5
|
+
## Review Flow
|
|
6
|
+
|
|
7
|
+
### Step 1: Pattern Scan
|
|
8
|
+
|
|
9
|
+
**Input**: Skill content (SKILL.md frontmatter + body)
|
|
10
|
+
|
|
11
|
+
**Process**:
|
|
12
|
+
1. Scan for each BP pattern (BP-001 through BP-008)
|
|
13
|
+
2. Record: pattern ID, severity, location, original text
|
|
14
|
+
3. Evaluate against 9 editing principles
|
|
15
|
+
4. Count total lines, estimate size category
|
|
16
|
+
|
|
17
|
+
**Output**: Issue list with severity, location, and original text per finding.
|
|
18
|
+
|
|
19
|
+
### Step 2: Evaluate and Grade
|
|
20
|
+
|
|
21
|
+
**Input**: Issue list + skill content
|
|
22
|
+
|
|
23
|
+
**Process**:
|
|
24
|
+
1. Count P1 and P2 issues
|
|
25
|
+
2. Count principles passed (pass/partial/fail)
|
|
26
|
+
3. Check cross-skill overlap
|
|
27
|
+
4. **Balance assessment**:
|
|
28
|
+
- Over-optimization: Excessive constraints for simple topic
|
|
29
|
+
- Lost expertise: Domain knowledge compressed away in structured content
|
|
30
|
+
- Clarity trade-off: Structure obscures main point
|
|
31
|
+
- Description quality: Frontmatter description follows guidelines
|
|
32
|
+
5. Assign grade
|
|
33
|
+
|
|
34
|
+
**Output**: Quality report with grade, issues, and action items.
|
|
35
|
+
|
|
36
|
+
## Grading
|
|
37
|
+
|
|
38
|
+
| Grade | Criteria | Recommendation |
|
|
39
|
+
|-------|----------|----------------|
|
|
40
|
+
| A | 0 P1, 0 P2 issues, 8+ principles pass | Ready for use |
|
|
41
|
+
| B | 0 P1, ≤2 P2 issues, 6+ principles pass | Acceptable with noted improvements |
|
|
42
|
+
| C | Any P1 OR >2 P2 OR <6 principles pass | Revision required |
|
|
43
|
+
|
|
44
|
+
## Review Mode Differences
|
|
45
|
+
|
|
46
|
+
| Aspect | creation | modification |
|
|
47
|
+
|--------|----------|-------------|
|
|
48
|
+
| Scope | All content, comprehensive | Changed sections + regression check |
|
|
49
|
+
| BP scan | All 8 patterns | Focus on patterns relevant to changes |
|
|
50
|
+
| Cross-skill check | Full overlap scan | Verify changes didn't introduce overlap |
|
|
51
|
+
| Extra check | — | Report issues outside change scope separately |
|
|
@@ -25,14 +25,11 @@ skills:
|
|
|
25
25
|
- "Debugging Techniques"
|
|
26
26
|
- "Type Safety Fundamentals"
|
|
27
27
|
- "Refactoring Techniques"
|
|
28
|
-
- "Situations Requiring Technical Decisions"
|
|
29
|
-
- "Continuous Improvement Mindset"
|
|
30
28
|
- "Implementation Completeness Assurance"
|
|
29
|
+
- "Impact Analysis"
|
|
31
30
|
- "Red-Green-Refactor Process (Test-First Development)"
|
|
32
31
|
- "Test Design Principles"
|
|
33
|
-
- "Test Helper Utilization Rules"
|
|
34
32
|
- "Test Granularity Principles"
|
|
35
|
-
- "Continuity Test Scope"
|
|
36
33
|
|
|
37
34
|
typescript-rules:
|
|
38
35
|
skill: "typescript-rules"
|
|
@@ -85,7 +82,6 @@ skills:
|
|
|
85
82
|
- "Basic Technology Stack Policy"
|
|
86
83
|
- "Environment Variable Management and Security"
|
|
87
84
|
- "Architecture Design"
|
|
88
|
-
- "Architecture Patterns"
|
|
89
85
|
- "Unified Data Flow Principles"
|
|
90
86
|
- "Build and Testing"
|
|
91
87
|
|
|
@@ -97,9 +93,10 @@ skills:
|
|
|
97
93
|
key-references:
|
|
98
94
|
- "Project-specific (empirical)"
|
|
99
95
|
sections:
|
|
100
|
-
- "
|
|
101
|
-
- "
|
|
102
|
-
- "
|
|
96
|
+
- "Project Overview"
|
|
97
|
+
- "Domain Constraints"
|
|
98
|
+
- "Development Phase"
|
|
99
|
+
- "Directory Conventions"
|
|
103
100
|
|
|
104
101
|
documentation-criteria:
|
|
105
102
|
skill: "documentation-criteria"
|
|
@@ -120,6 +117,7 @@ skills:
|
|
|
120
117
|
- "AI Automation Rules"
|
|
121
118
|
- "Diagram Requirements"
|
|
122
119
|
- "Common ADR Relationships"
|
|
120
|
+
- "Templates"
|
|
123
121
|
|
|
124
122
|
implementation-approach:
|
|
125
123
|
skill: "implementation-approach"
|
|
@@ -163,10 +161,33 @@ skills:
|
|
|
163
161
|
- "Workflow Orchestration Patterns"
|
|
164
162
|
- "Agent Coordination Patterns"
|
|
165
163
|
sections:
|
|
166
|
-
- "
|
|
167
|
-
- "
|
|
168
|
-
- "
|
|
164
|
+
- "Core Principle: I Am an Orchestrator"
|
|
165
|
+
- "Decision Flow When Receiving Tasks"
|
|
166
|
+
- "Subagents I Can Utilize"
|
|
167
|
+
- "My Orchestration Principles"
|
|
168
|
+
- "Constraints Between Subagents"
|
|
169
|
+
- "Scale Determination and Document Requirements"
|
|
170
|
+
- "Structured Response Specifications"
|
|
171
|
+
- "My Basic Flow for Work Planning"
|
|
172
|
+
- "Cross-Layer Orchestration"
|
|
169
173
|
- "Autonomous Execution Mode"
|
|
174
|
+
- "My Main Roles as Orchestrator"
|
|
175
|
+
- "Important Constraints"
|
|
176
|
+
- "Required Dialogue Points with Humans"
|
|
177
|
+
|
|
178
|
+
skill-optimization:
|
|
179
|
+
skill: "skill-optimization"
|
|
180
|
+
tags: [skill-creation, skill-editing, content-optimization, quality-evaluation, description-generation, metadata]
|
|
181
|
+
typical-use: "Creating new skills, refining skill content, evaluating skill quality, generating descriptions"
|
|
182
|
+
size: medium
|
|
183
|
+
key-references:
|
|
184
|
+
- "BP-001~008 Content Optimization Patterns"
|
|
185
|
+
- "9 Skill Editing Principles"
|
|
186
|
+
sections:
|
|
187
|
+
- "Core Philosophy"
|
|
188
|
+
- "Content Optimization Patterns"
|
|
189
|
+
- "9 Skill Editing Principles"
|
|
190
|
+
- "References"
|
|
170
191
|
|
|
171
192
|
# Frontend-specific Skills
|
|
172
193
|
frontend/typescript-rules:
|
|
@@ -220,6 +241,3 @@ skills:
|
|
|
220
241
|
- "Architecture Design"
|
|
221
242
|
- "Unified Data Flow Principles"
|
|
222
243
|
- "Build and Testing"
|
|
223
|
-
- "Quality Check Requirements"
|
|
224
|
-
- "Coverage Requirements"
|
|
225
|
-
- "Non-functional Requirements"
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-optimization
|
|
3
|
+
description: スキルファイルの品質を8つのコンテンツパターンと9つの編集原則で評価・最適化。スキル作成、内容改善、品質監査時に使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# スキルコンテンツ最適化
|
|
7
|
+
|
|
8
|
+
## 基本方針
|
|
9
|
+
|
|
10
|
+
1. **根拠に基づく**: プロンプト工学の研究成果をスキル執筆に応用
|
|
11
|
+
2. **具体的**: 各パターンに検出条件と変換方法を提供
|
|
12
|
+
3. **構造特化**: 表現と構成を最適化し、ドメイン知識は変更しない
|
|
13
|
+
|
|
14
|
+
## コンテンツ最適化パターン
|
|
15
|
+
|
|
16
|
+
### P1: 重大(修正必須)
|
|
17
|
+
|
|
18
|
+
スキル読み込み時のLLM実行精度に直接影響する問題。
|
|
19
|
+
|
|
20
|
+
#### BP-001: 否定形の指示 → 肯定形への変換
|
|
21
|
+
|
|
22
|
+
| 検出条件 | 変換方法 |
|
|
23
|
+
|----------|----------|
|
|
24
|
+
| 「〜しない」「〜を避ける」「禁止」等の否定形指示 | 同等の制約を持つ肯定形の指示に変換 |
|
|
25
|
+
|
|
26
|
+
**スキルでの例:**
|
|
27
|
+
- 変更前: 「汎用的な変数名を使わないこと」
|
|
28
|
+
- 変更後: 「目的を表す具体的な変数名を使用する(例: `x`ではなく`userId`)」
|
|
29
|
+
|
|
30
|
+
**スキルで重大な理由**: LLMの注意機構は否定された内容に集中する。「〜するな」という指示は禁止行為の出現確率をむしろ高める。
|
|
31
|
+
|
|
32
|
+
#### BP-002: 曖昧な指示 → 具体的な判断基準
|
|
33
|
+
|
|
34
|
+
| 検出条件 | 変換方法 |
|
|
35
|
+
|----------|----------|
|
|
36
|
+
| 「適切に」「良い」「正しく」「ベスト」「明確に」等 | 測定可能なif-then基準または具体的な閾値に置換 |
|
|
37
|
+
| 出力形式・スコープ・成功基準が未定義 | 明示的な制約を追加 |
|
|
38
|
+
|
|
39
|
+
**スキルでの例:**
|
|
40
|
+
- 変更前: 「エラーは適切に処理する」
|
|
41
|
+
- 変更後: 「エラーハンドリング基準: 1. try-catch必須: 外部API呼び出し、ファイルI/O、JSON.parse 2. ログ必須項目: error.name、error.stack、タイムスタンプ 3. 呼び出し元での処理が必要な場合はコンテキスト付きで再throw」
|
|
42
|
+
|
|
43
|
+
**スキルで重大な理由**: 実行精度の差異の約40%は曖昧な指示に起因する。曖昧な記述はLLMに推測を強いる。
|
|
44
|
+
|
|
45
|
+
#### BP-003: 出力形式の欠落 → 構造化出力の明示
|
|
46
|
+
|
|
47
|
+
| 検出条件 | 変換方法 |
|
|
48
|
+
|----------|----------|
|
|
49
|
+
| 何をすべきかは書いてあるが成果物の形式が未定義 | 構造・フィールド・例を含む出力セクションを追加 |
|
|
50
|
+
|
|
51
|
+
**スキルでの例:**
|
|
52
|
+
- 変更前: 「コードの問題を分析する」
|
|
53
|
+
- 変更後: 「出力形式: `## 検出した問題` テーブル形式: | 重大度 | 箇所 | 説明 | 修正案 |」
|
|
54
|
+
|
|
55
|
+
**スキルで重大な理由**: 構造化出力の制約はハルシネーションを抑制し、スキル適用結果の一貫性を確保する。
|
|
56
|
+
|
|
57
|
+
### P2: 高影響(修正推奨)
|
|
58
|
+
|
|
59
|
+
対処により実効性が向上する問題。
|
|
60
|
+
|
|
61
|
+
#### BP-004: 未構造化コンテンツ → 整理されたフォーマット
|
|
62
|
+
|
|
63
|
+
| 検出条件 | 変換方法 |
|
|
64
|
+
|----------|----------|
|
|
65
|
+
| 見出しのない文章の塊 | 標準セクション順序を適用(下記参照) |
|
|
66
|
+
| 複数トピックが1セクションに混在 | 見出し付きの個別セクションに分割 |
|
|
67
|
+
| 参照データがリスト形式のまま | テーブル形式に変換 |
|
|
68
|
+
|
|
69
|
+
**標準セクション順序:**
|
|
70
|
+
1. コンテキスト/前提条件
|
|
71
|
+
2. 中核概念(定義、パターン)
|
|
72
|
+
3. プロセス/手順(ステップ形式)
|
|
73
|
+
4. 出力形式/具体例
|
|
74
|
+
5. 品質チェックリスト
|
|
75
|
+
6. 参照
|
|
76
|
+
|
|
77
|
+
**適用条件**: 30行未満かつ単一トピックのスキルには構造化を省略。
|
|
78
|
+
|
|
79
|
+
#### BP-005: コンテキスト不足 → 前提条件の明示
|
|
80
|
+
|
|
81
|
+
| 検出条件 | 変換方法 |
|
|
82
|
+
|----------|----------|
|
|
83
|
+
| 記述されていない前提知識に依存 | 必要な前提を列挙したPrerequisitesセクションを追加 |
|
|
84
|
+
| 定義なしにドメイン用語を使用 | インラインまたは用語テーブルで定義を追加 |
|
|
85
|
+
| 使用場面の指針がない | 具体的なシナリオ付きのトリガー条件を追加 |
|
|
86
|
+
|
|
87
|
+
**スキルでの例:**
|
|
88
|
+
- 変更前: 「移行にはStrangler Patternを適用する」
|
|
89
|
+
- 変更後: 「**前提**: モジュール境界が識別可能な既存モノリス。**使用場面**: 本番トラフィックを維持しながらレガシーモジュールを置換する場合。」
|
|
90
|
+
|
|
91
|
+
#### BP-006: 複雑な内容 → ステップ分解
|
|
92
|
+
|
|
93
|
+
| 検出条件 | 変換方法 |
|
|
94
|
+
|----------|----------|
|
|
95
|
+
| 1つの指示に3つ以上の目的 | チェックポイント付きの番号付きステップに分解 |
|
|
96
|
+
| 順序依存が暗黙的 | ステップ間の依存関係を明示 |
|
|
97
|
+
| 中間検証がない | 各ステップ後にチェックポイントを挿入 |
|
|
98
|
+
|
|
99
|
+
**適用条件**: 単純な参照テーブルや単一基準のルールには分解を省略。
|
|
100
|
+
|
|
101
|
+
**要点**: 目的は「分解すること」ではなく、品質チェックポイント付きの**評価可能な粒度**にすること。
|
|
102
|
+
|
|
103
|
+
### P3: 改善(対応可能なら)
|
|
104
|
+
|
|
105
|
+
特定の状況で効果がある段階的な改善。
|
|
106
|
+
|
|
107
|
+
#### BP-007: 偏った例示 → 多様なカバレッジ
|
|
108
|
+
|
|
109
|
+
| 検出条件 | 変換方法 |
|
|
110
|
+
|----------|----------|
|
|
111
|
+
| 全例が同じパターン/構造 | エッジケースと例外を追加 |
|
|
112
|
+
| 正常系の例のみ | エラーケース、境界条件を追加 |
|
|
113
|
+
| 全例が同じ複雑度 | 簡単・中程度・複雑の例を含める |
|
|
114
|
+
|
|
115
|
+
#### BP-008: 不確実性の許容なし → 明示的なエスカレーション
|
|
116
|
+
|
|
117
|
+
| 検出条件 | 変換方法 |
|
|
118
|
+
|----------|----------|
|
|
119
|
+
| 常に確定的な回答を要求 | 曖昧な場合のエスカレーション基準を追加 |
|
|
120
|
+
| 「いつ止めるか」の指針がない | 明示的な停止条件を追加 |
|
|
121
|
+
|
|
122
|
+
**スキルでの例:**
|
|
123
|
+
- 変更前: 「根本原因を特定する」
|
|
124
|
+
- 変更後: 「根本原因を特定する。3回の調査サイクル後も不確定な場合は、上位3仮説を信頼度と根拠付きで報告する。」
|
|
125
|
+
|
|
126
|
+
## 9つの編集原則
|
|
127
|
+
|
|
128
|
+
スキルコンテンツの測定可能な品質基準。各原則に合否判定基準を設定。
|
|
129
|
+
|
|
130
|
+
| # | 原則 | 合格基準 | 不合格例 |
|
|
131
|
+
|---|------|----------|----------|
|
|
132
|
+
| 1 | コンテキスト効率 | 全文がLLMの判断に寄与する。冗長な記述なし | 「これは〜に役立つ重要なスキルで...」 |
|
|
133
|
+
| 2 | 重複排除 | スキル内・スキル間で同じ概念の重複説明なし | coding-standardsとtypescript-rulesに同じエラーハンドリング規則 |
|
|
134
|
+
| 3 | 関連内容の集約 | 関連する基準を1セクションに集約(読み込み回数最小化) | エラーハンドリング規則が4セクションに散在 |
|
|
135
|
+
| 4 | 測定可能性 | 全基準がif-then形式または具体的閾値 | 「きれいなコードを書く」の定義なし |
|
|
136
|
+
| 5 | 肯定形 | 指示は「何をするか」を記述(BP-001適用済み) | 「一切使わないこと」→「Xのみ使用する」 |
|
|
137
|
+
| 6 | 表記の一貫性 | 見出しレベル、リスト記法、テーブル形式が統一 | 同一文脈で`-`、`*`、`1.`が混在 |
|
|
138
|
+
| 7 | 前提条件の明示 | 暗黙の前提知識が全て記述されている | 「DI」を定義せずに使用 |
|
|
139
|
+
| 8 | 重要度順の記述 | 最重要項目が先頭、例外は末尾 | エッジケースが共通パターンより先に記述 |
|
|
140
|
+
| 9 | スコープ境界 | このスキルが扱う範囲と他スキルへの参照が明示 | 他スキルと重複する記述に相互参照なし |
|
|
141
|
+
|
|
142
|
+
## References
|
|
143
|
+
|
|
144
|
+
- **スキル生成時**: [references/creation-guide.md](references/creation-guide.md) - 生成フローとdescription指針
|
|
145
|
+
- **スキルレビュー時**: [references/review-criteria.md](references/review-criteria.md) - 評価フローとグレード判定基準
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# スキル生成ガイド
|
|
2
|
+
|
|
3
|
+
ユーザーの生の知識から新規スキルコンテンツを生成するためのガイド。
|
|
4
|
+
|
|
5
|
+
## 生成フロー
|
|
6
|
+
|
|
7
|
+
### Step 1: 分析
|
|
8
|
+
|
|
9
|
+
**入力**: ユーザーの生の知識(ルール、パターン、具体例、判断基準)
|
|
10
|
+
|
|
11
|
+
**手順**:
|
|
12
|
+
1. コンテンツを分類: 定義、パターン、プロセス、基準、具体例
|
|
13
|
+
2. BPパターン(BP-001〜BP-008)で問題を検出
|
|
14
|
+
3. サイズ見積もり: small(80行未満)、medium(80-250行)、large(250行以上)
|
|
15
|
+
4. 既存スキルとの相互参照を特定
|
|
16
|
+
|
|
17
|
+
**出力**: コンテンツ分類 + 検出リスト。
|
|
18
|
+
|
|
19
|
+
### Step 2: 最適化済みコンテンツの生成
|
|
20
|
+
|
|
21
|
+
**入力**: 分類済みコンテンツ + 検出リスト
|
|
22
|
+
|
|
23
|
+
**手順**:
|
|
24
|
+
1. 優先度順に変換を適用: P1 → P2 → P3
|
|
25
|
+
2. 標準セクション順序で構造化:
|
|
26
|
+
- コンテキスト/前提条件
|
|
27
|
+
- 中核概念(定義、パターン)
|
|
28
|
+
- プロセス/手順(ステップ形式)
|
|
29
|
+
- 出力形式/具体例
|
|
30
|
+
- 品質チェックリスト
|
|
31
|
+
- 参照
|
|
32
|
+
3. **バランス確認**:
|
|
33
|
+
- 過剰最適化: ユーザー入力の範囲を超えている → 削減
|
|
34
|
+
- 可読性低下: 構造化で要点が不明瞭 → 簡素化
|
|
35
|
+
4. 9原則の合否を確認
|
|
36
|
+
|
|
37
|
+
**出力**: 最適化済みSKILL.mdコンテンツ。
|
|
38
|
+
|
|
39
|
+
## description記述の指針
|
|
40
|
+
|
|
41
|
+
スキルのfrontmatter `description`フィールド向け:
|
|
42
|
+
|
|
43
|
+
| ルール | 例 |
|
|
44
|
+
|--------|-----|
|
|
45
|
+
| 三人称・動詞始まり | 「コード品質を検査。」(「このスキルは〜」としない) |
|
|
46
|
+
| 使用場面を含める | 「機能実装、コードレビュー時に使用。」 |
|
|
47
|
+
| 200文字前後を目安 | 短いほど全スキル読み込み時のコンテキスト圧迫が減る |
|
|
48
|
+
| 具体的に記述 | 「8つのコンテンツパターンを適用」(「品質を改善」としない) |
|
|
49
|
+
| 実装詳細を含めない | 何をするかを記述し、どうやるかは記述しない |
|
|
50
|
+
|
|
51
|
+
**テンプレート**: `{対象}を{基準}で{動詞}。{使用場面}時に使用。`
|
|
52
|
+
|
|
53
|
+
## 分割判定
|
|
54
|
+
|
|
55
|
+
生成コンテンツが400行を超える場合:
|
|
56
|
+
- 参照データ(大規模テーブル、具体例集)を`references/`に抽出
|
|
57
|
+
- SKILL.md本体は250行以内に収め、抽出ファイルへの参照を記載
|
|
58
|
+
- 参照ファイルはSKILL.mdから1階層のみ
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# スキルレビュー基準
|
|
2
|
+
|
|
3
|
+
既存または生成済みスキルコンテンツの品質評価基準。
|
|
4
|
+
|
|
5
|
+
## レビューフロー
|
|
6
|
+
|
|
7
|
+
### Step 1: パターン検出
|
|
8
|
+
|
|
9
|
+
**入力**: スキルコンテンツ(SKILL.md frontmatter + 本文)
|
|
10
|
+
|
|
11
|
+
**手順**:
|
|
12
|
+
1. BPパターン(BP-001〜BP-008)を順に検出
|
|
13
|
+
2. 記録: パターンID、重大度、該当箇所、原文
|
|
14
|
+
3. 9つの編集原則に照らして評価
|
|
15
|
+
4. 総行数を集計しサイズ区分を判定
|
|
16
|
+
|
|
17
|
+
**出力**: 重大度・該当箇所・原文を含む検出リスト。
|
|
18
|
+
|
|
19
|
+
### Step 2: 評価とグレード判定
|
|
20
|
+
|
|
21
|
+
**入力**: 検出リスト + スキルコンテンツ
|
|
22
|
+
|
|
23
|
+
**手順**:
|
|
24
|
+
1. P1・P2問題の件数を集計
|
|
25
|
+
2. 原則の合否を集計(合格/部分的/不合格)
|
|
26
|
+
3. スキル間の重複を確認
|
|
27
|
+
4. **バランス評価**:
|
|
28
|
+
- 過剰最適化: 単純なトピックに対して制約過多
|
|
29
|
+
- 知識の欠落: 構造化でドメイン固有の知見が消失
|
|
30
|
+
- 可読性低下: 構造化で要点が不明瞭
|
|
31
|
+
- description品質: frontmatterのdescriptionが指針に準拠
|
|
32
|
+
5. グレード判定
|
|
33
|
+
|
|
34
|
+
**出力**: グレード・問題点・修正提案を含む品質レポート。
|
|
35
|
+
|
|
36
|
+
## グレード判定基準
|
|
37
|
+
|
|
38
|
+
| グレード | 基準 | 判定 |
|
|
39
|
+
|----------|------|------|
|
|
40
|
+
| A | P1問題0件、P2問題0件、原則8つ以上合格 | 即使用可 |
|
|
41
|
+
| B | P1問題0件、P2問題2件以下、原則6つ以上合格 | 改善点を認識した上で使用可 |
|
|
42
|
+
| C | P1問題あり、またはP2問題3件以上、または原則合格6未満 | 修正が必要 |
|
|
43
|
+
|
|
44
|
+
## レビューモード別の差異
|
|
45
|
+
|
|
46
|
+
| 観点 | creation | modification |
|
|
47
|
+
|------|----------|-------------|
|
|
48
|
+
| 対象範囲 | 全コンテンツを網羅的に | 変更箇所 + 退行チェック |
|
|
49
|
+
| BPスキャン | 全8パターン | 変更に関連するパターンに注力 |
|
|
50
|
+
| スキル間確認 | 全体の重複スキャン | 変更で重複が発生していないか |
|
|
51
|
+
| 追加確認 | — | 変更スコープ外の問題は別途報告 |
|