Skip to content

refactor(orchestrator): resolve tq command from build profile - #316

Merged
version-1 merged 2 commits into
mainfrom
worktrees/1-refactor-tq-command-profile
Aug 15, 2026
Merged

refactor(orchestrator): resolve tq command from build profile#316
version-1 merged 2 commits into
mainfrom
worktrees/1-refactor-tq-command-profile

Conversation

@version-1

Copy link
Copy Markdown
Owner

Resolve the Tasq CLI command from the build profile

Summary

Replace the TQ_EXECUTABLE managed-copy contract with a build-profile-based tq / tqdev command contract. The selected command must be available on PATH, and development prompts explicitly explain how to reinterpret tasq-cli examples.

主な変更点:

  • Resolve the production command as tq and the development command as tqdev; reject unsupported profiles.
  • Validate the selected command before tq service start launches services and again when the Orchestrator starts.
  • Inject tqdev and tasq-cli reinterpretation guidance into initial, resumed, and continuation prompts.

やったこと

  • Removed TQ_EXECUTABLE propagation and managed CLI copying while preserving TQ_MANAGED_RUN.
  • Passed the resolved command through the dispatcher into runner tasks.
  • Added unit coverage for profile resolution, PATH failure, prompt rendering, continuation guidance, and dispatcher propagation.
  • Updated the English and Japanese prompt, workflow-contract, and Makefile reference documentation.
  • Embedded the dev build profile in the development Orchestrator binary.

動作確認

  • go test ./...
  • git diff --check
  • npm run build in cmd/web/frontend

レビュー & 動作確認 チェックリスト

  • Build profile mapping - Confirm production resolves tq, development resolves tqdev, and unsupported profiles fail.
  • Startup contract - Confirm both service startup and standalone Orchestrator startup reject a missing command on PATH.
  • Prompt behavior - Confirm development guidance is present on initial/resumed/continuation turns and omitted from an initial turn when tasq.task_work_prompt is false.
  • Environment migration - Confirm legacy TQ_EXECUTABLE values are stripped and TQ_MANAGED_RUN remains available.

推奨テスト計画:

  1. Run go test ./... with the frontend assets generated.
  2. Build production and development binaries and verify tq service start resolves the expected command from PATH.
  3. Inspect a development agent prompt and confirm commands and tasq-cli guidance use tqdev.

その他気になることや相談ごと

Existing $TQ_HOME/system/bin/tq-managed files are intentionally left in place but are no longer created or referenced.

Remove the TQ_EXECUTABLE managed-copy contract and require the profile-specific tq or tqdev command on PATH. Inject tqdev reinterpretation guidance into agent prompts and document the updated startup contract.\n\nVerified with: go test ./...
Add a test-local tq executable to PATH so the migration preflight test reaches its intended failure after the new command availability check.\n\nVerified with: go test ./internal/cli/tq; go test ./...
@version-1
version-1 merged commit 2bdbcba into main Aug 15, 2026
5 checks passed
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.

1 participant