Release v0.8.0-alpha.1#129
Merged
Merged
Conversation
エージェントが c89ac4c で追加した force-add により、worktree 実行時に .takt/reports/ がコミットに含まれてしまう問題を修正。 .takt/ は .gitignore で除外済みのため force-add は不要。
git add -f .takt/reports/ リグレッション (c89ac4c) の再発防止テスト
デフォルトをローマ字化(高速)に変更し、AI生成が必要な場合は config.yaml で branchNameStrategy: ai を設定可能にした。これによりブランチ名生成の待ち時間を削減し、LLMコストも削減できる。 また、coder エージェントに「根本原因修正後の安全機構迂回は禁止」ルールを追加した。
# Conflicts: # src/features/tasks/add/index.ts
## 概要 既存のスタンス/インストラクションに埋め込まれているフロントエンド・バックエンド等の専門知識をknowledgeファイルとして抽出し、抽出元に適切に付与する。 --- ## タスク ### 1. 専門知識の抽出(優先度: 高) 既存のスタンス・インストラクションファイルをレビューし、以下の専門知識を特定・抽出: - **フロントエンド知識**(React、CSS、UI/UXなど) - **バックエンド知識**(API設計、DB、サーバーサイドなど) - **その他の専門知識**(発見したもの) 抽出した知識をknowledgeファイルとして作成する。 ### 2. 抽出元への付与(優先度: 高) 抽出した知識を、元々その知識を使用していたスタンス/インストラクションに付与設定する。 - 抽出元 = 付与先 --- ## 確認方法 - 抽出後、元のスタンス/インストラクションから専門知識が分離されていること - 抽出元にknowledgeが正しく付与設定されていること
## 概要
`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` が正常動作すること
…acts 5つの関心を Persona, Policy, Instruction, Knowledge, Output Contract に統一。 ディレクトリ、YAMLキー、ソースコード、テンプレート、テスト、ドキュメントを全面更新。
- ペルソナテンプレート (expert/character) から「ドメイン知識」セクションを削除 - templates/reports/ → templates/output-contracts/ にリネーム - knowledge テンプレートを追加 - Policy を Instructions の後ろに移動(recency効果で制約遵守を強化) - Policy Reminder(上下二重配置)を廃止し、末尾の1箇所に統一 - ドキュメント (prompt-composition.ja/en) にファセット典型例と合成プロンプト例を追加
- ピース例・カスタムピース例にセクションマップ(personas/policies/knowledge)を追加 - agent: → persona: に全面置換、ディレクトリ構造も agents/ → personas/ に更新 - dist/resources/ → builtins/ に修正 - 「TAKTが制御・管理するもの」セクションを追加(制御: ルーティング・権限・記録、管理: ペルソナ・ポリシー・ナレッジ) - ドキュメントファイル名を prompt-composition → faceted-prompting にリネーム - Faceted Prompting ドキュメントの Policy 配置とエンジン説明を修正 - クローン作成時の進捗ログを追加
## 概要
仕様ドキュメント `/Users/m_naruse/work/git/takt/task_planning/output-contracts-and-quality-gates.md` に基づき、YAML構造の変更を実装する。
---
## タスク一覧
### 【高】トップレベル構造の変更
- 現在の `output_contracts` を `report_formats` にリネーム
- レポートテンプレート定義として機能させる
### 【高】Movement内の output_contracts 構造変更
- 各 movement の `output_contracts` が直接レポート配列を持つ構造に変更
- `output_contracts.report` の `report` キーを廃止
**変更後の構造:**
```yaml
report_formats: # トップレベル(テンプレート定義)
plan: ...
movements:
- name: plan
output_contracts: # 直接配列(reportキー不要)
- name: 00-plan.md
format: plan
```
### 【中】quality_gates の実装
- エージェントへの通達として機能させる(自動検証は将来実装)
- Movement完了時にエージェントが参照できる形式で定義
---
## 制約(ユーザー明示)
- 後方互換性は不要
---
## 確認方法
- 既存のピース定義YAMLが新構造でパースできること
- テストが通ること
Output Contracts を report 配下のネスト構造に変更し、Quality Gates をスキーマ・パーサーに追加。 未使用コード検出ポリシーから公開API例外ルールを削除し、AIが未使用コードを許容する抜け道を塞ぐ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Added
personas/,policies/,knowledge/,instructions/,output-contracts/Changed
resources/global/→builtins/リネームagent→personaリネーム(YAML・型・ディレクトリ全て)report→output_contractsに変更stances→policies、report_formats→output_contractsリネームFixed
Commits