Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions Docs/Developer-Guide/technical-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ contributors can map features to code quickly.
- `ModelRouterFacade` resolves provider clients (OpenAI, Anthropic, Google,
X.AI). When credentials are missing it returns a structured error so callers
can decide whether to retry or short-circuit.
- `ZenIntegration` (MCP) now delegates to `ModelRouterFacade.run_consensus`,
re-packaging the payload into a simple dataclass. The integration therefore
shares the same provider availability rules as the core executor.
- MCP functionality (consensus, code review, etc.) is now accessed via Claude
Code's native tools (`mcp__pal__*`, `mcp__rube__*`) instead of custom wrappers.
No Python integration code is needed.
- Tests that need deterministic behaviour register in-memory executors directly
on `ConsensusBuilder`.

Expand Down
6 changes: 3 additions & 3 deletions Docs/Developer-Guide/testing-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ directory (command artefacts, metrics JSONL, etc.). Inspecting those artefacts i
the fastest way to understand failures because they reflect the actual executor
output.

- When API keys are available, `--zen-review` (GPT-5) now becomes the primary
`QualityScorer` evaluator during `--loop`. Tests that stub zen responses should
assert on `QualityDimension.ZEN_REVIEW` metrics or the GPT-provided
- When API keys are available, `--pal-review` (GPT-5) now becomes the primary
`QualityScorer` evaluator during `--loop`. Tests that stub pal responses should
assert on `QualityDimension.PAL_REVIEW` metrics or the GPT-provided
`improvements` list as part of their expectations.
Comment on lines +109 to 112

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Align --pal-review docs with current executor behavior

This paragraph says that --pal-review (GPT-5) becomes the primary QualityScorer evaluator during --loop, and that tests should assert on QualityDimension.PAL_REVIEW. In CommandExecutor._apply_execution_flags, though, PAL review via the --pal-review flag is currently disabled (pal_review_enabled is forced to False and a warning suggests using native MCP tools instead).

Either:

  • Re-enable PAL review in the executor (so the flag actually does what the doc describes), or
  • Clarify here that --pal-review is handled exclusively by PAL/MCP-native tools or by the QualityScorer outside of the Python executor, and adjust expectations accordingly.

Right now the doc over-promises relative to the executor’s behavior.

🤖 Prompt for AI Agents
In Docs/Developer-Guide/testing-debugging.md around lines 109 to 112, the
paragraph currently claims `--pal-review` becomes the primary QualityScorer
during `--loop`, but the Python CommandExecutor forces pal_review_enabled to
False; update the paragraph to accurately state that the `--pal-review` flag is
currently disabled in the Python executor and that PAL review is handled by
PAL/MCP-native tools or by a QualityScorer outside the Python executor, and
instruct tests to assert on PAL/MCP-native outputs (or the GPT-provided
improvements) rather than expecting the Python executor to enable PAL review.

2 changes: 1 addition & 1 deletion Docs/Reference/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Follow these steps when commands do not behave as expected.
## MCP Problems

- Run `python -m SuperClaude.MCP --list` to view enabled servers or
`python -m SuperClaude.MCP --describe zen` for details on a specific adapter.
`python -m SuperClaude.MCP --describe pal` for details on a specific adapter.
- Set `SC_NETWORK_MODE=debug` to capture detailed HTTP traces.
- For Rube automation, confirm `SC_RUBE_API_KEY` is present or switch to dry-run
mode.
Expand Down
6 changes: 3 additions & 3 deletions Docs/User-Guide/mcp-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ have been removed.
- The CLI honours `SC_NETWORK_MODE`. Set it to `offline` to skip network calls,
`online` for full access, or `debug` to log request payloads.
- Server-specific environment variables:
- `SC_ZEN_OFFLINE=1` to force Zen into offline mode (requires manual executor
- `SC_PAL_OFFLINE=1` to force PAL into offline mode (requires manual executor
registration).
- `SC_RUBE_API_KEY` for Rube automation calls and LinkUp web searches.

## 2. Zen Integration (Consensus)
## 2. PAL Integration (Consensus)

- The Zen adapter now uses `ModelRouterFacade.run_consensus`, which means it
- The PAL adapter now uses `ModelRouterFacade.run_consensus`, which means it
requires the same provider executors as the rest of the framework.
- When no executors are available the integration raises `RuntimeError` and the
command fails fast—there is no heuristic fallback.
Expand Down
2 changes: 1 addition & 1 deletion Docs/memory-optimization-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Each milestone will be checked off as the work lands.
- **Core component** installs every Markdown file in `SuperClaude/Core/` (e.g., `RULES_*`, `OPERATIONS.md`, `AGENTS*.md`, `BUSINESS_*`). The heaviest contributors are `OPERATIONS.md`, `WORKFLOWS.md`, `AGENTS_EXTENDED.md`, and the business panel guides (>2 k tokens each).
- **Agents component** copies all top-level persona `.md` files in `SuperClaude/Agents/`, including the extended catalogues and business assistants.
- **Modes component** imports all `MODE_*.md` files even though most sessions only require `MODE_Normal.md` and `MODE_Task_Management.md`.
- **MCP docs** default to installing `MCP_Zen.md`, `MCP_Rube.md`, and `MCP_LinkUp.md`. Their footprint is modest, but they still count toward the memory bundle.
- **MCP docs** default to installing `MCP_Pal.md`, `MCP_Rube.md`, and `MCP_LinkUp.md`. Their footprint is modest, but they still count toward the memory bundle.

### Profile Definitions (current state)

Expand Down
13 changes: 5 additions & 8 deletions Docs/real_integrations_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ current implementation, remaining risks, and optional follow-up experiments.
- **Nice-to-have:** add a smoke test that runs the bootstrap flow inside the
benchmark harness’s virtualenv job.

## Rube MCP Live Mode (`SuperClaude/MCP/rube_integration.py`)
- **Current state:** live HTTP calls include retry with backoff, structured
error propagation, and telemetry tags (`rube_mcp`). Dry-run remains available
via `SC_RUBE_MODE=dry-run`.
- **What to monitor next:** record circuit-breaker metrics once we add provider
rate limits and expose a health summary in `.superclaude_metrics`.
- **Nice-to-have:** ship contract fixtures for partner sandboxes so CI can run
smoke requests when credentials exist.
## Rube MCP (Native Tools)
- **Current state:** MCP functionality is now accessed via Claude Code's native
tools (`mcp__rube__*`). No custom HTTP wrapper is needed.
- **What to monitor next:** usage patterns of native MCP tools in command flows.
- **Nice-to-have:** add command-level telemetry for MCP tool invocations.

## Token Accounting (`SuperClaude/Monitoring/performance_monitor.py`)
- **Current state:** every provider invocation updates cumulative counters and
Expand Down
94 changes: 42 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ classDiagram
+behavior_mode: str
+think_level: int
+loop_enabled: bool
+zen_review_enabled: bool
+pal_review_enabled: bool
}

class CommandResult {
Expand Down Expand Up @@ -514,60 +514,48 @@ graph TB
end
```

#### Rube MCP
#### Rube MCP (Native)

Rube MCP connects 500+ apps for seamless cross-app automation.
Rube MCP connects 500+ apps for seamless cross-app automation via Claude Code's native tools.

```python
from SuperClaude.MCP.rube_integration import RubeIntegration

# Initialize Rube
rube = RubeIntegration({
"endpoint": "https://rube.app/mcp",
"api_key": os.getenv("SC_RUBE_API_KEY"),
"enabled": True
})

# Web search via LinkUp
result = await rube.linkup_search(
query="latest React 19 features",
depth="deep",
output_type="sourcedAnswer"
)

# Batch searches
results = await rube.linkup_batch_search(
queries=["Python 3.13 features", "TypeScript 5.6 changes"],
max_concurrent=4
)
```
# Web search via LinkUp - use mcp__rube__RUBE_MULTI_EXECUTE_TOOL
Use mcp__rube__RUBE_MULTI_EXECUTE_TOOL with:
tools: [{
"tool_slug": "LINKUP_SEARCH",
"arguments": {
"query": "latest React 19 features",
"depth": "deep",
"output_type": "sourcedAnswer"
}
}]
session_id: "<from RUBE_SEARCH_TOOLS>"
memory: {}
```

#### Zen MCP

Zen MCP provides local consensus orchestration and code review.
#### PAL MCP (Native) - Formerly "Zen"

```python
from SuperClaude.MCP.zen_integration import ZenIntegration, ConsensusType

# Initialize Zen
zen = ZenIntegration()
await zen.initialize_session()

# Run consensus
result = await zen.consensus(
prompt="Evaluate this architectural decision",
models=[ModelConfig("gpt-5"), ModelConfig("claude-opus-4.5")],
vote=ConsensusType.weighted,
thinking=ThinkingMode.high
)
PAL MCP provides consensus orchestration and code review via Claude Code's native tools.

# Code review
review = await zen.review_code(
diff=git_diff_content,
files=["src/auth.py", "src/api.py"],
model="gpt-5",
max_issues=10
)
```
# Code review - use mcp__pal__codereview
Use mcp__pal__codereview with:
step: "Review authentication module for security issues"
step_number: 1
total_steps: 2
next_step_required: true
findings: "Initial security scan..."
relevant_files: ["/path/to/auth.py"]
model: "gpt-5.2"

# Multi-model consensus - use mcp__pal__consensus
Use mcp__pal__consensus with:
step: "Evaluate: Should we use REST or GraphQL?"
step_number: 1
total_steps: 3
next_step_required: true
findings: "Analyzing tradeoffs..."
models: [{"model": "gpt-5.2", "stance": "for"}, {"model": "gemini-3-pro", "stance": "against"}]
```

---
Expand Down Expand Up @@ -929,7 +917,7 @@ pie title Agent Distribution
| `--think` | 1-5 | Thinking depth level |
| `--loop` | iterations | Enable quality iteration |
| `--consensus` | majority/unanimous | Consensus strategy |
| `--zen-review` | true/false | Enable GPT-5 code review |
| `--pal-review` | true/false | Enable GPT-5 code review |

### Quality Flags

Expand Down Expand Up @@ -1052,8 +1040,10 @@ SuperClaude/
│ │ └── AGENTS.md # Agent guidelines
│ │
│ ├── MCP/
│ │ ├── rube_integration.py # Rube MCP client
│ │ └── zen_integration.py # Zen consensus
│ │ ├── __init__.py # Native MCP tools reference
│ │ ├── MCP_Rube.md # Rube MCP documentation
│ │ ├── MCP_Zen.md # PAL MCP documentation
│ │ └── MCP_LinkUp.md # LinkUp search documentation
Comment thread
coderabbitai[bot] marked this conversation as resolved.
│ │
│ ├── ModelRouter/
│ │ ├── router.py # Request routing
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: fullstack-developer
description: End-to-end feature owner with expertise across the entire stack. Delivers complete solutions from database to UI with focus on seamless integration and optimal user experience.
tools: Read, Write, MultiEdit, Bash, Docker, database, redis, postgresql, zen
tools: Read, Write, MultiEdit, Bash, Docker, database, redis, postgresql, pal
---

You are a senior fullstack developer specializing in complete feature development with expertise across backend and frontend technologies. Your primary focus is delivering cohesive, end-to-end solutions that work seamlessly from database to user interface.
Expand Down Expand Up @@ -112,7 +112,7 @@ Context acquisition query:
## MCP Tool Utilization
- **database/postgresql**: Schema design, query optimization, migration management
- **redis**: Cross-stack caching, session management, real-time pub/sub
- **zen**: Architecture analysis consensus, risk validation, implementation planning
- **pal**: Architecture analysis consensus, risk validation, implementation planning
- **rube**: Trigger CI/CD pipelines, create tickets, and broadcast deployment status
- **docker**: Full-stack containerization, development environment consistency
- **UnifiedStore**: Session persistence and cross-stack decision logging
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: nextjs-developer
description: Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.
tools: next, vercel, turbo, prisma, zen, npm, typescript, tailwind
tools: next, vercel, turbo, prisma, pal, npm, typescript, tailwind
---

You are a senior Next.js developer with expertise in Next.js 14+ App Router and full-stack development. Your focus spans server components, edge runtime, performance optimization, and production deployment with emphasis on creating blazing-fast applications that excel in SEO and user experience.
Expand Down Expand Up @@ -128,7 +128,7 @@ Testing approach:
- **vercel**: Deployment and hosting
- **turbo**: Monorepo build system
- **prisma**: Database ORM
- **zen**: Architectural reasoning, performance strategy validation
- **pal**: Architectural reasoning, performance strategy validation
- **rube**: Coordinate releases, status updates, and ticket automation
- **npm**: Package management
- **typescript**: Type safety
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: qa-expert
description: Expert QA engineer specializing in comprehensive quality assurance, test strategy, and quality metrics. Masters manual and automated testing, test planning, and quality processes with focus on delivering high-quality software through systematic testing.
tools: Read, Grep, selenium, cypress, postman, jira, testrail, browserstack, zen
tools: Read, Grep, selenium, cypress, postman, jira, testrail, browserstack, pal
---

You are a senior QA expert with expertise in comprehensive quality assurance strategies, test methodologies, and quality metrics. Your focus spans test planning, execution, automation, and quality advocacy with emphasis on preventing defects, ensuring user satisfaction, and maintaining high quality standards throughout the development lifecycle.
Expand Down Expand Up @@ -132,7 +132,7 @@ Security testing:
- **jira**: Defect tracking
- **testrail**: Test management
- **browserstack**: Cross-browser testing
- **zen**: Risk analysis, test strategy refinement
- **pal**: Risk analysis, test strategy refinement
- **rube**: Publish QA gates to external trackers and notify stakeholders
- **UnifiedStore**: QA session persistence and regression insights

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: test-automator
description: Expert test automation engineer specializing in building robust test frameworks, CI/CD integration, and comprehensive test coverage. Masters multiple automation tools and frameworks with focus on maintainable, scalable, and efficient automated testing solutions.
tools: Read, Write, selenium, cypress, pytest, jest, appium, k6, jenkins, zen
tools: Read, Write, selenium, cypress, pytest, jest, appium, k6, jenkins, pal
---

You are a senior test automation engineer with expertise in designing and implementing comprehensive test automation strategies. Your focus spans framework development, test script creation, CI/CD integration, and test maintenance with emphasis on achieving high coverage, fast feedback, and reliable test execution.
Expand Down Expand Up @@ -133,7 +133,7 @@ Reporting and analytics:
- **appium**: Mobile automation
- **k6**: Performance testing
- **jenkins**: CI/CD integration
- **zen**: Automation strategy design, flakiness analysis, pipeline triage
- **pal**: Automation strategy design, flakiness analysis, pipeline triage
- **rube**: Update test management systems and notify stakeholders automatically
- **UnifiedStore**: Persistent automation playbook and regression memory

Expand Down
5 changes: 3 additions & 2 deletions SuperClaude/Agents/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ def _keyword_core_boost(self, agent_name: str, context_lower: str) -> float:
for k in ["performance", "optimize", "slow", "speed up"]
):
boosts += 0.5
except Exception:
pass
except Exception as e:
# Agent scoring calculation error; continue with default score
self.logger.debug(f"Error calculating agent boost for {agent_name}: {e}")
return boosts

def _score_triggers(self, context: str, triggers: List[str]) -> float:
Expand Down
14 changes: 8 additions & 6 deletions SuperClaude/Agents/socratic-mentor.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ persona_triggers:

### MCP Server Coordination
```yaml
zen_integration:
usage_patterns:
- "Consensus-backed Socratic reasoning progressions"
- "Complex discovery session orchestration"
- "Progressive question generation and adaptation"

native_mcp_tools:
pal_consensus:
tool: "mcp__pal__consensus"
usage_patterns:
- "Consensus-backed Socratic reasoning progressions"
- "Complex discovery session orchestration"
- "Progressive question generation and adaptation"

benefits:
- "Maintains logical flow of discovery process"
- "Enables multi-perspective reasoning about user understanding"
Expand Down
Loading
Loading