create-ai-project 1.11.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/acceptance-test-generator.md +316 -0
- package/.claude/agents/code-reviewer.md +193 -0
- package/.claude/agents/document-reviewer.md +182 -0
- package/.claude/agents/prd-creator.md +186 -0
- package/.claude/agents/quality-fixer.md +295 -0
- package/.claude/agents/requirement-analyzer.md +161 -0
- package/.claude/agents/rule-advisor.md +194 -0
- package/.claude/agents/task-decomposer.md +291 -0
- package/.claude/agents/task-executor.md +270 -0
- package/.claude/agents/technical-designer.md +343 -0
- package/.claude/agents/work-planner.md +181 -0
- package/.claude/agents-en/acceptance-test-generator.md +256 -0
- package/.claude/agents-en/code-reviewer.md +195 -0
- package/.claude/agents-en/design-sync.md +225 -0
- package/.claude/agents-en/document-reviewer.md +190 -0
- package/.claude/agents-en/integration-test-reviewer.md +195 -0
- package/.claude/agents-en/prd-creator.md +196 -0
- package/.claude/agents-en/quality-fixer-frontend.md +334 -0
- package/.claude/agents-en/quality-fixer.md +291 -0
- package/.claude/agents-en/requirement-analyzer.md +165 -0
- package/.claude/agents-en/rule-advisor.md +194 -0
- package/.claude/agents-en/task-decomposer.md +291 -0
- package/.claude/agents-en/task-executor-frontend.md +276 -0
- package/.claude/agents-en/task-executor.md +272 -0
- package/.claude/agents-en/technical-designer-frontend.md +441 -0
- package/.claude/agents-en/technical-designer.md +371 -0
- package/.claude/agents-en/work-planner.md +216 -0
- package/.claude/agents-ja/acceptance-test-generator.md +256 -0
- package/.claude/agents-ja/code-reviewer.md +195 -0
- package/.claude/agents-ja/design-sync.md +225 -0
- package/.claude/agents-ja/document-reviewer.md +192 -0
- package/.claude/agents-ja/integration-test-reviewer.md +195 -0
- package/.claude/agents-ja/prd-creator.md +194 -0
- package/.claude/agents-ja/quality-fixer-frontend.md +335 -0
- package/.claude/agents-ja/quality-fixer.md +292 -0
- package/.claude/agents-ja/requirement-analyzer.md +164 -0
- package/.claude/agents-ja/rule-advisor.md +194 -0
- package/.claude/agents-ja/task-decomposer.md +291 -0
- package/.claude/agents-ja/task-executor-frontend.md +276 -0
- package/.claude/agents-ja/task-executor.md +272 -0
- package/.claude/agents-ja/technical-designer-frontend.md +442 -0
- package/.claude/agents-ja/technical-designer.md +370 -0
- package/.claude/agents-ja/work-planner.md +213 -0
- package/.claude/commands/build.md +78 -0
- package/.claude/commands/design.md +27 -0
- package/.claude/commands/implement.md +79 -0
- package/.claude/commands/plan.md +43 -0
- package/.claude/commands/project-inject.md +76 -0
- package/.claude/commands/refine-rule.md +206 -0
- package/.claude/commands/review.md +78 -0
- package/.claude/commands/sync-rules.md +116 -0
- package/.claude/commands/task.md +13 -0
- package/.claude/commands-en/build.md +77 -0
- package/.claude/commands-en/design.md +39 -0
- package/.claude/commands-en/front-build.md +103 -0
- package/.claude/commands-en/front-design.md +42 -0
- package/.claude/commands-en/front-plan.md +40 -0
- package/.claude/commands-en/implement.md +75 -0
- package/.claude/commands-en/plan.md +45 -0
- package/.claude/commands-en/project-inject.md +76 -0
- package/.claude/commands-en/refine-rule.md +208 -0
- package/.claude/commands-en/review.md +78 -0
- package/.claude/commands-en/sync-rules.md +116 -0
- package/.claude/commands-en/task.md +13 -0
- package/.claude/commands-ja/build.md +75 -0
- package/.claude/commands-ja/design.md +37 -0
- package/.claude/commands-ja/front-build.md +103 -0
- package/.claude/commands-ja/front-design.md +42 -0
- package/.claude/commands-ja/front-plan.md +40 -0
- package/.claude/commands-ja/implement.md +73 -0
- package/.claude/commands-ja/plan.md +43 -0
- package/.claude/commands-ja/project-inject.md +76 -0
- package/.claude/commands-ja/refine-rule.md +206 -0
- package/.claude/commands-ja/review.md +78 -0
- package/.claude/commands-ja/sync-rules.md +116 -0
- package/.claude/commands-ja/task.md +13 -0
- package/.claude/settings.local.json +74 -0
- package/.husky/pre-commit +1 -0
- package/.husky/pre-push +3 -0
- package/.madgerc +14 -0
- package/.tsprunerc +11 -0
- package/CLAUDE.en.md +102 -0
- package/CLAUDE.ja.md +102 -0
- package/CLAUDE.md +111 -0
- package/LICENSE +21 -0
- package/README.ja.md +233 -0
- package/README.md +243 -0
- package/bin/create-project.js +87 -0
- package/biome.json +51 -0
- package/docs/adr/template-en.md +64 -0
- package/docs/adr/template-ja.md +64 -0
- package/docs/design/template-en.md +281 -0
- package/docs/design/template-ja.md +285 -0
- package/docs/guides/en/quickstart.md +111 -0
- package/docs/guides/en/rule-editing-guide.md +266 -0
- package/docs/guides/en/sub-agents.md +343 -0
- package/docs/guides/en/use-cases.md +308 -0
- package/docs/guides/ja/quickstart.md +112 -0
- package/docs/guides/ja/rule-editing-guide.md +266 -0
- package/docs/guides/ja/sub-agents.md +343 -0
- package/docs/guides/ja/use-cases.md +290 -0
- package/docs/guides/sub-agents.md +306 -0
- package/docs/plans/20250123-integration-test-improvement.md +993 -0
- package/docs/plans/template-en.md +130 -0
- package/docs/plans/template-ja.md +130 -0
- package/docs/prd/template-en.md +109 -0
- package/docs/prd/template-ja.md +109 -0
- package/docs/rules/ai-development-guide.md +260 -0
- package/docs/rules/architecture/implementation-approach.md +136 -0
- package/docs/rules/documentation-criteria.md +180 -0
- package/docs/rules/project-context.md +38 -0
- package/docs/rules/rules-index.yaml +137 -0
- package/docs/rules/technical-spec.md +47 -0
- package/docs/rules/typescript-testing.md +188 -0
- package/docs/rules/typescript.md +166 -0
- package/docs/rules-en/architecture/implementation-approach.md +136 -0
- package/docs/rules-en/coding-standards.md +333 -0
- package/docs/rules-en/documentation-criteria.md +184 -0
- package/docs/rules-en/frontend/technical-spec.md +143 -0
- package/docs/rules-en/frontend/typescript-testing.md +124 -0
- package/docs/rules-en/frontend/typescript.md +131 -0
- package/docs/rules-en/integration-e2e-testing.md +149 -0
- package/docs/rules-en/project-context.md +38 -0
- package/docs/rules-en/rules-index.yaml +211 -0
- package/docs/rules-en/technical-spec.md +86 -0
- package/docs/rules-en/typescript-testing.md +149 -0
- package/docs/rules-en/typescript.md +116 -0
- package/docs/rules-ja/architecture/implementation-approach.md +136 -0
- package/docs/rules-ja/coding-standards.md +333 -0
- package/docs/rules-ja/documentation-criteria.md +180 -0
- package/docs/rules-ja/frontend/technical-spec.md +143 -0
- package/docs/rules-ja/frontend/typescript-testing.md +124 -0
- package/docs/rules-ja/frontend/typescript.md +131 -0
- package/docs/rules-ja/integration-e2e-testing.md +149 -0
- package/docs/rules-ja/project-context.md +38 -0
- package/docs/rules-ja/rules-index.yaml +196 -0
- package/docs/rules-ja/technical-spec.md +86 -0
- package/docs/rules-ja/typescript-testing.md +149 -0
- package/docs/rules-ja/typescript.md +116 -0
- package/package.json +98 -0
- package/scripts/check-unused-exports.js +69 -0
- package/scripts/cleanup-test-processes.sh +32 -0
- package/scripts/post-setup.js +110 -0
- package/scripts/set-language.js +310 -0
- package/scripts/setup-project.js +199 -0
- package/scripts/show-coverage.js +74 -0
- package/src/index.ts +11 -0
- package/templates/.gitignore.template +52 -0
- package/tsconfig.json +50 -0
- package/vitest.config.mjs +47 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"permissions": {
|
|
4
|
+
"allow": [
|
|
5
|
+
"Bash(npm run check:unused:*)",
|
|
6
|
+
"Read(/Users/kagawashinsuke/Documents/tacoms-ai-bot/scripts/**)",
|
|
7
|
+
"WebSearch",
|
|
8
|
+
"Bash(npx ts-prune:*)",
|
|
9
|
+
"Bash(git checkout:*)",
|
|
10
|
+
"Bash(git pull:*)",
|
|
11
|
+
"Bash(chmod:*)",
|
|
12
|
+
"Bash(git add:*)",
|
|
13
|
+
"Bash(git commit:*)",
|
|
14
|
+
"Bash(gh api:*)",
|
|
15
|
+
"Bash(git branch:*)",
|
|
16
|
+
"WebFetch(domain:github.com)",
|
|
17
|
+
"Bash(npm install:*)",
|
|
18
|
+
"Bash(git reset:*)",
|
|
19
|
+
"WebFetch(domain:qiita.com)",
|
|
20
|
+
"Bash(cat:*)",
|
|
21
|
+
"Bash(git push:*)",
|
|
22
|
+
"WebFetch(domain:mermaid.js.org)",
|
|
23
|
+
"Bash(gh pr view:*)",
|
|
24
|
+
"Bash(gh pr diff:*)",
|
|
25
|
+
"Read(//tmp/**)",
|
|
26
|
+
"Bash(gh repo clone:*)",
|
|
27
|
+
"Bash(git stash:*)",
|
|
28
|
+
"Bash(npm run lang:ja:*)",
|
|
29
|
+
"Bash(find:*)",
|
|
30
|
+
"Bash(awk:*)",
|
|
31
|
+
"Bash(grep:*)",
|
|
32
|
+
"Bash(xargs basename:*)",
|
|
33
|
+
"WebFetch(domain:dev.to)",
|
|
34
|
+
"Bash(gh pr checks:*)",
|
|
35
|
+
"WebFetch(domain:www.anthropic.com)",
|
|
36
|
+
"Read(//Users/kagawashinsuke/Documents/agentic-code/**)",
|
|
37
|
+
"Read(//Users/kagawashinsuke/Documents/claude-code-workflows/**)",
|
|
38
|
+
"Bash(git -C /Users/kagawashinsuke/Documents/claude-code-workflows diff agents/acceptance-test-generator.md)",
|
|
39
|
+
"Read(//Users/kagawashinsuke/Documents/project-qb/**)",
|
|
40
|
+
"Bash(git rm:*)",
|
|
41
|
+
"Bash(git ls-tree:*)",
|
|
42
|
+
"Bash(node bin/create-project.js:*)",
|
|
43
|
+
"Bash(node:*)",
|
|
44
|
+
"WebFetch(domain:martinfowler.com)",
|
|
45
|
+
"Bash(test:*)",
|
|
46
|
+
"WebFetch(domain:www.agileconnection.com)",
|
|
47
|
+
"Bash(git log:*)",
|
|
48
|
+
"Bash(git mv:*)",
|
|
49
|
+
"Bash(gh pr create:*)",
|
|
50
|
+
"Bash(xargs git branch -D)",
|
|
51
|
+
"Bash(ls:*)",
|
|
52
|
+
"Bash(git clone:*)",
|
|
53
|
+
"WebFetch(domain:support.atlassian.com)",
|
|
54
|
+
"WebFetch(domain:community.atlassian.com)",
|
|
55
|
+
"WebFetch(domain:www.velir.com)",
|
|
56
|
+
"WebFetch(domain:scottspence.com)",
|
|
57
|
+
"WebFetch(domain:arxiv.org)",
|
|
58
|
+
"WebFetch(domain:dl.acm.org)",
|
|
59
|
+
"Bash(gh issue create:*)",
|
|
60
|
+
"Bash(git fetch:*)",
|
|
61
|
+
"Bash(git diff:*)",
|
|
62
|
+
"Bash(fi)",
|
|
63
|
+
"Bash(done)",
|
|
64
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
65
|
+
"Bash(npm pack:*)",
|
|
66
|
+
"Bash(npm view:*)",
|
|
67
|
+
"Bash(npx:*)",
|
|
68
|
+
"Bash(=20\" for compatibility\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n)\")"
|
|
69
|
+
],
|
|
70
|
+
"deny": [],
|
|
71
|
+
"ask": [],
|
|
72
|
+
"defaultMode": "acceptEdits"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.husky/pre-push
ADDED
package/.madgerc
ADDED
package/.tsprunerc
ADDED
package/CLAUDE.en.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Claude Code Development Rules
|
|
2
|
+
|
|
3
|
+
Core rules for maximizing AI execution accuracy. All instructions must follow this file.
|
|
4
|
+
|
|
5
|
+
## 🚨 Most Important Principle: Research OK, Implementation STOP
|
|
6
|
+
|
|
7
|
+
**User approval is mandatory before using any Edit/Write/MultiEdit tools**
|
|
8
|
+
|
|
9
|
+
Reason: To prevent implementations that differ from user intent and ensure correct direction
|
|
10
|
+
|
|
11
|
+
## Mandatory Execution Process
|
|
12
|
+
|
|
13
|
+
### Execution Flow (Required Steps)
|
|
14
|
+
1. **Task decomposition with TodoWrite** → Cannot proceed to implementation without it
|
|
15
|
+
Reason: To structure tasks and enable progress tracking
|
|
16
|
+
2. **Execute rule-advisor** → Understand task essence and select appropriate rules
|
|
17
|
+
Reason: To select appropriate rules and understand task essence
|
|
18
|
+
3. **Use Edit/Write/MultiEdit** → User approval is mandatory
|
|
19
|
+
Reason: Practicing the most important principle (Research OK, Implementation STOP)
|
|
20
|
+
4. **Execute implementation** → Cannot complete with quality check errors
|
|
21
|
+
Reason: To ensure high-quality code
|
|
22
|
+
5. **Count file changes** → Auto-stop when threshold exceeded
|
|
23
|
+
Reason: To get confirmation before impact becomes too large
|
|
24
|
+
|
|
25
|
+
### TodoWrite and Metacognition Integration
|
|
26
|
+
**Execution Rules**:
|
|
27
|
+
- When `pending → in_progress`: rule-advisor output is mandatory
|
|
28
|
+
- **After rule-advisor execution**: Always update TodoWrite in the following format
|
|
29
|
+
1. Add firstActionGuidance as the first task in Todo
|
|
30
|
+
2. Record taskEssence as the completion criteria for each task
|
|
31
|
+
3. Record warningPatterns as checkpoints during execution
|
|
32
|
+
- Using Edit tools without TodoWrite: Stop as rule violation
|
|
33
|
+
- When updating task status: Recording implementation details is mandatory (no blanks)
|
|
34
|
+
|
|
35
|
+
### Execution Prerequisites
|
|
36
|
+
1. **rule-advisor agent execution (invoke using Task tool)** → JSON response must exist
|
|
37
|
+
2. **TodoWrite task** → in_progress status must exist
|
|
38
|
+
3. **User approval record** → Explicit approval before Edit/Write
|
|
39
|
+
4. **Quality check results** → Cannot complete with errors > 0
|
|
40
|
+
|
|
41
|
+
### Required Alternative Patterns
|
|
42
|
+
- **Instead of any type** → Use unknown type with type guards
|
|
43
|
+
Reason: To ensure type safety and prevent runtime errors
|
|
44
|
+
- **When using Edit** → Always precede with TodoWrite for task management
|
|
45
|
+
Reason: To enable progress tracking and quality assurance
|
|
46
|
+
- **When using Edit/Write/MultiEdit** → Obtain user approval before execution
|
|
47
|
+
Reason: To comply with the most important principle (Research OK, Implementation STOP)
|
|
48
|
+
- **When declaring completion** → Confirm zero quality check errors before declaration
|
|
49
|
+
Reason: To merge only complete code
|
|
50
|
+
|
|
51
|
+
## Metacognitive Execution (Mandatory at Task Start)
|
|
52
|
+
|
|
53
|
+
### Metacognition with Information from rule-advisor
|
|
54
|
+
1. **Understand taskEssence (task essence)**
|
|
55
|
+
- Distinguish between surface work and fundamental purpose
|
|
56
|
+
- Judge "quick fix" vs "proper solution"
|
|
57
|
+
|
|
58
|
+
2. **Confirm applicableRules (applicable rules)**
|
|
59
|
+
- Judge if selected rules are appropriate
|
|
60
|
+
- Load necessary sections
|
|
61
|
+
|
|
62
|
+
3. **Recognize pastFailurePatterns (past failures)**
|
|
63
|
+
- Be careful not to repeat same failures
|
|
64
|
+
- Be conscious of suggested workarounds
|
|
65
|
+
|
|
66
|
+
4. **Execute firstAction (initial action)**
|
|
67
|
+
- Start with recommended tools
|
|
68
|
+
- Proceed systematically
|
|
69
|
+
|
|
70
|
+
## Claude Behavior Control (Failure Prevention)
|
|
71
|
+
|
|
72
|
+
### Auto-stop Triggers (Must Stop)
|
|
73
|
+
- **Detecting 5+ file changes**: Stop immediately, report impact to user
|
|
74
|
+
Reason: Large changes require advance planning and review
|
|
75
|
+
- **Same error occurs 3 times**: Root cause analysis mandatory
|
|
76
|
+
Reason: Need root solution, not symptomatic treatment
|
|
77
|
+
- **Detecting excessive unknown type usage**: Reconsider type guard design
|
|
78
|
+
Reason: High possibility of type safety design issues
|
|
79
|
+
- **After editing 3 files**: Force TodoWrite update (cannot use next Edit tool without update)
|
|
80
|
+
Reason: Need to confirm progress and direction
|
|
81
|
+
|
|
82
|
+
### Handling Error-fixing Impulse
|
|
83
|
+
1. Error discovered → **Pause**
|
|
84
|
+
2. Re-execute rule-advisor
|
|
85
|
+
3. Root cause analysis (repeat "why" 5 times to identify true cause)
|
|
86
|
+
4. Present action plan
|
|
87
|
+
5. Fix after user approval
|
|
88
|
+
|
|
89
|
+
### Escalation Criteria (User Confirmation Required)
|
|
90
|
+
- Architecture changes (adding new layers, changing responsibilities)
|
|
91
|
+
- Adding external dependencies (npm packages, external APIs)
|
|
92
|
+
- Breaking changes (changing existing APIs, data structures)
|
|
93
|
+
- Multiple implementation methods with unclear superiority
|
|
94
|
+
|
|
95
|
+
### Preventing Rule Ignoring When Focused
|
|
96
|
+
**Measurable Forced Stop Criteria**:
|
|
97
|
+
- **2nd consecutive error fix**: Automatically trigger rule-advisor re-execution
|
|
98
|
+
- **5 Edit tool uses**: Force impact report creation
|
|
99
|
+
- **3 edits to same file**: Force stop for refactoring consideration
|
|
100
|
+
|
|
101
|
+
### Temporary File Creation Rules
|
|
102
|
+
Use `tmp/` directory for work files. Delete upon completion.
|
package/CLAUDE.ja.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Claude Code 開発ルール
|
|
2
|
+
|
|
3
|
+
AI実行精度最大化のための中核ルール。全ての指示はこのファイルに従う。
|
|
4
|
+
|
|
5
|
+
## 🚨 最重要原則:調査OK、実装STOP
|
|
6
|
+
|
|
7
|
+
**すべてのEdit/Write/MultiEditツール使用前にユーザー承認が必須**
|
|
8
|
+
|
|
9
|
+
理由:ユーザーの意図と異なる実装を防ぎ、正しい方向性を確保するため
|
|
10
|
+
|
|
11
|
+
## 必須実行プロセス
|
|
12
|
+
|
|
13
|
+
### 実行フロー(必須手順)
|
|
14
|
+
1. **TodoWriteでタスク分解** → なければ実装ステップに進めない
|
|
15
|
+
理由:タスクを構造化し、進捗を追跡可能にするため
|
|
16
|
+
2. **rule-advisor実行** → タスクの本質を理解し適切なルールを選択
|
|
17
|
+
理由:適切なルールを選択し、タスクの本質を理解するため
|
|
18
|
+
3. **Edit/Write/MultiEdit使用** → ユーザー承認が必須
|
|
19
|
+
理由:最重要原則の実践(調査OK、実装STOP)
|
|
20
|
+
4. **実装実行** → 品質チェックエラーは完了条件を満たさない
|
|
21
|
+
理由:高品質なコードを保証するため
|
|
22
|
+
5. **ファイル数カウント** → 閾値超過で自動停止
|
|
23
|
+
理由:影響範囲が大きくなる前に確認を取るため
|
|
24
|
+
|
|
25
|
+
### TodoWriteとメタ認知の統合
|
|
26
|
+
**実行ルール**:
|
|
27
|
+
- `pending → in_progress`時: rule-advisorの出力が必須
|
|
28
|
+
- **rule-advisor実行後**: 必ずTodoWriteを以下の形式で更新
|
|
29
|
+
1. firstActionGuidanceをTodoの先頭タスクとして追加
|
|
30
|
+
2. taskEssenceを各タスクの完了判断基準として記録
|
|
31
|
+
3. warningPatternsを実行中の確認項目として記録
|
|
32
|
+
- TodoWriteなしでEditツール使用: ルール違反として停止
|
|
33
|
+
- 各タスクのステータス更新時: 実施内容の記録を必須化(空白不可)
|
|
34
|
+
|
|
35
|
+
### 実行前提条件
|
|
36
|
+
1. **rule-advisorエージェント実行(Taskツールで呼び出すこと)** → JSONレスポンスが存在すること
|
|
37
|
+
2. **TodoWriteのタスク** → in_progressステータスが存在すること
|
|
38
|
+
3. **ユーザー承認記録** → Edit/Write前に明示的承認があること
|
|
39
|
+
4. **品質チェック結果** → エラー0でなければ完了不可
|
|
40
|
+
|
|
41
|
+
### 必須の代替パターン
|
|
42
|
+
- **any型の代わり** → unknown型と型ガードを使用
|
|
43
|
+
理由:型安全性を確保し、実行時エラーを防止するため
|
|
44
|
+
- **Edit使用時** → 必ずTodoWriteでタスク管理を先行
|
|
45
|
+
理由:進捗追跡と品質保証を可能にするため
|
|
46
|
+
- **Edit/Write/MultiEdit使用時** → ユーザー承認を取得してから実行
|
|
47
|
+
理由:最重要原則(調査OK、実装STOP)を遵守するため
|
|
48
|
+
- **完了宣言時** → 品質チェックエラー0を確認してから宣言
|
|
49
|
+
理由:完全なコードのみをマージするため
|
|
50
|
+
|
|
51
|
+
## メタ認知実行(タスク開始時必須)
|
|
52
|
+
|
|
53
|
+
### rule-advisorから取得した情報でメタ認知
|
|
54
|
+
1. **taskEssence(タスクの本質)を理解**
|
|
55
|
+
- 表面的な作業内容と根本目的の区別
|
|
56
|
+
- 「quick fix」vs「proper solution」の判定
|
|
57
|
+
|
|
58
|
+
2. **applicableRules(適用ルール)を確認**
|
|
59
|
+
- 選択されたルールが適切か判断
|
|
60
|
+
- 必要なセクションを読み込む
|
|
61
|
+
|
|
62
|
+
3. **pastFailurePatterns(過去の失敗)を認識**
|
|
63
|
+
- 同じ失敗を繰り返さないよう注意
|
|
64
|
+
- 提示された回避策を意識
|
|
65
|
+
|
|
66
|
+
4. **firstAction(初動アクション)を実行**
|
|
67
|
+
- 推奨されたツールから開始
|
|
68
|
+
- 計画的に進める
|
|
69
|
+
|
|
70
|
+
## Claude行動制御(失敗防止)
|
|
71
|
+
|
|
72
|
+
### 自動停止トリガー(必ず停止)
|
|
73
|
+
- **5ファイル以上の変更検出**:即座停止、影響範囲をユーザーに報告
|
|
74
|
+
理由:大規模変更は事前計画とレビューが必要なため
|
|
75
|
+
- **同じエラー3回発生**:根本原因分析必須
|
|
76
|
+
理由:対症療法ではなく根本解決が必要なため
|
|
77
|
+
- **unknown型多用検出**:型ガード設計再検討
|
|
78
|
+
理由:型安全性の設計に問題がある可能性が高いため
|
|
79
|
+
- **3ファイル編集完了**: TodoWriteの更新を強制(更新しないと次のEditツール使用不可)
|
|
80
|
+
理由:進捗確認と方向性の再確認が必要なため
|
|
81
|
+
|
|
82
|
+
### エラー修正衝動対処
|
|
83
|
+
1. エラー発見 → **一時停止**
|
|
84
|
+
2. rule-advisor再実行
|
|
85
|
+
3. 根本原因分析(なぜ?を5回繰り返して真因を特定)
|
|
86
|
+
4. 対処計画提示
|
|
87
|
+
5. ユーザー承認後に修正
|
|
88
|
+
|
|
89
|
+
### エスカレーション基準(ユーザー確認必須)
|
|
90
|
+
- アーキテクチャ変更(新レイヤー追加、責務変更)
|
|
91
|
+
- 外部依存追加(npmパッケージ、外部API)
|
|
92
|
+
- 破壊的変更(既存APIの変更、データ構造の変更)
|
|
93
|
+
- 複数の実装方法があり優劣が判断できない場合
|
|
94
|
+
|
|
95
|
+
### 集中時のルール無視防止
|
|
96
|
+
**測定可能な強制停止基準**:
|
|
97
|
+
- **連続エラー修正2回目**: 自動的にrule-advisor再実行をトリガー
|
|
98
|
+
- **Editツール5回使用**: 影響範囲レポートの作成を強制
|
|
99
|
+
- **同一ファイル3回編集**: リファクタリング検討の強制停止
|
|
100
|
+
|
|
101
|
+
### 一時ファイル作成ルール
|
|
102
|
+
作業中ファイルは`tmp/`ディレクトリ使用。完了時削除。
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Claude Code 開発ルール
|
|
2
|
+
|
|
3
|
+
AI実行精度最大化のための中核ルール。全ての指示はこのファイルに従う。
|
|
4
|
+
|
|
5
|
+
## 🚨 最重要原則:調査OK、実装STOP
|
|
6
|
+
|
|
7
|
+
**すべてのEdit/Write/MultiEditツール使用前にユーザー承認が必須**
|
|
8
|
+
|
|
9
|
+
理由:ユーザーの意図と異なる実装を防ぎ、正しい方向性を確保するため
|
|
10
|
+
|
|
11
|
+
## 必須実行プロセス
|
|
12
|
+
|
|
13
|
+
### 実行フロー(必須手順)
|
|
14
|
+
1. **TodoWriteでタスク分解** → なければ実装ステップに進めない
|
|
15
|
+
理由:タスクを構造化し、進捗を追跡可能にするため
|
|
16
|
+
2. **rule-advisor実行** → タスクの本質を理解し適切なルールを選択
|
|
17
|
+
理由:適切なルールを選択し、タスクの本質を理解するため
|
|
18
|
+
3. **Edit/Write/MultiEdit使用** → ユーザー承認が必須
|
|
19
|
+
理由:最重要原則の実践(調査OK、実装STOP)
|
|
20
|
+
4. **実装実行** → 品質チェックエラーは完了条件を満たさない
|
|
21
|
+
理由:高品質なコードを保証するため
|
|
22
|
+
5. **ファイル数カウント** → 閾値超過で自動停止
|
|
23
|
+
理由:影響範囲が大きくなる前に確認を取るため
|
|
24
|
+
|
|
25
|
+
### TodoWriteとメタ認知の統合
|
|
26
|
+
**実行ルール**:
|
|
27
|
+
- `pending → in_progress`時: rule-advisorの出力が必須
|
|
28
|
+
- **rule-advisor実行後**: 必ずTodoWriteを更新(タスク内容・優先度・分解粒度の見直し)
|
|
29
|
+
- taskEssenceに基づいてタスク説明を具体化
|
|
30
|
+
- firstActionGuidanceを最初のタスクに反映
|
|
31
|
+
- warningPatternsを考慮してタスクを再構成
|
|
32
|
+
- TodoWriteなしでEditツール使用: ルール違反として停止
|
|
33
|
+
- 各タスクのステータス更新時: 実施内容の記録を必須化(空白不可)
|
|
34
|
+
|
|
35
|
+
### 実行前提条件
|
|
36
|
+
1. **rule-advisorの出力** → JSONレスポンスが存在すること
|
|
37
|
+
2. **TodoWriteのタスク** → in_progressステータスが存在すること
|
|
38
|
+
3. **ユーザー承認記録** → Edit/Write前に明示的承認があること
|
|
39
|
+
4. **品質チェック結果** → エラー0でなければ完了不可
|
|
40
|
+
|
|
41
|
+
### 禁止事項
|
|
42
|
+
- **any型使用** → 型チェックエラーの原因
|
|
43
|
+
理由:型安全性を破壊し、実行時エラーを引き起こすため
|
|
44
|
+
- **TodoWriteなしのEdit使用** → ルール違反
|
|
45
|
+
理由:タスク管理なしでは進捗追跡と品質保証ができないため
|
|
46
|
+
- **承認なしEdit/Write/MultiEdit** → 承認待ちに移行
|
|
47
|
+
理由:最重要原則(調査OK、実装STOP)の違反を防ぐため
|
|
48
|
+
- **品質エラー残存での完了宣言** → 完了条件を満たさない
|
|
49
|
+
理由:不完全なコードの混入を防ぐため
|
|
50
|
+
|
|
51
|
+
## メタ認知実行(タスク開始時必須)
|
|
52
|
+
|
|
53
|
+
### rule-advisorから取得した情報でメタ認知
|
|
54
|
+
1. **taskEssence(タスクの本質)を理解**
|
|
55
|
+
- 表面的な作業内容と根本目的の区別
|
|
56
|
+
- 「quick fix」vs「proper solution」の判定
|
|
57
|
+
|
|
58
|
+
2. **applicableRules(適用ルール)を確認**
|
|
59
|
+
- 選択されたルールが適切か判断
|
|
60
|
+
- 必要なセクションを読み込む
|
|
61
|
+
|
|
62
|
+
3. **pastFailurePatterns(過去の失敗)を認識**
|
|
63
|
+
- 同じ失敗を繰り返さないよう注意
|
|
64
|
+
- 提示された回避策を意識
|
|
65
|
+
|
|
66
|
+
4. **firstAction(初動アクション)を実行**
|
|
67
|
+
- 推奨されたツールから開始
|
|
68
|
+
- 計画的に進める
|
|
69
|
+
|
|
70
|
+
## Claude行動制御(失敗防止)
|
|
71
|
+
|
|
72
|
+
### 自動停止トリガー(必ず停止)
|
|
73
|
+
- **5ファイル以上の変更検出**:即座停止、影響範囲をユーザーに報告
|
|
74
|
+
理由:大規模変更は事前計画とレビューが必要なため
|
|
75
|
+
- **同じエラー3回発生**:根本原因分析必須
|
|
76
|
+
理由:対症療法ではなく根本解決が必要なため
|
|
77
|
+
- **unknown型多用検出**:型ガード設計再検討
|
|
78
|
+
理由:型安全性の設計に問題がある可能性が高いため
|
|
79
|
+
- **3ファイル編集完了**: TodoWriteの更新を強制(更新しないと次のEditツール使用不可)
|
|
80
|
+
理由:進捗確認と方向性の再確認が必要なため
|
|
81
|
+
|
|
82
|
+
### エラー修正衝動対処
|
|
83
|
+
1. エラー発見 → **一時停止**
|
|
84
|
+
2. rule-advisor再実行
|
|
85
|
+
3. 根本原因分析(なぜ?を5回繰り返して真因を特定)
|
|
86
|
+
4. 対処計画提示
|
|
87
|
+
5. ユーザー承認後に修正
|
|
88
|
+
|
|
89
|
+
### エスカレーション基準(ユーザー確認必須)
|
|
90
|
+
- アーキテクチャ変更(新レイヤー追加、責務変更)
|
|
91
|
+
- 外部依存追加(npmパッケージ、外部API)
|
|
92
|
+
- 破壊的変更(既存APIの変更、データ構造の変更)
|
|
93
|
+
- 複数の実装方法があり優劣が判断できない場合
|
|
94
|
+
|
|
95
|
+
### 集中時のルール無視防止
|
|
96
|
+
**測定可能な強制停止基準**:
|
|
97
|
+
- **連続エラー修正2回目**: 自動的にrule-advisor再実行をトリガー
|
|
98
|
+
- **Editツール5回使用**: 影響範囲レポートの作成を強制
|
|
99
|
+
- **同一ファイル3回編集**: リファクタリング検討の強制停止
|
|
100
|
+
|
|
101
|
+
### 一時ファイル作成ルール
|
|
102
|
+
作業中ファイルは`tmp/`ディレクトリ使用。完了時削除。
|
|
103
|
+
|
|
104
|
+
### 専門エージェント積極活用(PROACTIVELY)
|
|
105
|
+
- **品質関連キーワード検出時**: プロジェクトタイプに応じたquality-fixer必須実行
|
|
106
|
+
- **Backend**: quality-fixer使用
|
|
107
|
+
- **Frontend**: quality-fixer-frontend使用(Lighthouse、Bundle size対応)
|
|
108
|
+
- 型エラー、ビルドエラー、lintエラー、フォーマット警告
|
|
109
|
+
- テスト失敗、品質チェック、検証タスク
|
|
110
|
+
- **タスク開始時**: rule-advisor必須実行
|
|
111
|
+
- TodoWrite作成前に実行し、結果を反映
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Shinsuke Kagawa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|