agenttakt 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. agenttakt-0.1.0/.claude/settings.json +7 -0
  2. agenttakt-0.1.0/.editorconfig +18 -0
  3. agenttakt-0.1.0/.gitattributes +23 -0
  4. agenttakt-0.1.0/.github/CODEOWNERS +7 -0
  5. agenttakt-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
  6. agenttakt-0.1.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
  7. agenttakt-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
  8. agenttakt-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +25 -0
  9. agenttakt-0.1.0/.github/dependabot.yml +37 -0
  10. agenttakt-0.1.0/.github/release.yml +35 -0
  11. agenttakt-0.1.0/.github/workflows/ci.yml.example +63 -0
  12. agenttakt-0.1.0/.github/workflows/claude-code-review.yml +44 -0
  13. agenttakt-0.1.0/.github/workflows/claude.yml +57 -0
  14. agenttakt-0.1.0/.github/workflows/release.yml +44 -0
  15. agenttakt-0.1.0/.github/workflows/stale.yml +34 -0
  16. agenttakt-0.1.0/.gitignore +59 -0
  17. agenttakt-0.1.0/CLAUDE.md +68 -0
  18. agenttakt-0.1.0/LICENSE +21 -0
  19. agenttakt-0.1.0/PKG-INFO +170 -0
  20. agenttakt-0.1.0/README.md +142 -0
  21. agenttakt-0.1.0/docs/architecture.md +72 -0
  22. agenttakt-0.1.0/docs/protocol.md +80 -0
  23. agenttakt-0.1.0/docs/schema.md +98 -0
  24. agenttakt-0.1.0/examples/sample_plan.json +43 -0
  25. agenttakt-0.1.0/pyproject.toml +56 -0
  26. agenttakt-0.1.0/src/agenttakt/__init__.py +1 -0
  27. agenttakt-0.1.0/src/agenttakt/bridge/__init__.py +0 -0
  28. agenttakt-0.1.0/src/agenttakt/bridge/client.py +50 -0
  29. agenttakt-0.1.0/src/agenttakt/bridge/paths.py +24 -0
  30. agenttakt-0.1.0/src/agenttakt/bridge/protocol.py +58 -0
  31. agenttakt-0.1.0/src/agenttakt/bridge/server.py +129 -0
  32. agenttakt-0.1.0/src/agenttakt/cli.py +54 -0
  33. agenttakt-0.1.0/src/agenttakt/models/__init__.py +4 -0
  34. agenttakt-0.1.0/src/agenttakt/models/layout.py +39 -0
  35. agenttakt-0.1.0/src/agenttakt/models/plan.py +118 -0
  36. agenttakt-0.1.0/src/agenttakt/server/__init__.py +0 -0
  37. agenttakt-0.1.0/src/agenttakt/server/mcp_server.py +71 -0
  38. agenttakt-0.1.0/src/agenttakt/tui/__init__.py +0 -0
  39. agenttakt-0.1.0/src/agenttakt/tui/app.py +159 -0
  40. agenttakt-0.1.0/src/agenttakt/tui/geometry.py +90 -0
  41. agenttakt-0.1.0/src/agenttakt/tui/screens/__init__.py +0 -0
  42. agenttakt-0.1.0/src/agenttakt/tui/screens/editor.py +351 -0
  43. agenttakt-0.1.0/src/agenttakt/tui/screens/help.py +41 -0
  44. agenttakt-0.1.0/src/agenttakt/tui/screens/idle.py +48 -0
  45. agenttakt-0.1.0/src/agenttakt/tui/screens/modals.py +51 -0
  46. agenttakt-0.1.0/src/agenttakt/tui/styles.tcss +114 -0
  47. agenttakt-0.1.0/src/agenttakt/tui/widgets/__init__.py +0 -0
  48. agenttakt-0.1.0/src/agenttakt/tui/widgets/edge_layer.py +197 -0
  49. agenttakt-0.1.0/src/agenttakt/tui/widgets/node.py +148 -0
  50. agenttakt-0.1.0/src/agenttakt/tui/widgets/param_panel.py +124 -0
  51. agenttakt-0.1.0/src/agenttakt/tui/widgets/renderers.py +148 -0
  52. agenttakt-0.1.0/tasks/.gitkeep +0 -0
  53. agenttakt-0.1.0/tasks/lessons.md +28 -0
  54. agenttakt-0.1.0/tests/conftest.py +19 -0
  55. agenttakt-0.1.0/tests/test_bridge.py +116 -0
  56. agenttakt-0.1.0/tests/test_mcp_e2e.py +86 -0
  57. agenttakt-0.1.0/tests/test_models.py +131 -0
  58. agenttakt-0.1.0/tests/test_protocol.py +45 -0
  59. agenttakt-0.1.0/tests/test_renderers.py +52 -0
  60. agenttakt-0.1.0/tests/tui/__snapshots__/test_editor/test_editor_snapshot.raw +195 -0
  61. agenttakt-0.1.0/tests/tui/test_editor.py +26 -0
  62. agenttakt-0.1.0/tests/tui/test_interactions.py +298 -0
  63. agenttakt-0.1.0/tests/tui/test_standalone.py +81 -0
  64. agenttakt-0.1.0/uv.lock +2082 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "permissions": {
4
+ "allow": [],
5
+ "deny": []
6
+ }
7
+ }
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
13
+
14
+ [Makefile]
15
+ indent_style = tab
16
+
17
+ [*.{py,go}]
18
+ indent_size = 4
@@ -0,0 +1,23 @@
1
+ # 改行コードを LF に正規化(Windows / macOS / Linux 間のトラブル予防)
2
+ * text=auto eol=lf
3
+
4
+ # シェルスクリプトは LF 固定
5
+ *.sh text eol=lf
6
+
7
+ # Windows バッチは CRLF 固定
8
+ *.bat text eol=crlf
9
+ *.cmd text eol=crlf
10
+
11
+ # バイナリ判定(diff 抑制)
12
+ *.png binary
13
+ *.jpg binary
14
+ *.jpeg binary
15
+ *.gif binary
16
+ *.ico binary
17
+ *.webp binary
18
+ *.pdf binary
19
+ *.zip binary
20
+ *.gz binary
21
+ *.tar binary
22
+ *.mp4 binary
23
+ *.mov binary
@@ -0,0 +1,7 @@
1
+ # CODEOWNERS
2
+ #
3
+ # PR レビュー自動割り当て用。リポジトリ全体のオーナーを ryoohshima としている。
4
+ # 必要に応じてパス毎の所有者を追加すること(例: /docs/ @doc-team)。
5
+ # https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
6
+
7
+ * @ryoohshima
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: バグ報告
3
+ about: バグの報告
4
+ title: "[Bug] "
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## 概要
10
+
11
+ <!-- どのような不具合か簡潔に記載してください -->
12
+
13
+ ## 再現手順
14
+
15
+ 1.
16
+ 2.
17
+ 3.
18
+
19
+ ## 期待動作
20
+
21
+ <!-- 本来どう動作すべきか -->
22
+
23
+ ## 実際の動作
24
+
25
+ <!-- 実際に起きた動作 -->
26
+
27
+ ## 環境
28
+
29
+ - OS:
30
+ - ブラウザ / ランタイム:
31
+ - バージョン:
32
+
33
+ ## 補足
34
+
35
+ <!-- スクリーンショット、ログ、関連 PR など -->
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: 機能要望
3
+ about: 新機能・改善の提案
4
+ title: "[Feature] "
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## 概要
10
+
11
+ <!-- 何を実現したいか簡潔に -->
12
+
13
+ ## 動機・背景
14
+
15
+ <!-- なぜ必要か、現状の課題 -->
16
+
17
+ ## 提案
18
+
19
+ <!-- 具体的な実装案・仕様案 -->
20
+
21
+ ## 代替案
22
+
23
+ <!-- 検討したが採用しなかった案があれば -->
24
+
25
+ ## 補足
26
+
27
+ <!-- 参考リンク、関連 Issue など -->
@@ -0,0 +1,25 @@
1
+ ## What
2
+
3
+ <!-- 具体的な変更内容を記載してください -->
4
+
5
+ ## Why
6
+
7
+ <!-- 変更理由や背景を記載してください -->
8
+
9
+ ## Refs
10
+
11
+ <!-- 関連 Issue、参考リンクなどを記載してください -->
12
+
13
+ ## Type of Change
14
+
15
+ <!-- 該当するプレフィックスを 1 つ選択してください -->
16
+
17
+ - [ ] `feat:` 新機能
18
+ - [ ] `fix:` バグ修正
19
+ - [ ] `docs:` ドキュメント
20
+ - [ ] `refactor:` リファクタリング
21
+ - [ ] `test:` テスト
22
+ - [ ] `perf:` パフォーマンス改善
23
+ - [ ] `build:` ビルド設定
24
+ - [ ] `ci:` CI/CD 設定
25
+ - [ ] `chore:` 雑務
@@ -0,0 +1,37 @@
1
+ # Dependabot 設定
2
+ #
3
+ # 依存関係の自動更新 PR を週次で起こす。
4
+ # プロジェクトに該当するエコシステムが無い場合は `package-ecosystem` ブロックごと削除すること。
5
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
6
+
7
+ version: 2
8
+
9
+ updates:
10
+ - package-ecosystem: npm
11
+ directory: "/"
12
+ schedule:
13
+ interval: weekly
14
+ day: monday
15
+ time: "09:00"
16
+ timezone: Asia/Tokyo
17
+ open-pull-requests-limit: 5
18
+ commit-message:
19
+ prefix: chore
20
+ include: scope
21
+ labels:
22
+ - dependencies
23
+
24
+ - package-ecosystem: github-actions
25
+ directory: "/"
26
+ schedule:
27
+ interval: weekly
28
+ day: monday
29
+ time: "09:00"
30
+ timezone: Asia/Tokyo
31
+ open-pull-requests-limit: 5
32
+ commit-message:
33
+ prefix: ci
34
+ include: scope
35
+ labels:
36
+ - dependencies
37
+ - ci
@@ -0,0 +1,35 @@
1
+ changelog:
2
+ categories:
3
+ - title: 新機能
4
+ labels:
5
+ - feat
6
+ - feature
7
+ - enhancement
8
+ - title: バグ修正
9
+ labels:
10
+ - fix
11
+ - bug
12
+ - title: パフォーマンス改善
13
+ labels:
14
+ - perf
15
+ - title: リファクタリング
16
+ labels:
17
+ - refactor
18
+ - title: ドキュメント
19
+ labels:
20
+ - docs
21
+ - title: テスト
22
+ labels:
23
+ - test
24
+ - title: CI / ビルド
25
+ labels:
26
+ - ci
27
+ - build
28
+ - title: その他
29
+ labels:
30
+ - chore
31
+ - "*"
32
+ exclude:
33
+ labels:
34
+ - skip-changelog
35
+ - dependencies
@@ -0,0 +1,63 @@
1
+ # Node.js プロジェクト用 CI 雛形
2
+ #
3
+ # 使用方法:
4
+ # 1. このファイルを ci.yml にリネーム(拡張子 .example を外す)
5
+ # 2. プロジェクトのスクリプト名(lint / typecheck / test)に合わせて run: を調整
6
+ # 3. パッケージマネージャ・Node バージョンをプロジェクトに合わせて変更
7
+ #
8
+ # .example のままだと GitHub Actions に認識されないため、リネームするまで実行されない。
9
+
10
+ name: CI
11
+
12
+ on:
13
+ push:
14
+ branches: [main]
15
+ pull_request:
16
+ branches: [main]
17
+
18
+ concurrency:
19
+ group: ${{ github.workflow }}-${{ github.ref }}
20
+ cancel-in-progress: true
21
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ lint:
27
+ runs-on: ubuntu-latest
28
+ timeout-minutes: 10
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: pnpm/action-setup@v4
32
+ - uses: actions/setup-node@v4
33
+ with:
34
+ node-version: 24
35
+ cache: pnpm
36
+ - run: pnpm install --frozen-lockfile
37
+ - run: pnpm lint
38
+
39
+ typecheck:
40
+ runs-on: ubuntu-latest
41
+ timeout-minutes: 10
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - uses: pnpm/action-setup@v4
45
+ - uses: actions/setup-node@v4
46
+ with:
47
+ node-version: 24
48
+ cache: pnpm
49
+ - run: pnpm install --frozen-lockfile
50
+ - run: pnpm typecheck
51
+
52
+ test:
53
+ runs-on: ubuntu-latest
54
+ timeout-minutes: 15
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: pnpm/action-setup@v4
58
+ - uses: actions/setup-node@v4
59
+ with:
60
+ node-version: 24
61
+ cache: pnpm
62
+ - run: pnpm install --frozen-lockfile
63
+ - run: pnpm test
@@ -0,0 +1,44 @@
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, ready_for_review, reopened]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: read
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
40
+ plugins: 'code-review@claude-code-plugins'
41
+ prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
42
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
43
+ # or https://code.claude.com/docs/en/cli-reference for available options
44
+
@@ -0,0 +1,57 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: write # Required for Claude to push the working branch
23
+ pull-requests: write # Required for Claude to open a PR
24
+ issues: write # Required for Claude to update its progress comment
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
47
+ # or https://code.claude.com/docs/en/cli-reference for available options
48
+ #
49
+ # Let Claude run the verification commands before pushing.
50
+ # These are merged into tag mode's built-in tools, not a replacement for them.
51
+ #
52
+ # Each command is allowlisted exactly. Avoid a wildcard such as `Bash(pnpm:*)`:
53
+ # it would also permit `pnpm exec` / `pnpm dlx` / `pnpm run <any script>`,
54
+ # which is arbitrary code execution under a `contents: write` token.
55
+ # Adjust the commands to match the project (npm / yarn / cargo / go ...).
56
+ claude_args: '--allowed-tools "Bash(pnpm lint)" "Bash(pnpm typecheck)" "Bash(pnpm test)"'
57
+
@@ -0,0 +1,44 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: astral-sh/setup-uv@v6
13
+ with:
14
+ python-version: "3.12"
15
+ - run: uv sync
16
+ - run: uv run pytest
17
+
18
+ build:
19
+ needs: test
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: astral-sh/setup-uv@v6
24
+ - run: uv build
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ publish:
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ environment:
34
+ name: pypi
35
+ url: https://pypi.org/p/agenttakt
36
+ permissions:
37
+ # PyPI Trusted Publishing (OIDC) に必須
38
+ id-token: write
39
+ steps:
40
+ - uses: actions/download-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: dist/
44
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,34 @@
1
+ name: Stale Issues / PRs
2
+
3
+ # 古い Issue / PR を自動でクローズする。
4
+ # 30 日無活動で stale ラベル付与、さらに 7 日無活動で自動クローズ。
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 0 * * 1" # 毎週月曜 00:00 UTC (= JST 月曜 09:00)
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ issues: write
13
+ pull-requests: write
14
+
15
+ jobs:
16
+ stale:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/stale@v10
20
+ with:
21
+ days-before-stale: 30
22
+ days-before-close: 7
23
+ stale-issue-label: stale
24
+ stale-pr-label: stale
25
+ exempt-issue-labels: "pinned,security,keep-open"
26
+ exempt-pr-labels: "pinned,security,keep-open"
27
+ stale-issue-message: |
28
+ この Issue は 30 日間活動がないため stale としてマークされました。
29
+ 7 日以内に追加コメントが無ければ自動でクローズされます。
30
+ stale-pr-message: |
31
+ この PR は 30 日間活動がないため stale としてマークされました。
32
+ 7 日以内に追加コメントが無ければ自動でクローズされます。
33
+ close-issue-message: 自動クローズしました。再度議論が必要な場合は新しい Issue を作成してください。
34
+ close-pr-message: 自動クローズしました。継続作業が必要な場合は新しい PR を作成してください。
@@ -0,0 +1,59 @@
1
+ # OS
2
+ .DS_Store
3
+ Thumbs.db
4
+ desktop.ini
5
+
6
+ # IDE / エディタ
7
+ .idea/
8
+ .vscode/*
9
+ !.vscode/extensions.json
10
+ !.vscode/settings.json
11
+ *.swp
12
+ *.swo
13
+ *~
14
+
15
+ # ログ
16
+ *.log
17
+ logs/
18
+ npm-debug.log*
19
+ yarn-debug.log*
20
+ yarn-error.log*
21
+ pnpm-debug.log*
22
+
23
+ # 環境変数
24
+ .env
25
+ .env.local
26
+ .env.*.local
27
+ !.env.example
28
+
29
+ # 依存関係(主要なもの)
30
+ node_modules/
31
+ __pycache__/
32
+ *.py[cod]
33
+ .venv/
34
+ venv/
35
+ .bundle/
36
+ vendor/
37
+
38
+ # pytest / pytest-textual-snapshot
39
+ .pytest_cache/
40
+ snapshot_report.html
41
+
42
+ # ビルド成果物(汎用)
43
+ dist/
44
+ build/
45
+ out/
46
+ coverage/
47
+ .cache/
48
+ .next/
49
+ .nuxt/
50
+ .turbo/
51
+ .parcel-cache/
52
+
53
+ # テスト
54
+ .nyc_output/
55
+
56
+ # 一時ファイル
57
+ *.tmp
58
+ .tmp/
59
+ tmp/
@@ -0,0 +1,68 @@
1
+ # プロジェクト固有の Claude Code 指示
2
+
3
+ このファイルは本プロジェクトに固有のルール・コンテキストを Claude Code に伝えるためのものでござる。
4
+ 全プロジェクト共通のガイドラインは `~/.claude/CLAUDE.md` に記載されており、本ファイルはそれを補完する形で記述するでござる。
5
+
6
+ ## プロジェクト概要
7
+
8
+ AgentTakt — AI エージェント(Executor)が MCP 経由で送信したタスク実行計画 JSON を、人間がターミナル上の ComfyUI 風ビジュアルノードエディタでレビュー・編集・承認する MCP サーバー兼 TUI ツール。
9
+
10
+ - MCP サーバー(`agenttakt serve`)と TUI 常駐プロセス(`agenttakt`)の 2 プロセス構成。Unix domain socket(NDJSON)で接続する(詳細は [docs/architecture.md](./docs/architecture.md))
11
+ - 親 issue: [#3](https://github.com/ryoohshima/AgentTakt/issues/3)(M0〜M4 + docs の sub-issue で進捗管理)
12
+
13
+ ## 技術スタック
14
+
15
+ - 言語: Python 3.10+(開発環境は 3.12)
16
+ - TUI: Textual >= 8.2
17
+ - MCP: Python MCP SDK v1 FastMCP(`mcp>=1.9,<2` にピン留め。SDK import は `src/agenttakt/server/mcp_server.py` に閉じ込める)
18
+ - データモデル: pydantic v2
19
+ - パッケージマネージャ: uv(build backend は hatchling、src レイアウト)
20
+
21
+ ## ディレクトリ構成
22
+
23
+ ```
24
+ .
25
+ ├── src/agenttakt/
26
+ │ ├── cli.py # エントリポイント(agenttakt / at)
27
+ │ ├── models/ # Plan データモデル・DAG 検証・自動レイアウト
28
+ │ ├── bridge/ # socket プロトコル・クライアント・サーバー
29
+ │ ├── server/ # MCP サーバー(SDK import はここのみ)
30
+ │ └── tui/ # Textual アプリ(screens / widgets / geometry)
31
+ ├── tests/ # pytest(モデル・プロトコル・Pilot による TUI テスト)
32
+ ├── examples/ # デバッグモード用サンプル計画 JSON
33
+ ├── docs/ # 設計ドキュメント
34
+ └── tasks/ # Claude Code 作業記録(todo.md / lessons.md)
35
+ ```
36
+
37
+ ## 開発コマンド
38
+
39
+ ```sh
40
+ # セットアップ
41
+ uv sync
42
+
43
+ # 実行
44
+ uv run agenttakt # TUI 常駐起動
45
+ uv run agenttakt serve # MCP stdio サーバー
46
+ uv run agenttakt open examples/sample_plan.json # デバッグモード(MCP なし)
47
+
48
+ # テスト
49
+ uv run pytest
50
+
51
+ # TUI 開発(textual devtools)
52
+ uv run textual console # 別ターミナルでログ閲覧
53
+ uv run textual run --dev src/agenttakt/tui/app.py
54
+ ```
55
+
56
+ ## このリポジトリ固有の注意事項
57
+
58
+ - **stdio MCP サーバー内で TUI を起動してはならない**(stdio がプロトコル通信に専有されている)。TUI に触る処理は必ず TUI プロセス側に置く
59
+ - エッジ描画は経路計算(`tui/geometry.py`)と文字化(`tui/widgets/edge_layer.py`)を分離したまま保つ(braille 曲線への差し替え口)
60
+ - Plan / Node / Edge は `extra="allow"`。Executor 独自フィールドのラウンドトリップを壊さないこと
61
+ - socket パスは `AGENTTAKT_SOCKET` → 既定 `{tempdir}/agenttakt-{uid}/takt.sock`。テストでは `tmp_path` 上の実 UDS を使う
62
+
63
+ ## 参照ドキュメント
64
+
65
+ - [README.md](./README.md)
66
+ - [docs/architecture.md](./docs/architecture.md) — 2 プロセス構成・承認フロー
67
+ - [docs/schema.md](./docs/schema.md) — Plan JSON スキーマ
68
+ - [docs/protocol.md](./docs/protocol.md) — ブリッジプロトコル
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ryo Ohshima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.