Skip to content
Merged
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
1 change: 0 additions & 1 deletion .claude-plugin/PLUGIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ cp map-framework/.claude/settings.hooks.json your-project/.claude/

**Recommended MCP Servers:**
- `sequential-thinking` — chain-of-thought reasoning
- `context7` — library documentation
- `deepwiki` — GitHub repository analysis

## Quick Start
Expand Down
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"requirements": {
"claude_code": ">=1.0.0",
"mcp_servers": [
"claude-reviewer",
"sequential-thinking"
"sequential-thinking",
"deepwiki"
]
},
"installation": {
Expand Down
7 changes: 1 addition & 6 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@
"requirements": {
"claude_code_version": ">=1.0.0",
"mcp_servers": [
"claude-reviewer",
"sequential-thinking"
],
"recommended_mcp_servers": [
"context7",
"sequential-thinking",
"deepwiki"
]
},
"features": [
"11 specialized MAP agents (TaskDecomposer, Actor, Monitor, Predictor, Evaluator, Reflector, DocumentationReviewer, Debate-Arbiter, Synthesizer, Research-Agent, Final-Verifier)",
"5 Claude Code hooks for automation (validate-agent-templates, auto-store-knowledge, enrich-context, session-init, track-metrics)",
"10 slash commands (/map-efficient, /map-debug, /map-fast, /map-debate, /map-review, /map-check, /map-plan, /map-release, /map-resume, /map-learn)",
"Professional code review with claude-reviewer MCP",
"Chain-of-thought reasoning with sequential-thinking MCP",
"Semantic pattern search with embeddings cache",
"Cost optimization with per-agent model selection (haiku/sonnet/opus)"
Expand Down
11 changes: 0 additions & 11 deletions .claude/agents/actor.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,12 @@ This enables Synthesizer to extract and resolve decisions across variants.

| Trigger | Tool | Purpose |
|---------|------|---------|
| External library API | context7 | Current documentation |
| Architecture patterns | deepwiki | Production examples |

### Tool Selection Flowchart

```
START → Using external library?
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The flowchart's first decision "START → Using external library?" now only has "NO → Continue" — the "YES" path was removed. This makes the decision node meaningless. Either remove the question or add deepwiki as the replacement "YES" action.

Suggested change
START → Using external library?
START → Using external library?
YES → deepwiki: read_wiki_structure → ask_question

Copilot uses AI. Check for mistakes.
YES → context7: resolve-library-id → get-library-docs
NO → Continue
Need production architecture example?
Expand All @@ -112,7 +110,6 @@ Monitor will validate written code

## Handling MCP Tool Responses

Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The section heading ### context7 / deepwiki Results was removed, leaving an empty line and orphaned body content. Add a proper heading like ### deepwiki Results.

Suggested change
### deepwiki Results

Copilot uses AI. Check for mistakes.
### context7 / deepwiki Results

**Unclear or incomplete docs**:
- Cross-reference with deepwiki for usage examples
Expand All @@ -122,7 +119,6 @@ Monitor will validate written code
**Tool unavailable or timeout**:
```yaml
status: RESEARCH_FALLBACK
tool: context7
fallback: "Using training data (Jan 2025), may need verification"
mitigation: "Added version check, comprehensive tests"
```
Expand All @@ -131,7 +127,6 @@ mitigation: "Added version check, comprehensive tests"

**Library Implementation**:
```
context7: get-library-docs
→ (if architecture unclear) deepwiki: ask_question
→ implement
Comment on lines 130 to 131
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The Library Implementation chaining pattern lost its first step, leaving an orphaned continuation arrow. Restructure the pattern to start properly.

Copilot uses AI. Check for mistakes.
```
Expand All @@ -144,7 +139,6 @@ When multiple sources provide conflicting guidance, follow this priority (highes

1. **Explicit human instruction** in subtask description
2. **Security constraints** (NEVER override)
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The priority numbering jumps from 2 to 4 after removing item 3 ("Research tools"). Should be renumbered, and deepwiki should arguably still be listed in the priority order.

Suggested change
2. **Security constraints** (NEVER override)
2. **Security constraints** (NEVER override)
3. **Project-specific sources** (current repo, deepwiki, internal docs)

Copilot uses AI. Check for mistakes.
3. **Research tools** (context7, deepwiki)
4. **Training data** (fallback)

</Actor_MCP_Protocol>
Expand Down Expand Up @@ -375,7 +369,6 @@ Only include if changes affect:
- [ ] **Dependencies**: Known vulnerabilities checked (if new deps)

### MCP Compliance
- [ ] Research tools used if knowledge gap existed (context7, deepwiki)
- [ ] Fallback documented if tools unavailable

### Output Completeness
Expand Down Expand Up @@ -594,7 +587,6 @@ If all research tools fail:
output:
status: DEGRADED_MODE
limitations:
- "context7: service unavailable"
- "deepwiki: connection refused"
confidence: LOW
approach: "Implementing from training data only"
Expand Down Expand Up @@ -937,12 +929,10 @@ recommendation: "Option 1 - clean solution worth scope expansion"

**Subtask**: "Implement WebSocket reconnection logic"

**Approach**: Exponential backoff reconnection. context7 timed out. Implemented standard pattern with documented fallback.

**Code Changes**:
```typescript
// ===== File: lib/websocket.ts =====
// Standard exponential backoff pattern (context7 unavailable)

export class ReconnectingWebSocket {
private ws: WebSocket | null = null;
Expand Down Expand Up @@ -976,7 +966,6 @@ export class ReconnectingWebSocket {

**Trade-offs**:
- **Decision**: Standard exponential backoff pattern
- **Fallback**: context7 unavailable for socket.io v4 verification
- **Mitigation**: Added comprehensive tests, runtime version check
- **Risk**: May use outdated API - flagged for manual review

Expand Down
6 changes: 0 additions & 6 deletions .claude/agents/documentation-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ You are a technical documentation expert specialized in architecture reviews and

## Optional MCP Tools (with fallbacks)
```
IF mcp__context7__* available:
→ Use for library documentation verification
ELSE:
→ Use Fetch to get raw documentation from official sources
→ Log: "context7 unavailable, using direct fetch"

Comment on lines 110 to 113
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same orphaned content issues as in the template: lines 110-112 have orphaned conditional body, and lines 423-425 have orphaned function parameters from the removed context7 call.

Copilot uses AI. Check for mistakes.
IF mcp__deepwiki__* available:
→ Use for GitHub repository architecture questions
Expand Down Expand Up @@ -409,7 +407,6 @@ For External URL "https://project.io/":
└─ FAILURE (timeout/404/error)
Is known library (npm/pypi/k8s)?
├─ YES → mcp__context7__resolve_library_id → get_library_docs
└─ NO → Mark as "verification_needed", severity per criticality
```

Expand All @@ -423,9 +420,6 @@ Fetch(
)

# 2. Verify library integration
mcp__context7__resolve_library_id(libraryName="kyverno")
mcp__context7__get_library_docs(
context7CompatibleLibraryID="/kyverno/kyverno",
topic="CRD installation and webhook requirements",
tokens=3000
Comment on lines 423 to 424
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Orphaned function parameters from the removed context7 call. Lines 423-425 contain topic= and tokens= parameters with a closing paren that are no longer part of any function call, resulting in broken code in the usage example.

Suggested change
topic="CRD installation and webhook requirements",
tokens=3000
Fetch(
url="https://openreports.io/docs/kubernetes/",
prompt="Verify CRD installation and webhook requirements"

Copilot uses AI. Check for mistakes.
)
Expand Down
6 changes: 0 additions & 6 deletions .claude/agents/evaluator.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ Thought 8: Generate recommendation balancing dimensions
**Thought Structure Example**:
```
Thought 1: Identify knowledge gap areas (post-cutoff APIs, complex algorithms, security patterns)
Thought 2: Check Actor output for research documentation (context7, deepwiki citations)
Thought 3: Evaluate if research was appropriate (did gap require external knowledge?)
Thought 4: Assess implementation correctness against research sources or known patterns
Thought 5: Determine if research omission caused correctness issues (outdated API, wrong algorithm)
Expand All @@ -397,13 +396,11 @@ Thought 7: Generate recommendation with research feedback
**Initial hypothesis**: Completeness 7/10 (has tests, docs), Functionality 8/10 (works)

**Sequential-thinking discovery**:
- **Thought 1**: Next.js Server Actions released April 2023 (post-cutoff) → expect context7 research
- **Thought 2**: No research citations in Approach section → used training data (outdated)
- **Thought 4**: Implementation uses `getServerSideProps` → deprecated in Next.js 13+ (Functionality 6/10, uses old API)
- **Thought 5**: Should use async Server Components pattern → research would have caught this
- **Thought 6**: Completeness 5/10 (missing research step, outdated implementation approach)
- **Consolidated**: Functionality 6/10 (wrong pattern), Completeness 5/10 (no research), Code_quality 7/10 (clear but outdated)
- **Recommendation**: "improve" - use mcp__context7 to get Next.js 14 Server Actions docs, refactor to async Server Components pattern

---

Expand All @@ -425,11 +422,9 @@ Thought 7: Generate recommendation with research feedback

**Value Add**: Sequential-thinking reveals dimension interactions that single-pass evaluation misses, leading to more accurate scores and actionable recommendations that address root trade-offs (not just symptoms).

### 2. mcp__claude-reviewer__get_review_history
**Use When**: Check consistency with past implementations
**Rationale**: Maintain consistent standards (e.g., if past testability scored 8/10, use same criteria). Prevents score inflation/deflation.

### 3. mcp__context7__get-library-docs
**Use When**: Solution uses external libraries/frameworks
**Process**: `resolve-library-id` → `get-library-docs(topics: best-practices, performance, security, testing)`
**Rationale**: Libraries define quality standards (React testing, Django security). Validate solutions follow these.
Comment on lines 425 to 430
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same orphaned content issue as in the template — lines 425-430 have body text from removed sections without headings.

Copilot uses AI. Check for mistakes.
Expand Down Expand Up @@ -648,7 +643,6 @@ Untested code is broken code waiting to happen. Testability indicates design qua
- [ ] Error handling complete?
- [ ] Logging added for debugging?
- [ ] Research performed when appropriate (unfamiliar libraries, complex algorithms)?
- IF subtask requires external knowledge (post-cutoff APIs, production patterns): Did Actor use research tools (context7/deepwiki) OR document skip justification?
- IF research performed: Are sources cited in output (Approach/Trade-offs sections)?
- Research completeness indicates thoroughness and reduces Monitor rejection risk
- [ ] Deployment considerations addressed?
Expand Down
5 changes: 0 additions & 5 deletions .claude/agents/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ Test Code:
→ Verify coverage expectations
```

Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same orphaned content issues as in the template. The ### 1. mcp__claude-reviewer__request_review heading was removed but its body (lines 490-501) remains, and the ### 3. mcp__context7__get-library-docs heading was removed but its body (lines 524-527) remains.

Suggested change
### 1. mcp__claude-reviewer__request_review

Copilot uses AI. Check for mistakes.
### 1. mcp__claude-reviewer__request_review
**Use When**: Reviewing implementation code (ALWAYS use first)
**Parameters**: `summary` (1-2 sentences), `focus_areas` (array), `test_command` (optional)
**Rationale**: AI baseline review + your domain expertise catches more issues
Expand Down Expand Up @@ -522,7 +521,6 @@ Thought N+1: Check for unreachable code or logic gaps
Conclusion: List issues found with line numbers
```

### 3. mcp__context7__get-library-docs
**Use When**: Code uses external libraries/frameworks
**Process**: `resolve-library-id` → `get-library-docs(library_id, topic)`
**Topics**: best-practices, security, error-handling, performance, deprecated-apis
Expand Down Expand Up @@ -627,10 +625,7 @@ Priority 4: Severity

| Short Name | Full MCP Name | Category |
|------------|---------------|----------|
| `request_review` | `mcp__claude-reviewer__request_review` | AI Review |
| `sequentialthinking` | `mcp__sequential-thinking__sequentialthinking` | Analysis |
| `get_library_docs` | `mcp__context7__get-library-docs` | Docs |
| `resolve_library_id` | `mcp__context7__resolve-library-id` | Docs |
| `deepwiki` | `mcp__deepwiki__ask_question` | Docs |
| `glob` | Built-in Glob tool | File |
| `read` | Built-in Read tool | File |
Expand Down
4 changes: 0 additions & 4 deletions .claude/agents/predictor.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ TIER 2 (Standard - 1-2 min):
- Cross-validate results

TIER 3 (Deep - 3-5 min):
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same Tier 3 description issue as in the template — the tool reference line was removed, leaving the tier without specifying which tools to use.

Suggested change
TIER 3 (Deep - 3-5 min):
TIER 3 (Deep - 3-5 min):
└── grep (deep dependency analysis + edge-case search)

Copilot uses AI. Check for mistakes.
└── grep (extended) + deepwiki/context7 as needed
- Cross-validate all results
- Flag disagreements
```
Expand Down Expand Up @@ -218,7 +217,6 @@ Before any analysis, classify the change to select appropriate depth:
2. Classify risk (usually "low")
3. Output JSON with confidence 0.9+

**Skip**: deepwiki, context7

### Tier 2: STANDARD Analysis (1-2 minutes)
**When to use**:
Expand Down Expand Up @@ -399,7 +397,6 @@ Previous analysis identified these concerns:
<rationale>
Impact analysis is about pattern recognition. Similar changes have happened before--renaming APIs, refactoring modules, changing schemas. MCP tools let us learn from history:
- deepwiki shows how mature projects handle similar changes
- context7 validates library version compatibility

Without these tools, we're guessing. With them, we're predicting based on evidence.
</rationale>
Expand Down Expand Up @@ -427,7 +424,6 @@ ALWAYS → Grep/Glob (manual verification)
- Manual search catches edge cases
```

### 1. mcp__context7__get-library-docs
**Use When**: Change involves external library or framework
**Process**:
1. `resolve-library-id` with library name
Comment on lines 427 to 429
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same orphaned content issue as in the template. The ### 1. mcp__context7__get-library-docs heading was removed but lines 427-441 still contain all the body text for the removed section.

Copilot uses AI. Check for mistakes.
Expand Down
7 changes: 0 additions & 7 deletions .claude/agents/reflector.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ You are an expert learning analyst who extracts reusable patterns and insights f
→ sequential-thinking for root cause analysis

2. Error involves library/framework misuse?
→ context7 (resolve-library-id → get-library-docs)

Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Same orphaned content issue as in the template. Decision tree item "2. Error involves library/framework misuse?" at line 29 now has an empty body. Either remove this item or replace the removed context7 action with an appropriate alternative (e.g., → deepwiki for library documentation).

Suggested change
→ deepwiki for library documentation

Copilot uses AI. Check for mistakes.
3. How do production systems handle this?
→ deepwiki (read_wiki_structure → ask_question)
Expand All @@ -40,7 +39,6 @@ You are an expert learning analyst who extracts reusable patterns and insights f
- Query: "Analyze why [error] in [context]. Trace: trigger → conditions → design → principle → lesson"
- Why: Prevents shallow analysis (symptom vs root cause)

**mcp__context7__resolve-library-id + get-library-docs**
- Use when: Library API misuse, verify usage patterns, recommend API changes
- Process: resolve-library-id → get-library-docs with topic
- Why: Ensure current APIs, avoid deprecated patterns
Comment on lines 42 to 44
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Orphaned bullet points after removing the **mcp__context7__resolve-library-id + get-library-docs** heading. Lines 42-44 still contain the body content for the removed context7 tool section without any heading. These should be removed or refactored.

Copilot uses AI. Check for mistakes.
Expand All @@ -51,7 +49,6 @@ You are an expert learning analyst who extracts reusable patterns and insights f
- Why: Ground recommendations in battle-tested patterns

<critical>
**ALWAYS**: Use sequential-thinking for complex failures, verify library usage with context7
**NEVER**: Skip MCP tools, suggest APIs without verifying docs
</critical>

Expand Down Expand Up @@ -93,7 +90,6 @@ Execute frameworks in this sequence:
┌─────────────────────────────────────────────────────────────┐
│ 1. MCP TOOLS (First - before analysis) │
│ - sequential-thinking (IF complex failure) │
│ - context7 (IF library/API issue) │
├─────────────────────────────────────────────────────────────┤
│ 2. CLASSIFICATION (Pattern Extraction Step 1) │
│ Output: SUCCESS | FAILURE | PARTIAL │
Expand Down Expand Up @@ -356,7 +352,6 @@ IF sequential-thinking exceeds 2 minutes:
→ Flag in reasoning: "Analysis incomplete due to complexity"
→ Recommend: "Break into sub-problems for future reflection"

IF context7 cannot resolve library:
→ Fall back to deepwiki for community documentation
→ Note: "Official docs unavailable, used community sources"
Comment on lines 355 to 356
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Orphaned fallback text. The IF context7 cannot resolve library: condition was removed, but its body remains as dangling text inside the code block.

Copilot uses AI. Check for mistakes.
```
Expand Down Expand Up @@ -757,7 +752,6 @@ Use {{language}}/{{framework}} syntax. Show specific library, configuration, exp

## What Reflector ALWAYS Does

- Use MCP tools (sequential-thinking for complex cases, context7 for libraries)
- Perform 5 Whys root cause (beyond symptoms)
- Include code examples (5+ lines, incorrect + correct)
- Ground in {{language}}/{{framework}} (specific syntax)
Expand All @@ -776,7 +770,6 @@ Reflector's job is learning, not doing. Generic advice is unmemorable. Shallow a

Before outputting:

- [ ] MCP Tools: Used sequential-thinking for complex cases? context7 for library issues?
- [ ] JSON: All fields? No markdown blocks?
- [ ] Length: reasoning≥200, root_cause≥150, key_insight≥50?
- [ ] Code: 5+ lines showing incorrect + correct?
Expand Down
1 change: 0 additions & 1 deletion .claude/commands/map-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ This is **completely optional**. Run it when debugging patterns are valuable for
## MCP Tools for Debugging

- `mcp__sequential-thinking__sequentialthinking` - Complex root cause analysis
- `mcp__context7__get-library-docs` - Check library documentation for known issues
- `mcp__deepwiki__ask_question` - Learn from how others solved similar issues

## Critical Constraints
Expand Down
Loading