claude-code-conductor 2.15.1__tar.gz → 2.15.2__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.
- claude_code_conductor-2.15.2/.claude/docs/parallel-agents-setup.md +152 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/parallel-agents/SKILL.md +22 -8
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.gitignore +1 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/CHANGELOG.md +43 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/PKG-INFO +22 -1
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/README.md +21 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/hatch_build.py +1 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/__init__.py +1 -1
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/_excludes.py +1 -0
- claude_code_conductor-2.15.2/tests/test_db.py +166 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_worktree_guard.py +35 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/CLAUDE.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/architect.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/code-reviewer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/developer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/doc-writer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/interviewer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/planner.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/project-setup.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/security-reviewer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/systematic-debugger.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/tester.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/wt_developer.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/wt_systematic-debugger.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/wt_tester.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/docs/platform-adapters.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/docs/settings.json.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/_hook_utils.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/check_agent_invocation.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/consolidate_memory.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/permission_handler.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/permission_handler_toast.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/planner_check.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/post_tool.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/pre_compact.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/pre_tool.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/recall_inject.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/restore_session.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/schema.sql +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/select_tier.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/session_start.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/session_stop.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/session_utils.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/statusline.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/stop.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/worktree_guard.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/memory/.gitkeep +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/permission_rules.json +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/rules/promoted/index.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/settings.json +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/codex-review/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/references/code-review-checklist.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/references/plan-design-guidelines.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/references/security-review-checklist.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/scripts/record_review_decision.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/scripts/record_tier_outcome.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/dev-workflow/scripts/review_hint_inject.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/develop/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/doc/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/extract-lib/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/init-session/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/mcp-config/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/pattern-status/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/promote-pattern/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/recall/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/report-timestamp/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/report-timestamp/scripts/get_timestamp.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/review-phase/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/setup/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/setup/reference.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/setup/templates/coding-standards-template.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/setup/templates/project-conventions-template.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/skills/start/SKILL.md +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/state/.gitkeep +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/chroma-hnswlib-LICENSE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/chroma-hnswlib-NOTICE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/fastembed-LICENSE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/fastembed-NOTICE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/onnxruntime-LICENSE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/LICENSES/paraphrase-multilingual-MiniLM-L12-v2-LICENSE +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/pyproject.toml +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/__main__.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/_terminal.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/adapters.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_ask.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_doctor.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_init.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_list.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_plan.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_recall.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_tier.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/cli_update.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/db.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/embedding.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/mcp_server.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/paths.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/plan_validator.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/platforms.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/question.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/recall_chunker.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/src/c3/recall_index.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/__init__.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/conftest.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/__init__.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_check_agent_invocation.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_consolidate_memory.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_hook_utils.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_permission_handler.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_permission_handler_toast.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_pip_reinstall_reminder.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_planner_check.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_planner_check_dev.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_post_tool.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_pre_tool.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_recall_inject.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_record_review_decision.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_record_tier_outcome.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_restore_session.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_review_hint_inject.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_select_tier.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_select_tier_escalation.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_session_start.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_session_stop.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_session_utils.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_settings_local_absolute_paths.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_similarity_boost.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_statusline.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_statusline_template_sync.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_sync_check.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/hooks/test_template_guard.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/__init__.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/_skill_helpers.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_dev_workflow_no_task_type.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_init_session_no_task_type.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_planner_lightweight.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_recall_skill.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_session_backlog_reconciliation.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_setup_templates.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_start_skill_bugfix_flow.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_start_skill_new_flow.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/skills/test_start_skill_security_audit_phase.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_adapters.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_ask.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_entry.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_init.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_list.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_plan.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_recall.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_tier.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_cli_update.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_docstring_consistency.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_embedding.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_excludes.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_mcp_server_elicit.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_paths.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_plan_validator.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_pre_compact.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_pre_tool_hook.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_precompact_additional.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_precompact_toctou_fixes.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_recall_chunker.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_recall_index.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_references_migration.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_session_utils_additional.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_skill_no_builtin_conflict.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_statusline.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_stop_additional.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_stop_hook.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_stop_precompact_fixes.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_sync_template_stop.py +0 -0
- {claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/tests/test_template_pre_tool_hook.py +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# parallel-agents 推奨個人設定
|
|
2
|
+
|
|
3
|
+
C3 の `parallel-agents` skill(`/develop` から間接起動)を快適に使うための、
|
|
4
|
+
**Claude Code バージョン要件と個人設定の推奨値**をまとめる。
|
|
5
|
+
|
|
6
|
+
> 本ドキュメントは **C3 利用者(人間)向け** のリファレンス。
|
|
7
|
+
> LLM 向けの skill 動作指針は `.claude/skills/parallel-agents/SKILL.md` を参照。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 概要
|
|
12
|
+
|
|
13
|
+
`parallel-agents` skill は Claude Code 公式の `isolation: "worktree"` 機構を使い、
|
|
14
|
+
`.claude/worktrees/agent-<id>/` 配下に独立した git worktree を作成して並列実行する。
|
|
15
|
+
このとき以下 2 点で **利用者環境への期待** が発生する。
|
|
16
|
+
|
|
17
|
+
| 項目 | 推奨値 | 既定との差 |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Claude Code バージョン | **2.1.150 以降** | 古いと auto-cleanup 不在 |
|
|
20
|
+
| `worktree.baseRef` | **`"head"`** | 既定は `"fresh"` (= `origin/<default>` から作成) |
|
|
21
|
+
|
|
22
|
+
設定しなくても skill 自体は動くが、以下の問題に遭遇しやすくなる:
|
|
23
|
+
|
|
24
|
+
- 古い CC: 各 wave 終了時に `git worktree remove` が走らず `.claude/worktrees/` に
|
|
25
|
+
dead worktree が積もる
|
|
26
|
+
- `baseRef: fresh`: push 前のローカルコミットが worktree から見えず、agent が
|
|
27
|
+
「ファイルが存在しない」と誤判定して fresh create に走る等の事故が起きる
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 推奨個人設定
|
|
32
|
+
|
|
33
|
+
`~/.claude/settings.json` (グローバル個人設定) に以下を追加する:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"worktree": {
|
|
38
|
+
"baseRef": "head"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
既存の `~/.claude/settings.json` がある場合はマージする。例:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"permissions": {
|
|
48
|
+
"defaultMode": "auto"
|
|
49
|
+
},
|
|
50
|
+
"model": "sonnet",
|
|
51
|
+
"worktree": {
|
|
52
|
+
"baseRef": "head"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### なぜプロジェクト設定 (`.claude/settings.json`) ではなく個人設定か
|
|
58
|
+
|
|
59
|
+
`worktree.baseRef` は **Claude Code 公式機能の動作モード切替** であり、C3 固有の
|
|
60
|
+
設定ではない。C3 が利用者の Claude Code 設定全体を書き換える形になると
|
|
61
|
+
「C3 は `.claude/` 内に収まるフレームワーク」という設計思想と矛盾するため、
|
|
62
|
+
C3 配布物には含めず利用者個人の判断で適用する形にしている。
|
|
63
|
+
|
|
64
|
+
### worktree.baseRef: "head" の意味
|
|
65
|
+
|
|
66
|
+
| 値 | base 元 |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `"fresh"` (既定) | `origin/<default-branch>` (例: `origin/main`) |
|
|
69
|
+
| `"head"` | 現在の local HEAD |
|
|
70
|
+
|
|
71
|
+
`"head"` にすると、push 前のローカルコミットが worktree にも含まれる。
|
|
72
|
+
parallel-agents は「直近の修正を反映した worktree で並列実装させる」ことが目的のため、
|
|
73
|
+
`"head"` の方が C3 のワークフローと整合する。
|
|
74
|
+
|
|
75
|
+
### 副作用
|
|
76
|
+
|
|
77
|
+
- 作業中のローカル HEAD がコミットされていない(dirty)状態だと、その dirty も
|
|
78
|
+
worktree に持ち込まれる。これは通常のメリット(ローカル変更を反映)と表裏一体
|
|
79
|
+
- 壊れた HEAD から worktree を作ると、worktree も壊れる。コミット前にビルドが
|
|
80
|
+
通っているかは利用者が確認する責任
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Claude Code バージョン要件
|
|
85
|
+
|
|
86
|
+
### 2.1.150 以降を推奨する理由
|
|
87
|
+
|
|
88
|
+
`isolation: "worktree"` 付き Agent が **完了時に worktree を auto-cleanup** する
|
|
89
|
+
挙動が安定したのが 2.1.150 系。これにより:
|
|
90
|
+
|
|
91
|
+
- `.claude/worktrees/` 配下に dead worktree が残らない
|
|
92
|
+
- `worktree-agent-<id>` ブランチも自動削除される
|
|
93
|
+
- 親 Claude が明示的に `git worktree remove` を呼ぶ必要がない
|
|
94
|
+
|
|
95
|
+
2.1.150 未満の場合、SKILL.md Step 2-F-3 のフォールバック手順
|
|
96
|
+
(`git worktree remove -f -f` + `git branch -D worktree-agent-<id>`)が
|
|
97
|
+
**毎回必要** になる。dead worktree が積み重なるとパフォーマンス・容量への
|
|
98
|
+
影響もあるため、可能ならアップグレードを推奨する。
|
|
99
|
+
|
|
100
|
+
### auto-cleanup の信頼度
|
|
101
|
+
|
|
102
|
+
検証実績 (2026-05-23 〜 2026-05-24):
|
|
103
|
+
|
|
104
|
+
- foreground / background / 並列 / 失敗 (exit 1) の全パターンで 10/10 cleanup 確認
|
|
105
|
+
- ごく稀に **外部要因による一時的ファイルロック** で cleanup が失敗するケースを
|
|
106
|
+
1 件観測 (約 1/11 以下)。原因は未特定(アンチウィルス・バックアップソフト・
|
|
107
|
+
その他常駐プロセスのいずれかの可能性)
|
|
108
|
+
- SKILL.md Step 2-F-3 の残留チェック + `git worktree prune` フォールバックで
|
|
109
|
+
実害なく吸収される設計
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 設定後の動作確認
|
|
114
|
+
|
|
115
|
+
1. 設定追加後、Claude Code を再起動する(または `/config` で反映)
|
|
116
|
+
2. C3 で wt_tester を 1 件起動するだけの軽量タスクを実行(最も簡単な検証):
|
|
117
|
+
- `/start` → 「直接指示する」→ 「wt_tester を 1 個 isolation:worktree で pwd だけ実行して」
|
|
118
|
+
3. 完了通知後、`git worktree list --porcelain` と `ls .claude/worktrees/` で
|
|
119
|
+
両方 main 以外が無い状態を確認
|
|
120
|
+
|
|
121
|
+
### baseRef 適用の確認
|
|
122
|
+
|
|
123
|
+
ローカルだけにある commit がある状態で wt_tester を起動し、worktree 内で
|
|
124
|
+
`git log -1` が **その commit を指していれば** baseRef: "head" が効いている。
|
|
125
|
+
`origin/main` の commit を指していれば既定(`fresh`)のまま。
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## トラブルシューティング
|
|
130
|
+
|
|
131
|
+
### Q. worktree が cleanup されず残る
|
|
132
|
+
|
|
133
|
+
A. 以下の順に対処:
|
|
134
|
+
|
|
135
|
+
1. `git worktree list --porcelain` で main 以外の登録があるか確認
|
|
136
|
+
2. 登録があれば `git worktree remove -f -f <path>` で削除
|
|
137
|
+
3. 物理 dir だけ残っていれば `rm -rf .claude/worktrees/agent-*`
|
|
138
|
+
4. ブランチが残っていれば `git branch -d worktree-agent-<id>` (force 必要なら `-D`)
|
|
139
|
+
|
|
140
|
+
これらは parallel-agents SKILL.md Step 2-F-3 のフォールバック手順そのもの。
|
|
141
|
+
auto-cleanup が動いている環境ではほぼ no-op になる。
|
|
142
|
+
|
|
143
|
+
### Q. wt_developer / wt_tester が「ファイルが存在しない」と言う
|
|
144
|
+
|
|
145
|
+
A. `worktree.baseRef` が `"fresh"` (既定) のまま、かつローカルに push 前の
|
|
146
|
+
コミットでそのファイルを追加しているケースが典型。`worktree.baseRef: "head"` を
|
|
147
|
+
設定するか、対象 commit を push してから再実行する。
|
|
148
|
+
|
|
149
|
+
### Q. 設定変更しても効かない
|
|
150
|
+
|
|
151
|
+
A. Claude Code の設定読み込みはセッション開始時。`/config` で再読み込みするか、
|
|
152
|
+
Claude Code を再起動する。
|
|
@@ -41,7 +41,7 @@ Claude Code のサブエージェントは **更にサブエージェントを s
|
|
|
41
41
|
|
|
42
42
|
- plan-report が `.claude/reports/plan-report-*.md` の形式で配置され、YAML フロントマターを持つこと
|
|
43
43
|
- フロントマターが無ければ `.claude/skills/dev-workflow/SKILL.md` の D-1〜D-5 ceremony へフォールバック
|
|
44
|
-
- Claude Code の Agent ツールが `isolation: "worktree"` パラメータをサポートしていること(v2.1.x
|
|
44
|
+
- Claude Code の Agent ツールが `isolation: "worktree"` パラメータをサポートしていること(v2.1.x 以降)。v2.1.150 未満では Agent 完了時の worktree auto-cleanup が動作しないため、2-F-3 のフォールバック手順が毎回必要になる挙動差がある(利用者向け推奨設定は [`.claude/docs/parallel-agents-setup.md`](../../docs/parallel-agents-setup.md) を参照)
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -208,7 +208,7 @@ worktree path は Agent ツール返り値の `<worktree><worktreePath>...</work
|
|
|
208
208
|
}
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
- 「リトライ」 → 失敗タスクのみ 2-C
|
|
211
|
+
- 「リトライ」 → 失敗タスクのみ 2-C を再実行(失敗 worktree は auto-cleanup 済みのことが多いが、2-F-3 の残留チェックを実施してから再開すること。残留があった場合のみ事前に `git worktree remove -f -f` で削除)
|
|
212
212
|
- 「スキップして次の wave へ」 → 失敗内容をセッションファイルの `## 試みたが失敗したアプローチ` に追記して次の wave へ
|
|
213
213
|
- 「中断」 → セッションファイルの該当 wave 行は `- [ ]` のままにしてスキル終了
|
|
214
214
|
|
|
@@ -241,15 +241,29 @@ git commit -m "Wave {N}: {要約}"
|
|
|
241
241
|
|
|
242
242
|
メッセージには各タスクの目的を簡潔にまとめる(例: 「Wave 1: auth ログイン/ログアウト実装」)。
|
|
243
243
|
|
|
244
|
-
#### 2-F-3: worktree
|
|
244
|
+
#### 2-F-3: worktree クリーンアップ(残留チェックのみ)
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
Claude Code 2.1.x(少なくとも 2.1.150 で実測確認、2026-05-23)以降、`isolation:"worktree"` 付き Agent は完了時に **物理ディレクトリ・worktree 登録・`worktree-agent-*` ブランチが自動削除** される(foreground / background / 並列 / 失敗ケース全パターンで検証済み。詳細: `.claude/reports/worktree-cleanup-verification-20260523-234110.md`)。
|
|
247
|
+
|
|
248
|
+
そのため明示的な `git worktree remove` は **不要**。auto-cleanup が race や障害でスキップされた場合のセーフティとして残留チェックのみ行う:
|
|
247
249
|
|
|
248
250
|
```bash
|
|
249
|
-
|
|
250
|
-
git worktree
|
|
251
|
+
# 念のため worktree 登録の残留を確認、あれば prune(物理ディレクトリも片付く)
|
|
252
|
+
git worktree list --porcelain
|
|
251
253
|
git worktree prune
|
|
252
|
-
|
|
254
|
+
|
|
255
|
+
# 念のため worktree-agent-* ブランチの残留チェック(あれば手動削除を検討)
|
|
256
|
+
# Windows PowerShell では grep 未インストール時に動作しないため、代替として
|
|
257
|
+
# `git branch --list "worktree-agent-*"` を使う:
|
|
258
|
+
git branch -a | grep -E "worktree-agent-" || true
|
|
259
|
+
# Windows 代替: git branch --list "worktree-agent-*"
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
残留があった場合のみ手動 cleanup(古い Claude Code バージョン互換 or auto-cleanup 失敗ケース):
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
git worktree remove -f -f .claude/worktrees/agent-{id} # -f -f は claude agent lock 残留対策
|
|
266
|
+
git branch -D worktree-agent-{id}
|
|
253
267
|
```
|
|
254
268
|
|
|
255
269
|
#### 2-F-4: セッション記録
|
|
@@ -285,5 +299,5 @@ checkpoint の summary には KEEP ルール(設計判断・決定事項・解
|
|
|
285
299
|
- 並列実行で **特定パターンが詰まりがち** と気付いたら、セッションファイルの `## 試みたが失敗したアプローチ` に追記し `patterns` に登録する
|
|
286
300
|
- 並列度を増やして race の兆候が出た場合は本 skill の上限値 15 を見直す(PoC では 15 並列まで 0 失敗確認済み)
|
|
287
301
|
- agent ツール並列起動の `<task-notification>` の到着順序は保証されないため、結果集約の表は task_id でソートして提示する
|
|
288
|
-
- worktree
|
|
302
|
+
- Claude Code 2.1.x 以降は Agent 完了時に worktree auto-cleanup されるため、明示的な `git worktree remove` は基本不要(2-F-3 参照)。`.claude/worktrees/` に dead worktree が残る場合は古い Claude Code バージョンで作成された残骸の可能性が高い
|
|
289
303
|
|
|
@@ -60,6 +60,7 @@ site/
|
|
|
60
60
|
.claude/docs/ruflo_research_result.md
|
|
61
61
|
.claude/docs/C3_hnsw_機能追加詳細設計.md
|
|
62
62
|
.claude/docs/C3_利用状況可視化.md
|
|
63
|
+
.claude/docs/C3_tier_routing_cost_integration_設計.md
|
|
63
64
|
.claude/docs/grill-me機能を実装する際の考慮点とC3との相性や超えるべき壁.md
|
|
64
65
|
.claude/docs/C3のconfig_policyとversion_upgradeの考慮点と超えるべき壁.md
|
|
65
66
|
|
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.15.2 (2026-05-24)
|
|
4
|
+
|
|
5
|
+
### 改善
|
|
6
|
+
|
|
7
|
+
- **parallel-agents skill Step 2-F-3 を縮小**: Claude Code 2.1.150 で
|
|
8
|
+
`isolation:"worktree"` 付き Agent 完了時の worktree auto-cleanup 動作を
|
|
9
|
+
4 シナリオ (foreground / background / 並列 / 失敗 exit 1) で確定検証。
|
|
10
|
+
従来の「親 Claude が `git worktree remove -f -f` を毎回実行」を
|
|
11
|
+
「残留チェック + `git worktree prune` のみ」に縮小。
|
|
12
|
+
古い Claude Code バージョン (< 2.1.150) や稀な外部要因による cleanup
|
|
13
|
+
失敗時のフォールバック手順は残置。
|
|
14
|
+
- Step 2-E (リトライ) と 知識蓄積セクションも同方針に整合化。
|
|
15
|
+
|
|
16
|
+
### 追加
|
|
17
|
+
|
|
18
|
+
- **`.claude/docs/parallel-agents-setup.md` 新規**: parallel-agents
|
|
19
|
+
利用者向けの推奨個人設定リファレンス。`worktree.baseRef: "head"` /
|
|
20
|
+
Claude Code バージョン要件 / トラブルシュート手順を集約。
|
|
21
|
+
- **README.md に「推奨個人設定」セクション**: 最小設定例と詳細 docs への
|
|
22
|
+
リンクを `parallel-agents` 紹介の直後に追加。
|
|
23
|
+
|
|
24
|
+
### 回帰防御
|
|
25
|
+
|
|
26
|
+
- `tests/test_db.py` 新規 (4 + 1 件): `locate_c3_db` の env 優先 /
|
|
27
|
+
C3_PO_DB_PATH legacy fallback / 親遡り / 無効 env fallback /
|
|
28
|
+
ディレクトリ指定 fallback の各経路を契約として固定。
|
|
29
|
+
- `tests/test_worktree_guard.py` に env gate 未設定時の no-op テスト
|
|
30
|
+
追加 (PO_WORKTREE_GUARD env 廃止移行を機械検出する番犬テスト)。
|
|
31
|
+
- 合計 5 件追加で 928 → 934 PASS (回帰なし)。
|
|
32
|
+
|
|
33
|
+
### 配布
|
|
34
|
+
|
|
35
|
+
- `.claude/docs/C3_tier_routing_cost_integration_設計.md` (個人作業ノート)
|
|
36
|
+
を 3 ファイル同期 (.gitignore / `_excludes.py` / `hatch_build.py`) で
|
|
37
|
+
配布除外。
|
|
38
|
+
|
|
39
|
+
### 内部整理
|
|
40
|
+
|
|
41
|
+
- SKILL.md (LLM 向け) と人間向け推奨ドキュメントの責務を文書ヒエラルキー
|
|
42
|
+
思想 (SKILL.md = LLM 行動指針 / docs = 人間リファレンス) に従って分離。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
3
46
|
## v2.15.1 (2026-05-22)
|
|
4
47
|
|
|
5
48
|
### 変更
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-code-conductor
|
|
3
|
-
Version: 2.15.
|
|
3
|
+
Version: 2.15.2
|
|
4
4
|
Summary: Multi-agent orchestration framework for Claude Code with Codex/Cursor adapters (C3)
|
|
5
5
|
Project-URL: Homepage, https://github.com/satoh-y-0323/claude-code-conductor
|
|
6
6
|
Project-URL: Repository, https://github.com/satoh-y-0323/claude-code-conductor
|
|
@@ -375,6 +375,27 @@ Copy-Item -Recurse claude-code-conductor\.claude your-project\
|
|
|
375
375
|
|
|
376
376
|
TDD を伴う機能実装は、planner が「test- → impl- → confirm-」の 3 タスクペアに分解し、各 wave 内で独立機能間で並列起動されます。並列実行時は worktree 専用の `wt_tester` / `wt_developer` / `wt_systematic-debugger` agent が使用され、レポートは `task_id` ベースのファイル名で出力されます。
|
|
377
377
|
|
|
378
|
+
### 推奨個人設定 (`~/.claude/settings.json`)
|
|
379
|
+
|
|
380
|
+
`parallel-agents` を快適に使うため、以下 2 点を **個人設定として** 推奨します(C3 配布物には含めません):
|
|
381
|
+
|
|
382
|
+
| 項目 | 推奨値 | 理由 |
|
|
383
|
+
|---|---|---|
|
|
384
|
+
| Claude Code バージョン | 2.1.150 以降 | worktree auto-cleanup の安定動作 |
|
|
385
|
+
| `worktree.baseRef` | `"head"` | push 前のローカルコミットを worktree に含める |
|
|
386
|
+
|
|
387
|
+
最小設定例:
|
|
388
|
+
|
|
389
|
+
```json
|
|
390
|
+
{
|
|
391
|
+
"worktree": {
|
|
392
|
+
"baseRef": "head"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
詳細(背景・副作用・トラブルシュート)は [`.claude/docs/parallel-agents-setup.md`](./.claude/docs/parallel-agents-setup.md) を参照してください。
|
|
398
|
+
|
|
378
399
|
---
|
|
379
400
|
|
|
380
401
|
## セッション管理
|
|
@@ -328,6 +328,27 @@ Copy-Item -Recurse claude-code-conductor\.claude your-project\
|
|
|
328
328
|
|
|
329
329
|
TDD を伴う機能実装は、planner が「test- → impl- → confirm-」の 3 タスクペアに分解し、各 wave 内で独立機能間で並列起動されます。並列実行時は worktree 専用の `wt_tester` / `wt_developer` / `wt_systematic-debugger` agent が使用され、レポートは `task_id` ベースのファイル名で出力されます。
|
|
330
330
|
|
|
331
|
+
### 推奨個人設定 (`~/.claude/settings.json`)
|
|
332
|
+
|
|
333
|
+
`parallel-agents` を快適に使うため、以下 2 点を **個人設定として** 推奨します(C3 配布物には含めません):
|
|
334
|
+
|
|
335
|
+
| 項目 | 推奨値 | 理由 |
|
|
336
|
+
|---|---|---|
|
|
337
|
+
| Claude Code バージョン | 2.1.150 以降 | worktree auto-cleanup の安定動作 |
|
|
338
|
+
| `worktree.baseRef` | `"head"` | push 前のローカルコミットを worktree に含める |
|
|
339
|
+
|
|
340
|
+
最小設定例:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"worktree": {
|
|
345
|
+
"baseRef": "head"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
詳細(背景・副作用・トラブルシュート)は [`.claude/docs/parallel-agents-setup.md`](./.claude/docs/parallel-agents-setup.md) を参照してください。
|
|
351
|
+
|
|
331
352
|
---
|
|
332
353
|
|
|
333
354
|
## セッション管理
|
|
@@ -39,6 +39,7 @@ EXCLUDE_PATTERNS: tuple[str, ...] = (
|
|
|
39
39
|
"docs/ruflo_research_result.md",
|
|
40
40
|
"docs/C3_hnsw_機能追加詳細設計.md",
|
|
41
41
|
"docs/C3_利用状況可視化.md",
|
|
42
|
+
"docs/C3_tier_routing_cost_integration_設計.md",
|
|
42
43
|
"docs/grill-me機能を実装する際の考慮点とC3との相性や超えるべき壁.md",
|
|
43
44
|
"docs/C3のconfig_policyとversion_upgradeの考慮点と超えるべき壁.md",
|
|
44
45
|
"docs/codex対応/*",
|
|
@@ -36,6 +36,7 @@ EXCLUDE_PATTERNS: tuple[str, ...] = (
|
|
|
36
36
|
"docs/ruflo_research_result.md",
|
|
37
37
|
"docs/C3_hnsw_機能追加詳細設計.md",
|
|
38
38
|
"docs/C3_利用状況可視化.md",
|
|
39
|
+
"docs/C3_tier_routing_cost_integration_設計.md",
|
|
39
40
|
"docs/grill-me機能を実装する際の考慮点とC3との相性や超えるべき壁.md",
|
|
40
41
|
"docs/C3のconfig_policyとversion_upgradeの考慮点と超えるべき壁.md",
|
|
41
42
|
"docs/codex対応/*",
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""Tests for src/c3/db.py:locate_c3_db()
|
|
2
|
+
|
|
3
|
+
`locate_c3_db()` の 3 経路を契約として固定する回帰テスト:
|
|
4
|
+
1. C3_DB_PATH env (worktree 内子プロセス用、v2.0.0+)
|
|
5
|
+
2. C3_PO_DB_PATH env (legacy, v1.x 互換)
|
|
6
|
+
3. CWD からの親遡り fallback
|
|
7
|
+
|
|
8
|
+
worktree 環境変化(Claude Code v2.1.149 sandbox 厳格化など)に対する
|
|
9
|
+
C3 側の env-aware path 解決の壊れにくさを担保する。
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import logging
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
import pytest
|
|
18
|
+
|
|
19
|
+
from c3.db import locate_c3_db
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _make_fake_db(base: Path) -> Path:
|
|
23
|
+
"""`base/.claude/state/c3.db` を作って返す。
|
|
24
|
+
|
|
25
|
+
locate_c3_db は is_file() 判定のみ行い中身を読まないため、
|
|
26
|
+
空ファイルで十分。
|
|
27
|
+
"""
|
|
28
|
+
db_path = base / ".claude" / "state" / "c3.db"
|
|
29
|
+
db_path.parent.mkdir(parents=True, exist_ok=True)
|
|
30
|
+
db_path.touch()
|
|
31
|
+
return db_path
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _assert_fallback_warning(caplog: pytest.LogCaptureFixture) -> None:
|
|
35
|
+
"""env が無効値・ディレクトリ等で fallback した時の警告内容を契約として固定する。
|
|
36
|
+
|
|
37
|
+
NOTE: src/c3/db.py の現在の警告フォーマット
|
|
38
|
+
"%s set but file not found: %s (falling back to traversal)"
|
|
39
|
+
を現状スナップショットとして検証する。将来ログメッセージを精緻化する場合は
|
|
40
|
+
本ヘルパーを意図的に更新すること(caplog の片側 OR では検出できないため)。
|
|
41
|
+
"""
|
|
42
|
+
assert "C3_DB_PATH" in caplog.text, "Warning must mention env var name C3_DB_PATH."
|
|
43
|
+
assert "file not found" in caplog.text, (
|
|
44
|
+
"Warning must mention 'file not found' (current db.py message). "
|
|
45
|
+
"If db.py message is intentionally refined, update this assertion."
|
|
46
|
+
)
|
|
47
|
+
assert "falling back to traversal" in caplog.text, (
|
|
48
|
+
"Warning must mention 'falling back to traversal' (current db.py message). "
|
|
49
|
+
"If db.py message is intentionally refined, update this assertion."
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def test_locate_c3_db_env_priority(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
|
54
|
+
"""C3_DB_PATH が設定されていれば、CWD 親遡りより優先される."""
|
|
55
|
+
env_db = _make_fake_db(tmp_path / "env_root")
|
|
56
|
+
cwd_db = _make_fake_db(tmp_path / "cwd_root")
|
|
57
|
+
cwd_subdir = tmp_path / "cwd_root" / "sub" / "deeper"
|
|
58
|
+
cwd_subdir.mkdir(parents=True)
|
|
59
|
+
|
|
60
|
+
monkeypatch.setenv("C3_DB_PATH", str(env_db))
|
|
61
|
+
monkeypatch.delenv("C3_PO_DB_PATH", raising=False)
|
|
62
|
+
|
|
63
|
+
result = locate_c3_db(start=cwd_subdir)
|
|
64
|
+
|
|
65
|
+
assert result == env_db.resolve(), (
|
|
66
|
+
f"C3_DB_PATH should win over parent traversal. "
|
|
67
|
+
f"Expected {env_db.resolve()}, got {result}"
|
|
68
|
+
)
|
|
69
|
+
assert result != cwd_db.resolve(), (
|
|
70
|
+
"Parent traversal should NOT have been triggered while C3_DB_PATH is valid."
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_locate_c3_db_legacy_env_fallback(
|
|
75
|
+
tmp_path: Path,
|
|
76
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
77
|
+
caplog: pytest.LogCaptureFixture,
|
|
78
|
+
):
|
|
79
|
+
"""C3_DB_PATH 未設定で C3_PO_DB_PATH が設定されていれば legacy 経路で解決。
|
|
80
|
+
またこのとき deprecation 警告が WARNING で発火する。"""
|
|
81
|
+
legacy_db = _make_fake_db(tmp_path / "legacy_root")
|
|
82
|
+
|
|
83
|
+
monkeypatch.delenv("C3_DB_PATH", raising=False)
|
|
84
|
+
monkeypatch.setenv("C3_PO_DB_PATH", str(legacy_db))
|
|
85
|
+
|
|
86
|
+
with caplog.at_level(logging.WARNING, logger="c3.db"):
|
|
87
|
+
result = locate_c3_db(start=tmp_path)
|
|
88
|
+
|
|
89
|
+
assert result == legacy_db.resolve(), (
|
|
90
|
+
f"C3_PO_DB_PATH should resolve when C3_DB_PATH is unset. "
|
|
91
|
+
f"Expected {legacy_db.resolve()}, got {result}"
|
|
92
|
+
)
|
|
93
|
+
assert "C3_PO_DB_PATH is deprecated" in caplog.text, (
|
|
94
|
+
"Legacy env path should emit a deprecation warning."
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def test_locate_c3_db_parent_traversal(
|
|
99
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
100
|
+
):
|
|
101
|
+
"""env 未設定なら start から親遡りで .claude/state/c3.db を見つける."""
|
|
102
|
+
root_db = _make_fake_db(tmp_path)
|
|
103
|
+
deep = tmp_path / "a" / "b" / "c"
|
|
104
|
+
deep.mkdir(parents=True)
|
|
105
|
+
|
|
106
|
+
monkeypatch.delenv("C3_DB_PATH", raising=False)
|
|
107
|
+
monkeypatch.delenv("C3_PO_DB_PATH", raising=False)
|
|
108
|
+
|
|
109
|
+
result = locate_c3_db(start=deep)
|
|
110
|
+
|
|
111
|
+
assert result == root_db.resolve(), (
|
|
112
|
+
f"Parent traversal should find .claude/state/c3.db. "
|
|
113
|
+
f"Expected {root_db.resolve()}, got {result}"
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def test_locate_c3_db_invalid_env_falls_back_to_traversal(
|
|
118
|
+
tmp_path: Path,
|
|
119
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
120
|
+
caplog: pytest.LogCaptureFixture,
|
|
121
|
+
):
|
|
122
|
+
"""env が設定されていても指すパスが無効ならば親遡り fallback に進む."""
|
|
123
|
+
valid_db = _make_fake_db(tmp_path)
|
|
124
|
+
|
|
125
|
+
monkeypatch.setenv("C3_DB_PATH", str(tmp_path / "nonexistent.db"))
|
|
126
|
+
monkeypatch.delenv("C3_PO_DB_PATH", raising=False)
|
|
127
|
+
|
|
128
|
+
with caplog.at_level(logging.WARNING, logger="c3.db"):
|
|
129
|
+
result = locate_c3_db(start=tmp_path)
|
|
130
|
+
|
|
131
|
+
assert result == valid_db.resolve(), (
|
|
132
|
+
"Invalid env path should fall through to parent traversal."
|
|
133
|
+
)
|
|
134
|
+
_assert_fallback_warning(caplog)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def test_locate_c3_db_env_pointing_to_directory_falls_back_to_traversal(
|
|
138
|
+
tmp_path: Path,
|
|
139
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
140
|
+
caplog: pytest.LogCaptureFixture,
|
|
141
|
+
):
|
|
142
|
+
"""ディレクトリ指定のテスト(SR L-3 追加)。
|
|
143
|
+
|
|
144
|
+
`test_locate_c3_db_invalid_env_falls_back_to_traversal` は env が「存在しない
|
|
145
|
+
ファイルパス」を指すケースをカバーするが、本テストは env が「実在するディレクトリ」
|
|
146
|
+
を指すケースをカバーする(is_file() False の別経路)。setup は env に
|
|
147
|
+
`tmp_path/some_dir` (mkdir 済) を設定し、親遡り fallback 用に
|
|
148
|
+
`_make_fake_db(tmp_path)` で `tmp_path/.claude/state/c3.db` を別途用意する。
|
|
149
|
+
|
|
150
|
+
SR L-3 指摘: ディレクトリ指定でも "file not found" のログが出る(診断メッセージの
|
|
151
|
+
誤解可能性)。この挙動をテストとして固定し、将来の修正時に意図的な変更として検出する。
|
|
152
|
+
"""
|
|
153
|
+
some_dir = tmp_path / "some_dir"
|
|
154
|
+
some_dir.mkdir()
|
|
155
|
+
valid_db = _make_fake_db(tmp_path)
|
|
156
|
+
|
|
157
|
+
monkeypatch.setenv("C3_DB_PATH", str(some_dir))
|
|
158
|
+
monkeypatch.delenv("C3_PO_DB_PATH", raising=False)
|
|
159
|
+
|
|
160
|
+
with caplog.at_level(logging.WARNING, logger="c3.db"):
|
|
161
|
+
result = locate_c3_db(start=tmp_path)
|
|
162
|
+
|
|
163
|
+
assert result == valid_db.resolve(), (
|
|
164
|
+
"Directory env path should fall through to parent traversal."
|
|
165
|
+
)
|
|
166
|
+
_assert_fallback_warning(caplog)
|
|
@@ -5,6 +5,7 @@ Tests are organised around the CWD-based activation scheme:
|
|
|
5
5
|
2. CWD inside .claude/worktrees/ + Write inside worktree → exits 0
|
|
6
6
|
3. CWD inside .claude/worktrees/ + Write outside worktree → exits 2 + stderr
|
|
7
7
|
4. Block message sanitizes ANSI escapes in file_path (sec-Low)
|
|
8
|
+
5. env gate: PO_WORKTREE_GUARD 未設定 → no-op (CWD が worktree 内でも exit 0)
|
|
8
9
|
"""
|
|
9
10
|
|
|
10
11
|
from __future__ import annotations
|
|
@@ -206,3 +207,37 @@ def test_block_message_sanitizes_ansi_escapes(tmp_path: Path):
|
|
|
206
207
|
"[sec-Low] Block message must not contain raw ANSI escape sequences. "
|
|
207
208
|
f"stderr preview: {result.stderr[:300]!r}"
|
|
208
209
|
)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
# ---------------------------------------------------------------------------
|
|
213
|
+
# 5. env gate: PO_WORKTREE_GUARD 未設定なら CWD が worktree 内でも no-op
|
|
214
|
+
# ---------------------------------------------------------------------------
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def test_guard_disabled_when_env_not_set(tmp_path: Path):
|
|
218
|
+
"""env 未設定なら CWD が worktree 配下でも no-op (exit 0)。
|
|
219
|
+
|
|
220
|
+
worktree_guard.py L40 の env gate 契約を固定する回帰テスト。
|
|
221
|
+
将来 env gate を外す変更(auto activation のみ)に切り替える場合は
|
|
222
|
+
このテストが落ちることで設計変更を検出する。
|
|
223
|
+
|
|
224
|
+
Note (env gate 廃止移行時):
|
|
225
|
+
env gate を外して CWD ベース自動有効化に切り替える場合は、
|
|
226
|
+
先に本テスト自体を更新(または削除)してから worktree_guard.py 側を変更すること。
|
|
227
|
+
順序を逆にすると本テストが先に落ちて hook の正常な改修と区別できなくなる。
|
|
228
|
+
"""
|
|
229
|
+
worktree = _make_worktree_cwd(tmp_path)
|
|
230
|
+
outside = tmp_path / "outside_file.txt"
|
|
231
|
+
payload = {
|
|
232
|
+
"tool_name": "Write",
|
|
233
|
+
"tool_input": {"file_path": str(outside)},
|
|
234
|
+
}
|
|
235
|
+
result = _run_guard(payload, cwd=str(worktree), enable_guard=False)
|
|
236
|
+
|
|
237
|
+
assert result.returncode == 0, (
|
|
238
|
+
f"Guard must be inactive without PO_WORKTREE_GUARD=1 even with CWD "
|
|
239
|
+
f"inside worktree, got exit={result.returncode}\nstderr: {result.stderr}"
|
|
240
|
+
)
|
|
241
|
+
assert not result.stderr.strip(), (
|
|
242
|
+
f"Inactive guard must produce NO stderr, got: {result.stderr!r}"
|
|
243
|
+
)
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/code-reviewer.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/project-setup.md
RENAMED
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/security-reviewer.md
RENAMED
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/systematic-debugger.md
RENAMED
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/agents/wt_developer.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/docs/platform-adapters.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/consolidate_memory.py
RENAMED
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/permission_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/planner_check.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/recall_inject.py
RENAMED
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/restore_session.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_code_conductor-2.15.1 → claude_code_conductor-2.15.2}/.claude/hooks/session_start.py
RENAMED
|
File without changes
|
|
File without changes
|