Skip to content

feat: プロジェクト/グローバル config による piece quality_gates オーバーライド #382

@nrslib

Description

@nrslib

背景

quality_gates は現在ピースYAMLのムーブメント定義でしか指定できない。しかし npm run test:e2e のようなプロジェクト固有の検証要件は builtin ピースに埋め込むべきではない。

実例: default-test-first-mini ピースで TAKT 本体を開発した際、implement/supervise が npm run test:e2e を実行せず CI が失敗した。

提案

プロジェクト config (.takt/config.yaml) およびグローバル config (~/.takt/config.yaml) で quality_gates をオーバーライドできるようにする。

解決順(優先度高→低)

  1. プロジェクト .takt/config.yamlpiece_overrides
  2. グローバル ~/.takt/config.yamlpiece_overrides
  3. ピースYAML のムーブメント定義

設定例

# .takt/config.yaml
piece_overrides:
  quality_gates:
    - E2Eテスト(npm run test:e2e)が全てパスすること

ムーブメント名指定も検討:

piece_overrides:
  movements:
    implement:
      quality_gates:
        - E2Eテスト(npm run test:e2e)が全てパスすること
    supervise:
      quality_gates:
        - npm run test:e2e が全てパスしていること

マージ戦略

  • quality_gates追加マージ(ピースYAML の gates + config の gates)
  • 全ムーブメント共通指定とムーブメント名指定の両方をサポート
  • 適用対象を edit: true のムーブメントのみに限定するオプションも検討

関連

  • src/infra/config/loaders/pieceParser.ts — 現在の quality_gates パース
  • src/core/piece/instruction/InstructionBuilder.ts — quality_gates インジェクション
  • src/infra/config/project/projectConfig.ts — プロジェクト config
  • src/infra/config/global/globalConfig.ts — グローバル config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions