Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- **Research goals = "{{research_goals}}"** - captured from initial discussion
- Focus on technical architecture and implementation research
- Web search is required to verify and supplement your knowledge with current facts
- **DeepWiki MCP** may be available for authoritative repository documentation (optional enhancement)

## YOUR TASK:

Expand Down Expand Up @@ -69,7 +70,101 @@ For **{{research_topic}}**, I will research:
**All claims verified against current public sources.**

**Does this technical research scope and approach align with your goals?**
[C] Continue - Begin technical research with this scope

### 2.5 Framework Integration Mode (Optional DeepWiki Enhancement)

After confirming scope, ask:

"**Does this research involve integrating multiple frameworks or libraries?**

If you're researching how frameworks work together (e.g., Tauri + Next.js, or React + a backend framework), I can query authoritative repository documentation via DeepWiki for verified API signatures and integration patterns.

[Y] Yes - Enable DeepWiki mode for authoritative framework documentation
[N] No - Standard web research is sufficient for this topic"

#### If Y (Enable DeepWiki):

"**Which GitHub repositories should I query?** (Maximum 3 for optimal results)

Format: `owner/repo` (e.g., `tauri-apps/tauri`, `vercel/next.js`)

Enter repositories (comma-separated):"

#### Repository Type Classification (MANDATORY if enabled):

For each provided repository, classify its type based on name patterns:

| Pattern Match | Type | Query Focus |
| ---------------------------------------- | -------------- | -------------------------------------- |
| `shadcn/*`, `shadcn-ui/*`, `radix-ui/*` | `ui-primitive` | Primitives, composition, accessibility |
| `chakra-ui/*`, `mui/*`, `ant-design/*` | `ui-library` | Components, theming, variants |
| `*-ui/*`, `*ui/*` (general) | `ui-library` | Components, props, customization |
| `tauri-apps/*`, `vercel/*`, `electron/*` | `framework` | APIs, protocols, extensions |
| `*auth*`, `*-auth/*` | `auth-library` | Sessions, providers, security |
| Other | `general` | Standard technical queries |

Comment on lines +99 to +105
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern match for shadcn repositories uses shadcn/* and shadcn-ui/*, but the actual shadcn/ui repository is typically referenced as shadcn-ui/ui or shadcn/ui. The pattern should include consideration for the exact repository naming convention. Consider adding documentation or examples that clarify which specific repositories match these patterns, as shadcn/ui is not an organization but a design system where the actual repository might be structured differently.

Suggested change
| `shadcn/*`, `shadcn-ui/*`, `radix-ui/*` | `ui-primitive` | Primitives, composition, accessibility |
| `chakra-ui/*`, `mui/*`, `ant-design/*` | `ui-library` | Components, theming, variants |
| `*-ui/*`, `*ui/*` (general) | `ui-library` | Components, props, customization |
| `tauri-apps/*`, `vercel/*`, `electron/*` | `framework` | APIs, protocols, extensions |
| `*auth*`, `*-auth/*` | `auth-library` | Sessions, providers, security |
| Other | `general` | Standard technical queries |
| `shadcn-ui/ui`, `shadcn-ui/*`, `radix-ui/*` | `ui-primitive` | Primitives, composition, accessibility |
| `chakra-ui/*`, `mui/*`, `ant-design/*` | `ui-library` | Components, theming, variants |
| `*-ui/*`, `*ui/*` (general) | `ui-library` | Components, props, customization |
| `tauri-apps/*`, `vercel/*`, `electron/*` | `framework` | APIs, protocols, extensions |
| `*auth*`, `*-auth/*` | `auth-library` | Sessions, providers, security |
| Other | `general` | Standard technical queries |
> **Note:** The canonical shadcn repository is [`shadcn-ui/ui`](https://github.com/shadcn-ui/ui). There is no `shadcn/ui` repository or `shadcn` organization. Use `shadcn-ui/ui` or other repositories under `shadcn-ui/*` for shadcn-related queries.

Copilot uses AI. Check for mistakes.
Display classification to user:
"**Repository Classification:**
| Repository | Type | Query Focus |
|------------|------|-------------|
| {repo_1} | {type} | {focus_description} |
| {repo_2} | {type} | {focus_description} |

**Note:** UI libraries will receive additional component-focused queries for UX Designer downstream use."

#### DeepWiki Validation (MANDATORY if enabled):

For each provided repository:

1. Call `read_wiki_structure(repo)` to verify indexing
2. If successful: Store repo with `indexed: true`, extract version if available, store `type` classification
3. If fails: Warn user - "⚠️ {repo} is not indexed in DeepWiki. Continue without it? [Y/N]"

Display validation results:
"**DeepWiki Repository Status:**
| Repository | Indexed | Version |
|------------|---------|---------|
| {repo_1} | ✅/❌ | {version} |
| {repo_2} | ✅/❌ | {version} |

**Query Budget:** This session will use approximately {estimated} queries. Maximum recommended: 15 queries."

Comment on lines +130 to +131
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query budget estimation is mentioned as "{estimated} queries" but there's no clear guidance on how to calculate this estimation. Based on the Phase 2 logic (5 queries per repo) and Phase 3.5 logic (5 queries per UI library repo), the estimation formula should be documented. For example, if all 3 repos are queried in Phase 2, that's 15 queries. If cross-reference detection is performed for repo pairs, that could be up to 3 additional queries. If any repos are UI libraries, that's another 5 queries each. The maximum could easily exceed 15 queries, which contradicts the stated maximum.

Suggested change
**Query Budget:** This session will use approximately {estimated} queries. Maximum recommended: 15 queries."
**Query Budget:** This session will use approximately {estimated} queries.
_Query budget estimation formula:_
- 5 queries per repository (Phase 2)
- Plus 5 additional queries for each UI library or UI primitive repository (Phase 3.5)
- Plus up to 1 query per unique pair of repositories for cross-reference detection
_Example:_ For 3 repositories (including 1 UI library), the maximum could be: (3 × 5) + (1 × 5) + (3 pairs × 1) = 23 queries.
**Maximum recommended:** 25 queries per session (soft limit; adjust as needed based on actual repo count and types).

Copilot uses AI. Check for mistakes.
#### DeepWiki Frontmatter Variables:

When DeepWiki is enabled, set:

```yaml
deepwiki_enabled: true
deepwiki_repos:
- repo: 'owner/repo'
indexed: true
version: 'detected or unknown'
type: 'framework|ui-library|ui-primitive|auth-library|general'
deepwiki_query_budget: 15
deepwiki_queries_used: 0
deepwiki_has_ui_repos: true|false # Set true if any repo type is ui-library or ui-primitive
```

#### If N (Standard Research):

Proceed with web-only research:

```yaml
deepwiki_enabled: false
```

### 2.6 Final Scope Confirmation

Present final confirmation with DeepWiki status:

"**Technical Research Configuration:**

✅ Research Topic: {{research_topic}}
✅ Research Goals: {{research_goals}}
✅ Data Sources: Web Search + DeepWiki (if enabled)
✅ DeepWiki Repos: {list or 'None - web only'}

[C] Continue - Begin technical research with this configuration"

### 3. Handle Continue Selection

Expand Down Expand Up @@ -104,6 +199,12 @@ When user selects 'C', append scope confirmation:
- Confidence level framework for uncertain information
- Comprehensive technical coverage with architecture-specific insights

**DeepWiki Configuration:**

- Enabled: {{deepwiki_enabled}}
- Repositories: {{deepwiki_repos or 'None - web research only'}}
- Query Budget: {{deepwiki_query_budget or 'N/A'}}

**Scope Confirmed:** {{date}}
```

Expand All @@ -115,6 +216,10 @@ When user selects 'C', append scope confirmation:
✅ [C] continue option presented and handled correctly
✅ Scope confirmation documented when user proceeds
✅ Proper routing to next technical research step
✅ DeepWiki mode offered for framework integration research
✅ DeepWiki repos validated via read_wiki_structure() before proceeding
✅ Query budget communicated to user
✅ DeepWiki configuration saved to frontmatter

## FAILURE MODES:

Expand All @@ -124,6 +229,10 @@ When user selects 'C', append scope confirmation:
❌ Not presenting [C] continue option
❌ Proceeding without user scope confirmation
❌ Not routing to next technical research step
❌ Enabling DeepWiki without validating repos are indexed
❌ Exceeding 3 repo limit without warning
❌ Not communicating query budget to user
❌ Not saving DeepWiki configuration to frontmatter

❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions
❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file
Expand Down
Loading