feat(v1.0): MCP Tools & Prompts#1
Merged
Merged
Conversation
v0.5 の読み取り専用 Resources に加え、書き込み系 Tools 3 種と Prompts 4 種を追加。 CLI を叩かずに Claude Code セッション内で cogsync の状態変更が完結するようになる。 Tools: - set_phase: design/implement/review/break のフェーズ切替 - get_recommended_action: advise() ルールベースで推奨アクションを返す - create_handoff: 構造化ハンドオフ・プロンプト生成 Prompts: - handoff/standard: 標準ハンドオフテンプレ - handoff/cross-model: モデル間引継ぎテンプレ - coach/phase-design-start: 設計フェーズ開始ガイド - coach/before-take-break: ブレイク前チェックリスト Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
akihidem
added a commit
that referenced
this pull request
May 11, 2026
なぜ: - v1.0 機能 (MCP Tools/Prompts) が main 取り込み済みになり、配布できる段階に入った。 - これまで private 前提だった metadata と CLI エントリを公開向けに揃え、npm + GitHub public へ昇格できる状態を作る。 何を: - package.json: `private` 解除、`repository`/`bugs`/`homepage`/`keywords`/`author`/`license`/`files`/`prepublishOnly` 追加。 - bin/cogsync.js: `tsx/esm` の tsImport で src/index.ts を直接起動するラッパー (`#!/usr/bin/env node`)。tsx を runtime 依存へ昇格。 - README: 公開向けに再構成(Install / Quickstart / MCP 登録 / Commands / 開発手順)。private 表記削除。 - CHANGELOG.md: Keep a Changelog 形式で v0.1〜v1.0 を記録。 - .github/workflows/ci.yml: Node 20/22 で typecheck + test。 - src/index.ts: `--version` を 1.0.0-alpha.0 に同期。 設計判断: - ビルドステップ追加は α 中は避け、`tsx/esm` の tsImport API で `.ts` を直接実行する形を採用。配布物に src/ を含めて size 45.8kB に収まる。 - 公開直後は `--tag alpha` での publish を想定(npm install -g cogsync-cli@alpha)。stable は実利用フィードバック後。 スコープ外: - 安定版(1.0.0)昇格・stable npm publish。 - repo public 化・GitHub Release(PR マージ後の別作業)。 検証方法: - npm run typecheck: pass - npm test: 10/10 pass - node bin/cogsync.js --help / --version: 正常起動 - npm pack --dry-run: 32 files / 45.8kB、bin・src・LICENSE 同梱を確認 依存: - 既存 main (PR #1 マージ済み) Co-authored-by: akihidem <akihidem@gmail.com>
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.
なぜ
v0.5 の MCP は Resources(読み取り専用)のみだった。phase set 等の書き込みは CLI 経由でしかできず、Claude Code セッションの中断が必要だった。v1.0 で MCP Tools を追加し、AI セッション内で状態変更も完結させる。
何を
Tools 3 種:
set_phase— design/implement/review/break のフェーズ切替get_recommended_action— advise() ルールベースで推奨アクション判定create_handoff— 構造化ハンドオフ・プロンプト生成Prompts 4 種:
handoff/standard— 標準ハンドオフテンプレhandoff/cross-model— モデル間引継ぎテンプレcoach/phase-design-start— 設計フェーズ開始ガイドcoach/before-take-break— ブレイク前チェックリスト設計判断
src/mcp/tools.ts、Prompts はsrc/mcp/prompts.tsに分離し、server.ts は初期化と登録呼び出しに専念get_recommended_actionは watch.ts の tick() と同じ advise() を使うが、MCP はスナップショット取得なので watch 側の dedup/cooldown/通知は不要。buildAdviseInput() ヘルパーで状態を集約スコープ外
検証方法
tsc --noEmit型チェック通過cogsync mcpで stdio 起動、クラッシュなし/mcpreconnect で 3 Tools が認識されるset_phase: design → implement 切替成功get_recommended_action: snowball 233k/150k 検出 → create_handoff 推奨(confidence 0.9)create_handoff: 構造化ハンドオフ + Markdown テキスト生成成功依存
🤖 Generated with Claude Code