## 概要
`resources/` ディレクトリを `builtins/` にリネームし、用途を明確化。同時に export-cc コマンドを拡張して全リソースをコピーするように修正する。
---
## タスク一覧
### 1. ディレクトリリネーム(優先度: 高)
| 変更前 | 変更後 |
|--------|--------|
| `resources/` | `builtins/` |
| `resources/global/{lang}/` | `builtins/{lang}/`(global/ 階層を除去) |
| `resources/project/` | `builtins/project/` |
| `resources/skill/` | `builtins/skill/` |
### 2. 不要ファイル削除(優先度: 高)
- `builtins/{lang}/prompts/` を削除
- 対象: `interactive-system.md`, `interactive-summary.md`
- 理由: コードから未参照、実体は `src/shared/prompts/`
### 3. コード修正 — パス参照(優先度: 高)
`resources` → `builtins`、`global/{lang}` → `{lang}` に更新:
| ファイル | 修正内容 |
|----------|----------|
| `src/infra/resources/index.ts` | `getResourcesDir()`, `getGlobalResourcesDir()`, `getLanguageResourcesDir()` 等のパス |
| `src/infra/config/paths.ts` | `getBuiltinPiecesDir()`, `getBuiltinPersonasDir()` |
| `src/infra/config/global/initialization.ts` | `copyLanguageConfigYaml()` |
| `src/infra/config/loaders/pieceCategories.ts` | `getLanguageResourcesDir()` 参照 |
| `src/features/config/ejectBuiltin.ts` | `getLanguageResourcesDir()` 参照 |
| `src/features/config/deploySkill.ts` | `getResourcesDir()` 参照 |
### 4. export-cc 修正(優先度: 高)
ファイル: `src/features/config/deploySkill.ts`
**現状**: pieces/ と personas/ のみコピー
**修正後**:
- `builtins/{lang}/` 全体を `~/.claude/skills/takt/` にコピー
- `skill/` のファイル(SKILL.md, references/, takt-command.md)は従来通り
- サマリー表示を新リソースタイプ(stances, instructions, knowledge 等)に対応
- confirm メッセージ修正:
- 現状: `'上書きしますか?'`
- 修正後: `'既存のスキルファイルをすべて削除し、最新版に置き換えます。続行しますか?'`
### 5. テスト修正(優先度: 中)
| ファイル | 修正内容 |
|----------|----------|
| `src/__tests__/initialization.test.ts` | `getLanguageResourcesDir` のパス期待値 |
| `src/__tests__/piece-category-config.test.ts` | mock パス |
| その他 `resources` パスを参照しているテスト | パス更新 |
### 6. ビルド・パッケージ設定(優先度: 中)
| ファイル | 修正内容 |
|----------|----------|
| `package.json` | `files` フィールドで `resources/` → `builtins/` |
| `tsconfig.json` | `resources/` への参照があれば更新 |
| `.gitignore` | 必要に応じて更新 |
### 7. ドキュメント(優先度: 低)
- `CLAUDE.md` の Directory Structure セクションを更新
- JSDoc コメントから `prompts/` 記述を削除
---
## 制約
- `builtins/{lang}/` のフラット構造は変更不可(ピースYAML内の相対パス依存)
- eject のセーフティ(skip-if-exists)は変更不要
- export-cc のセーフティ(SKILL.md 存在チェック + confirm)は維持
---
## 確認方法
- `npm run build` が成功すること
- `npm test` が全てパスすること
- `takt init` / `takt eject` / `takt export-cc` が正常動作すること
221 lines
5.8 KiB
YAML
221 lines
5.8 KiB
YAML
# Review-Fix Minimal TAKT Piece
|
|
# Review -> Fix (if needed) -> Re-review -> Complete
|
|
# (レビューから開始、実装ムーブメントなし)
|
|
#
|
|
# Template Variables (auto-injected):
|
|
# {iteration} - Piece-wide turn count (total movements executed across all agents)
|
|
# {max_iterations} - Maximum iterations allowed for the piece
|
|
# {movement_iteration} - Per-movement iteration count (how many times THIS movement has been executed)
|
|
# {task} - Original user request (auto-injected)
|
|
# {previous_response} - Output from the previous movement (auto-injected)
|
|
# {user_inputs} - Accumulated user inputs during piece (auto-injected)
|
|
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
|
|
|
|
name: review-fix-minimal
|
|
description: 既存コードのレビューと修正ピース(レビュー開始、実装なし)
|
|
|
|
max_iterations: 20
|
|
|
|
stances:
|
|
coding: ../stances/coding.md
|
|
review: ../stances/review.md
|
|
testing: ../stances/testing.md
|
|
|
|
personas:
|
|
coder: ../personas/coder.md
|
|
ai-antipattern-reviewer: ../personas/ai-antipattern-reviewer.md
|
|
supervisor: ../personas/supervisor.md
|
|
|
|
instructions:
|
|
implement: ../instructions/implement.md
|
|
review-ai: ../instructions/review-ai.md
|
|
ai-fix: ../instructions/ai-fix.md
|
|
supervise: ../instructions/supervise.md
|
|
fix-supervisor: ../instructions/fix-supervisor.md
|
|
|
|
report_formats:
|
|
ai-review: ../report-formats/ai-review.md
|
|
|
|
initial_movement: reviewers
|
|
|
|
movements:
|
|
- name: implement
|
|
edit: true
|
|
persona: coder
|
|
stance:
|
|
- coding
|
|
- testing
|
|
report:
|
|
- Scope: 01-coder-scope.md
|
|
- Decisions: 02-coder-decisions.md
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
instruction: implement
|
|
rules:
|
|
- condition: 実装が完了した
|
|
next: reviewers
|
|
- condition: 実装を進行できない
|
|
next: ABORT
|
|
- condition: ユーザーへの確認事項があるためユーザー入力が必要
|
|
next: implement
|
|
requires_user_input: true
|
|
interactive_only: true
|
|
|
|
- name: reviewers
|
|
parallel:
|
|
- name: ai_review
|
|
edit: false
|
|
persona: ai-antipattern-reviewer
|
|
stance: review
|
|
report:
|
|
name: 03-ai-review.md
|
|
format: ai-review
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: review-ai
|
|
rules:
|
|
- condition: "AI特有の問題なし"
|
|
- condition: "AI特有の問題あり"
|
|
|
|
- name: supervise
|
|
edit: false
|
|
persona: supervisor
|
|
stance: review
|
|
report:
|
|
- Validation: 05-supervisor-validation.md
|
|
- Summary: summary.md
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
instruction: supervise
|
|
rules:
|
|
- condition: "すべて問題なし"
|
|
- condition: "要求未達成、テスト失敗、ビルドエラー"
|
|
|
|
rules:
|
|
- condition: all("AI特有の問題なし", "すべて問題なし")
|
|
next: COMPLETE
|
|
- condition: all("AI特有の問題あり", "要求未達成、テスト失敗、ビルドエラー")
|
|
next: fix_both
|
|
- condition: any("AI特有の問題あり")
|
|
next: ai_fix
|
|
- condition: any("要求未達成、テスト失敗、ビルドエラー")
|
|
next: supervise_fix
|
|
|
|
- name: fix_both
|
|
parallel:
|
|
- name: ai_fix_parallel
|
|
edit: true
|
|
persona: coder
|
|
stance:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: AI問題の修正完了
|
|
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
|
- condition: 判断できない、情報不足
|
|
instruction: ai-fix
|
|
|
|
- name: supervise_fix_parallel
|
|
edit: true
|
|
persona: coder
|
|
stance:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: 監督者の指摘に対する修正が完了した
|
|
- condition: 修正を進行できない
|
|
instruction: fix-supervisor
|
|
|
|
rules:
|
|
- condition: all("AI問題の修正完了", "監督者の指摘に対する修正が完了した")
|
|
next: reviewers
|
|
- condition: any("修正不要(指摘対象ファイル/仕様の確認済み)", "判断できない、情報不足", "修正を進行できない")
|
|
next: implement
|
|
|
|
- name: ai_fix
|
|
edit: true
|
|
persona: coder
|
|
stance:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: AI問題の修正完了
|
|
next: reviewers
|
|
- condition: 修正不要(指摘対象ファイル/仕様の確認済み)
|
|
next: implement
|
|
- condition: 判断できない、情報不足
|
|
next: implement
|
|
instruction: ai-fix
|
|
|
|
- name: supervise_fix
|
|
edit: true
|
|
persona: coder
|
|
stance:
|
|
- coding
|
|
- testing
|
|
allowed_tools:
|
|
- Read
|
|
- Glob
|
|
- Grep
|
|
- Edit
|
|
- Write
|
|
- Bash
|
|
- WebSearch
|
|
- WebFetch
|
|
permission_mode: edit
|
|
rules:
|
|
- condition: 監督者の指摘に対する修正が完了した
|
|
next: reviewers
|
|
- condition: 修正を進行できない
|
|
next: implement
|
|
instruction: fix-supervisor
|