You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(plugin): improve cowork mode with CLAUDE_CODE_IS_COWORK detection and Explore subagents
Detect cowork mode via CLAUDE_CODE_IS_COWORK env var instead of just
checking for git repo presence. Add local folder option for devs who
already have the repo cloned, with clone-from-URL fallback for product
folk. Support gh/glab auth and home dir credential passthrough for
private repos. Delegate all codebase exploration to Explore subagents
to keep the main elaboration context focused on user conversation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: plugin/skills/elaborate/SKILL.md
+39-11Lines changed: 39 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,13 +57,43 @@ Then you'll write these as files in `.ai-dlc/{intent-slug}/` for the constructio
57
57
58
58
Before any elaboration, verify the working environment:
59
59
60
-
1. Check if you are in a git repository: `git rev-parse --git-dir`
61
-
2. If **yes**: proceed to Phase 0 (Existing Intent Check) below.
62
-
3. If **no** (cowork mode):
63
-
a. **Get the repo URL** — Ask the user: "What repository should this work target?" If VCS MCP tools are available (e.g., GitHub MCP), offer discovered repos as options.
64
-
b. **Clone immediately**: `git clone <url> /tmp/ai-dlc-workspace-<slug>/`
65
-
c. **Enter the clone**: `cd /tmp/ai-dlc-workspace-<slug>/`
66
-
d. **Proceed normally** — The clone has `.ai-dlc/settings.yml`, providers config, and all project context. No special cowork paths needed from this point forward.
- If not a valid git repo: tell the user and re-ask.
86
+
c. **If clone from URL**:
87
+
- Ask the user: "What repository should this work target?" If VCS MCP tools are available (e.g., GitHub MCP), offer discovered repos as options.
88
+
- Clone directly — the user's home directory credentials (SSH keys, git credential helpers, `gh`/`glab` auth) are typically available:
89
+
```bash
90
+
WORKSPACE="/tmp/ai-dlc-workspace-<slug>"
91
+
git clone <url> "$WORKSPACE" 2>&1
92
+
```
93
+
- **If clone fails** (authentication error, permission denied) — tell the user the clone failed and show the error output. Ask them to ensure their git credentials are configured (e.g., SSH keys in `~/.ssh`, `gh auth login`, `glab auth login`, or a git credential helper) and to grant the cowork session access to their home directory if they haven't already. Then retry once.
94
+
- If it still fails, surface the error clearly and let the user troubleshoot. Do not loop.
95
+
- **Enter the clone**: `cd "$WORKSPACE"`
96
+
d. **Proceed normally** — from this point the working directory is a git repo with `.ai-dlc/settings.yml`, providers config, and all project context. No special cowork paths needed.
67
97
68
98
**Key principle:** Cloning the repo eliminates the cowork problem surface. Once cloned, all hooks, config loading, and provider discovery work identically to being in a real repo.
69
99
@@ -165,7 +195,7 @@ Based on what the user described in Phase 2, identify every relevant technical s
165
195
166
196
1.**APIs and Schemas**: If the intent involves an API, query it. Run introspection queries. Read the actual schema. Map every type, field, query, mutation, and subscription. Don't guess what data is available — verify it.
167
197
168
-
2.**Existing Codebases**: If the intent builds on or integrates with existing code, read it. Use `Glob` and `Grep` to find relevant files. Read source code, not just file names. Understand existing patterns, conventions, and architecture.
198
+
2.**Existing Codebases**: If the intent builds on or integrates with existing code, explore it via Explore subagents. Have them find relevant files, read source code, and report back on existing patterns, conventions, and architecture.
169
199
170
200
3.**Data Sources**: If the intent involves data, understand where it lives. Query for real sample data. Understand what fields are populated, what's empty, what's missing. Identify gaps between what's available and what's needed.
171
201
@@ -205,11 +235,9 @@ Task({
205
235
206
236
3.**Web research for external context**: Use `WebSearch` for library docs, design patterns, API references, prior art. Use `WebFetch` to read specific documentation pages.
207
237
208
-
4.**Direct exploration**: Use `Read`, `Glob`, `Grep`, and `Bash` (for curl, CLI tools, introspection queries) directly when you know what you're looking for.
209
-
210
238
**Spawn multiple research paths in parallel.** Don't serialize explorations that are independent — launch all of them at once and synthesize when results return.
211
239
212
-
If a VCS MCP is available (e.g., GitHub MCP), use it for code browsing alongside or instead of local `Glob`/`Grep`.
240
+
If a VCS MCP is available (e.g., GitHub MCP), use it for code browsing alongside or instead of local file tools.
0 commit comments