Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .codex-os/product/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repo_ref: main@d151479
# 2. Product Context
- Decisions log (2025-10-17, 2025-10-25, 2025-10-26) documents MCP consolidation, UnifiedStore adoption, and stricter `requires_evidence` handling, but no mission/roadmap docs exist locally.
- Intended users are Claude Code operators who need verifiable diffs with offline guarantees; success metrics would center on executed vs plan-only rates, loop iterations required, and quality scores.
- Constraints: offline mode by default, limited MCP roster (Sequential, Zen, Deepwiki), reliance on git/git tests for evidence, and absence of networked verification.
- Constraints: offline mode by default, limited MCP roster (Sequential, PAL, Deepwiki), reliance on git/git tests for evidence, and absence of networked verification.

# 3. Architecture Overview
- **Entry:** `/sc:` commands parsed via registry metadata (`SuperClaude/Commands/registry.py`) and executed through `CommandExecutor`.
Expand Down
2 changes: 1 addition & 1 deletion .codex-os/product/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## 2025-10-25 – MCP Simplification & UnifiedStore
- **Context:** Maintaining six local MCP stubs created redundant documentation, extra configuration, and brittle command dependencies. Serena’s JSON persistence also diverged from the desired SQLite-backed storage.
- **Decision:** Retire Context7, Magic, MorphLLM, Playwright, and Serena MCP integrations. Introduce the `UnifiedStore` SQLite backend with a migration helper, and update commands/modes/docs to rely on Sequential, Zen, and Deepwiki only.
- **Decision:** Retire Context7, Magic, MorphLLM, Playwright, and Serena MCP integrations. Introduce the `UnifiedStore` SQLite backend with a migration helper, and update commands/modes/docs to rely on Sequential, PAL, and Deepwiki only.
- **Consequences:** MCP registry, installer components, and command playbooks now reference a minimal, actively-supported toolset. Session persistence flows through UnifiedStore, and automated tests cover the new storage path (`tests/test_worktree_state.py`).

## 2025-10-25 – Auto-Stub Hygiene & Agent Telemetry
Expand Down
2 changes: 1 addition & 1 deletion .codex-os/product/fast-codex-execution-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 0. Context
- Suggestion: extend `/sc:implement` with a streamlined `--fast-codex` flag that keeps the existing command executor but runs a simplified persona and validation path.
- Motivation: reduce friction for routine edits while preserving guardrails such as evidence capture, MCP activation, and telemetry hooks.
- Constraints: offline-first operation, limited MCP roster (Zen + sequential stubs), `requires_evidence` guardrail must remain intact, and docs/tests must stay aligned with `.codex-os` standards.
- Constraints: offline-first operation, limited MCP roster (PAL + sequential stubs), `requires_evidence` guardrail must remain intact, and docs/tests must stay aligned with `.codex-os` standards.
- Assumptions: command metadata remains YAML front matter, executor logic is centralized in `SuperClaude/Commands/executor.py`, and consensus policies live in `SuperClaude/Config/consensus_policies.yaml`.

## 1. Goals & Success Metrics
Expand Down
2 changes: 1 addition & 1 deletion .codex-os/product/hallucination-mitigation-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 0. Context
- Source analysis: `.codex-os/product/analysis.md` (2025-10-27).
- Target outcomes: Reduce plan-only completions, ensure consensus uses real ensembles, surface hallucination regressions within CI/observability, and ground agent outputs with verifiable evidence.
- Constraints: Offline-first runtime, limited MCP roster (Sequential, Zen, Deepwiki), rely on git evidence and local tests.
- Constraints: Offline-first runtime, limited MCP roster (Sequential, PAL, Deepwiki), rely on git evidence and local tests.

## 1. Goals & Success Metrics
- **G1 – Reliable consensus:** All `requires_evidence` commands succeed only after multi-model agreement.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
setup CLI against regressions when file lists change.

### Changed
- Removed Context7, Magic, MorphLLM, Playwright, Serena, and Deepwiki MCP integrations; streamlined registry to Sequential and Zen.
- Removed Context7, Magic, MorphLLM, Playwright, Serena, and Deepwiki MCP integrations; streamlined registry to Sequential and PAL.
- Updated commands, modes, docs, and agents to reference UnifiedStore and remaining MCP servers.
- Simplified installer components and MCP documentation to match current server lineup.
- Core and Modes installer components now persist the selected profile, expanded file manifests,
Expand Down
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.
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
21 changes: 21 additions & 0 deletions Docs/User-Guide/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ and the artefacts they generate.
guardrails.
- `--delegate <agent>`: Pin execution to a specific agent.
- `--loop`: Allow iterative agent hand-offs until success criteria are met.
- `--pal-review`: Request PAL code review after changes are applied.

## PAL Review Integration

When the `--pal-review` flag is used, the executor signals that a code review
should be performed. The review is handled by Claude invoking the native MCP
tool `mcp__pal__codereview` after the Python executor completes.

**Workflow:**
1. Command executes with `--pal-review` flag
2. Executor applies changes and sets `pal_review_signal` in results
3. Claude reads the signal and invokes `mcp__pal__codereview`
4. Review feedback is incorporated before task completion

**Example:**
```
/sc:implement refactor auth module --pal-review
```

This pattern enables the full Plan→Act→Review→Refine loop while respecting
the architecture where MCP tools are invoked at the conversation level.

See the individual command modules under `SuperClaude/Commands/` for extended
options and YAML front matter describing required context.
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
108 changes: 49 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SuperClaude is a sophisticated AI orchestration framework that enhances Claude C
- **100+ Specialized Agents**: From backend architects to security auditors
- **Behavioral Modes**: Normal, Task Management, Token Efficiency, Orchestration
- **Quality Validation**: Multi-stage pipelines with syntax, security, and performance checks
- **MCP Server Integration**: Rube (web/app automation), Zen (consensus), LinkUp (web search)
- **MCP Server Integration**: Rube (web/app automation), PAL (consensus), LinkUp (web search)

```mermaid
graph TB
Expand All @@ -58,7 +58,7 @@ graph TB

Executor --> MCP[MCP Integrations]
MCP --> Rube[Rube MCP]
MCP --> Zen[Zen MCP]
MCP --> PAL[PAL MCP]

Executor --> Quality[Quality Pipeline]
Quality --> Validation[Validation Stages]
Expand Down Expand Up @@ -107,7 +107,7 @@ flowchart TB
API_G[Google]
API_X[xAI]
MCP_R[Rube MCP]
MCP_Z[Zen MCP]
MCP_P[PAL MCP]
end

subgraph Storage["Storage & State"]
Expand Down 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 @@ -495,7 +495,7 @@ graph TB
Executor[Command Executor]

Executor --> RubeInt[Rube Integration]
Executor --> ZenInt[Zen Integration]
Executor --> PALInt[PAL Integration]

subgraph "Rube MCP"
RubeInt --> Tools[500+ App Tools]
Expand All @@ -506,68 +506,56 @@ graph TB
Tools --> LinkUp[LinkUp Search]
end

subgraph "Zen MCP"
ZenInt --> Consensus[Consensus Engine]
subgraph "PAL MCP"
PALInt --> Consensus[Consensus Engine]
Consensus --> Review[Code Review]
Review --> GPT5[GPT-5 Analysis]
end
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 @@ -839,7 +827,7 @@ SuperClaude integrates with Claude Code via `CLAUDE.md` configuration files:

# MCP Documentation
@SuperClaude/Core/MCP_Rube.md
@SuperClaude/Core/MCP_Zen.md
@SuperClaude/Core/MCP_Pal.md
```

### Project-Level Configuration
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_Pal.md # PAL MCP documentation
β”‚ β”‚ └── MCP_LinkUp.md # LinkUp search documentation
β”‚ β”‚
β”‚ β”œβ”€β”€ ModelRouter/
β”‚ β”‚ β”œβ”€β”€ router.py # Request routing
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ For organizations requiring extended security support:

**Individual Server Security:**

**Zen**: Consensus orchestration with deterministic validation paths
**PAL**: Consensus orchestration with deterministic validation paths
**Rube**: Automation hub with scoped OAuth delegation and dry-run defaults
**Browser**: Local Chromium bridge with sandboxed automation and credential gating
**UnifiedStore**: Session persistence with secure local storage and access controls
Expand Down
Loading