Skip to content

[#587] allow-git-commit-option#588

Closed
aozame-dev wants to merge 1 commit intonrslib:mainfrom
aozame-dev:takt/587/tasuku-piecemovement-ni-allow
Closed

[#587] allow-git-commit-option#588
aozame-dev wants to merge 1 commit intonrslib:mainfrom
aozame-dev:takt/587/tasuku-piecemovement-ni-allow

Conversation

@aozame-dev
Copy link
Copy Markdown

Summary

概要

現在、すべてのムーブメントに対して git add / git commit / git push の禁止がテンプレート .md にハードコードされている。大量の issue を1つのタスクで消化するワークフローなど、作業単位ごとに git commit したいユースケースに対応するため、ムーブメント単位でこの制約をオプトインで解除できるようにする。

変更内容

  • PieceMovementallow_git_commit: boolean(デフォルト false)を追加
  • allow_git_commit: true の場合、git add / git commit / git push 禁止セクションを注入しない
  • git 禁止テキストをテンプレート .md からハードコード除去し、buildGitCommitRule() で条件付き注入する方式に変更(buildEditRule() と同様のパターン)

変更ファイル

種別 ファイル 概要
スキーマ src/core/models/workflow-schemas.ts PieceMovementRawSchema / ParallelSubMovementRawSchemaallow_git_commit 追加
src/core/models/piece-types.ts PieceMovementallowGitCommit: boolean 追加
パーサー src/infra/config/loaders/pieceParser.ts allow_git_commitallowGitCommit マッピング追加
ロジック src/core/piece/instruction/instruction-context.ts buildGitCommitRule() 関数を追加
ロジック src/core/piece/instruction/InstructionBuilder.ts Phase 1 テンプレートに gitCommitRule 変数を注入
ロジック src/core/piece/instruction/ReportInstructionBuilder.ts Phase 2 テンプレートに gitCommitRule 変数を注入
テンプレート src/shared/prompts/{en,ja}/perform_phase1_message.md ハードコード → {{#if gitCommitRule}} 条件ブロック
テンプレート src/shared/prompts/{en,ja}/perform_phase2_message.md 同上
型整合 src/core/piece/engine/PieceEngine.ts ループジャッジ合成ムーブメントに allowGitCommit: false 追加
型整合 src/core/piece/engine/team-leader-common.ts パートムーブメントに親の allowGitCommit を引継ぎ
テスト src/__tests__/instruction-context.test.ts buildGitCommitRule ユニットテスト 9 件追加
テスト src/__tests__/instructionBuilder.test.ts Phase 1 / Phase 2 統合テスト 10 件追加
テスト src/__tests__/instruction-template-removal.test.ts スキーマ / パーサー結合テスト 8 件追加
テスト src/__tests__/prompts.test.ts テンプレート整合性テスト更新

ピースYAMLでの使用例

movements:
  - name: implement-and-commit
    allow_git_commit: true
    persona: coder
    edit: true
    instruction: |
      各issueの修正後に git add && git commit してください。

Execution Report

Workflow takt-default completed successfully.

Closes #587

@aozame-dev aozame-dev closed this Apr 7, 2026
@aozame-dev aozame-dev deleted the takt/587/tasuku-piecemovement-ni-allow branch April 7, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: PieceMovement に allow_git_commit オプションを追加し、ムーブメント単位で git 操作禁止を解除可能にする

1 participant