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
21 changes: 3 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
groupthinking-patch-3
# To get started with Dependabot version updates, you'll need to specify which
master
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
groupthinking-patch-3
- package-ecosystem: "" # See documentation for possible values

groupthinking-patch-2
- package-ecosystem: "" # See documentation for possible values

- package-ecosystem: "pip"
directory: "/" # Location of package manifests
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/frontend" # Location of package manifests
directory: "/frontend"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
master
master
directory: "/" # Location of package manifests
directory: "/"
schedule:
interval: "weekly"
39 changes: 39 additions & 0 deletions .github/skills/codebase-summary/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: codebase-summary
description: Generate a repo-specific map of self-correcting-executor, including the tree, key dependencies, and MCP verification steps. Use this when asked to summarize the architecture or prepare an agent run for this repository.
---

When asked to summarize or orient an agent in this repository, use the current
repo structure instead of generic MCP examples.

1. Start from the current repository root (`git rev-parse --show-toplevel`).
2. Build the summary around these directories:
- `agents/`
- `connectors/`
- `mcp_server/`
- `protocols/`
- `frontend/`
- `tests/`
3. Call out the primary dependency sources:
- `requirements.txt`
- `requirements-ci.txt`
- `requirements-test.txt`
- `frontend/package.json`
4. When MCP is relevant, explicitly distinguish:
- **host**: external Copilot/CLI/operator
- **client**: external MCP-aware caller
- **server**: the repo's implementations in `mcp_server/` and
`quantum_mcp_server/`
5. Use the in-process handler checks before reporting that baseline as verified:

```bash
cd "$(git rev-parse --show-toplevel)"
python -m scripts.verify_mcp_baseline
python -m pytest tests/test_mcp_baseline_verifier.py -q
```

These checks exercise the custom handler in-process; they do not verify
an external MCP client/transport connection.

6. Point the reader to `docs/REPO_MAP.md` for the maintained tree, mermaid
diagram, dependency snapshot, workflow checklist, and CI/MCP notes.
43 changes: 43 additions & 0 deletions .github/skills/github-actions-failure-debugging/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: github-actions-failure-debugging
description: Guide for debugging failing GitHub Actions workflows in self-correcting-executor. Use this when asked to investigate Python CI, Frontend CI, or PR workflow failures in this repository.
---

Use GitHub MCP tools first, then reproduce locally with the repo's existing
commands.

1. List recent workflow runs for `groupthinking/self-correcting-executor`.
Focus on:
- `.github/workflows/python-ci.yml`
- `.github/workflows/frontend-ci.yml`
2. Get job logs for the failed run or failed jobs.
3. Interpret the result against this repo's workflow behavior:
- `python-ci.yml` runs `black --check .`
- `python-ci.yml` runs pytest as a blocking step. Its existing `flake8`
step remains advisory via `|| echo ...` and `continue-on-error`, so a
green workflow does not establish a lint-clean repository.
- `frontend-ci.yml` runs `npm ci || npm install`, then lint/test/build from
`/frontend`
4. Reproduce only the relevant local command:

```bash
cd "$(git rev-parse --show-toplevel)"
python -m pytest tests/ -q
cd "$(git rev-parse --show-toplevel)/frontend"
npm run lint
npm run build
```

5. If the failure touches MCP behavior, also run the repo's in-process MCP handler checks:

```bash
cd "$(git rev-parse --show-toplevel)"
python -m scripts.verify_mcp_baseline
python -m pytest tests/test_mcp_baseline_verifier.py -q
```

These checks exercise the custom handler in-process; they do not verify
an external MCP client/transport connection.

6. Keep fixes surgical. Do not "clean up" unrelated files just because the
workflow surfaced pre-existing noise.
3 changes: 1 addition & 2 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
run: flake8 . || echo "Flake8 found issues but continuing CI"
continue-on-error: true
- name: Run tests with coverage
run: pytest --cov=. || echo "Tests failed but continuing CI"
continue-on-error: true
run: pytest --cov=.

actions:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ Open http://localhost:8080/health to verify the API is running.

## Development

The workspace includes a **DevContainer** definition – simply open the folder in VS Code or Cursor and choose *Reopen in Container* to get an IDE connected to the running services.
The workspace includes a **DevContainer** definition – simply open the folder in VS Code or Cursor and choose *Reopen in Container* to get an IDE connected to the running services.

## Repo assist

For a repo-specific map of the current tree, dependency snapshot, mermaid
architecture diagram, MCP capability-verification notes, and agent workflow
checklist, see [`docs/REPO_MAP.md`](docs/REPO_MAP.md).
185 changes: 185 additions & 0 deletions docs/REPO_MAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Repo Map, MCP Verification, and Agent Workflow Checklist

This repository mixes agent orchestration, MCP servers, connectors, protocols,
and a small frontend. This document makes the issue's requested "repo assist"
material specific to `groupthinking/self-correcting-executor` so an agent can
map the repo, verify the MCP handler in-process, and decide what to check before
commit/merge.

## Repo tree (focused map)

```text
self-correcting-executor/
├── agents/ # A2A framework, executor, mutator, MCP integrations
│ ├── a2a_framework.py
│ ├── a2a_mcp_integration.py
│ ├── executor.py
│ ├── mutator.py
│ ├── specialized/
│ └── unified/
├── analyzers/ # Pattern analysis helpers
├── auth/ # Auth helpers
├── config/ # MCP and component configuration
├── connectors/ # D-Wave, GitHub, LLM, xAI, MCP base connectors
├── docs/ # Architecture, planning, and task guides
├── fabric/ # State continuity and integrated MCP fabric
├── frontend/ # Vite + React UI
├── llm/ # Continuous learning system
├── mcp_runtime_template_hg/ # SDK/API/CLI MCP runtime template
├── mcp_server/ # JSON-RPC MCP server + FastMCP-backed server
├── middleware/ # Security middleware
├── protocols/ # Executable protocols/tasks
├── quantum_mcp_server/ # Quantum-focused MCP server variant
├── scripts/ # Setup, compliance, cleanup, security scripts
├── test_data/ # Real input fixtures used by tests/scripts
├── tests/ # Pytest suite
├── ui/ # Additional UI assets and guide content
└── utils/ # Shared logging and DB tracking
```

## Dependency snapshot

- Python runtime dependencies: `requirements.txt` currently pins **117**
packages, including `mcp`, `mcp-use`, FastAPI, D-Wave Ocean SDK, LangChain,
SQLAlchemy, Redis, and transformer-related packages.
- CI/test dependencies: `requirements-ci.txt` contains the lightweight
verification stack (`black`, `flake8`, `pytest`, `pytest-cov`,
`pytest-asyncio`) plus the MCP, NumPy, and PostgreSQL imports needed by
the collected tests. MCP/Pydantic match the production compatibility pair.
- Frontend runtime dependencies: `frontend/package.json` currently declares
**7** runtime packages (`react`, `react-dom`, `@tanstack/react-query`,
`axios`, `framer-motion`, `lucide-react`, `three`) and **12** dev
dependencies for TypeScript, ESLint, and Vite.

## Mermaid diagram

```mermaid
flowchart TD
H[Host / Copilot / operator]
O[orchestrator.py<br/>orchestrator_mapreduce.py]

subgraph Servers[MCP servers]
M1[mcp_server/main.py<br/>custom JSON-RPC MCPServer]
M2[mcp_server/real_mcp_server.py<br/>FastMCP tool server]
M3[quantum_mcp_server/]
end

subgraph Tools[Declared MCP tools]
T1[code_analyzer]
T2[protocol_validator]
T3[self_corrector]
end

subgraph Connectors[Connectors]
C1[github_mcp_connector.py]
C2[dwave_quantum_connector.py]
C3[llm_connector.py]
C4[xai_connector.py]
end

subgraph Tasks[protocols/*.py]
P1[data_processor]
P2[file_validator]
P3[database_health_check]
P4[system_monitor]
end

H --> O
M1 --> T1
M1 --> T2
M1 --> T3
M2 --> C2
M2 --> P1
O --> Tasks
Tasks --> P1
Tasks --> P2
Tasks --> P3
Tasks --> P4
```

The MCP servers are separate entrypoints; no direct orchestrator-to-server
call is implied. `real_mcp_server.py` imports the D-Wave connector and the
data processor. Other connectors are shown as repository components, not
as dependencies of that server.

## Agentic workflow checklist for this repo

- [x] **Agents**: `agents/a2a_framework.py`, `agents/a2a_mcp_integration.py`,
and `agents/unified/` contain agent coordination logic.
- [x] **Tools**: `mcp_server/main.py` declares `code_analyzer`,
`protocol_validator`, and `self_corrector`.
- [x] **MCP**: the repo is actively using MCP packages and MCP-shaped servers
(`mcp_server/main.py`, `mcp_server/real_mcp_server.py`,
`config/mcp_config.py`, `connectors/mcp_base.py`).
- [x] **Pull / push / request / commit / merge**: human workflows use GitHub
pull requests; cloud-agent workflows in this repo should publish progress
via PR updates instead of pushing directly from the sandbox.
- [x] **Issues**: link changes back to GitHub issues with `Closes #<number>`.
- [x] **Code**: the main test entrypoint is `pytest` with `pytest.ini`
configured to use `tests/`.
- [x] **Deps**: Python dependencies live in `requirements*.txt`; frontend
dependencies live in `frontend/package.json`.
- [x] **Database**: DB-aware execution paths are visible in `utils/db_tracker.py`
and `protocols/database_health_check.py`.
- [x] **Actions**: `.github/workflows/python-ci.yml` and
`.github/workflows/frontend-ci.yml` define CI.
- [x] **Role assignment / security**: `auth/` and `middleware/` contain auth
and security logic.

## MCP baseline: is this repo using MCP?

Yes. The repository is using MCP in two forms:

1. A custom JSON-RPC server in `mcp_server/main.py`
with explicit MCP methods such as `initialize`, `tools/list`, `tools/call`,
`resources/list`, and `resources/read`.
2. A FastMCP-based server in `mcp_server/real_mcp_server.py`
built on the `mcp` package.

The custom handler advertises protocol version `2024-11-05`. Direct calls
can verify its advertised tool and resource behavior, but do not establish
MCP specification compliance or successful transport negotiation with an
external host/client. Those require a separate integration test.

### Host / client / server mapping for this repo

- **Host**: external agent host (for example Copilot, CLI, or another MCP-aware
operator) orchestrates requests and permissions.
- **Client**: the MCP-aware caller is external to this repo; this repo does not
ship a standalone client implementation.
- **Server**: this repo implements the server side in `mcp_server/` and
`quantum_mcp_server/`.

## Live verification steps

The focused verifier calls the custom handler in-process. It asserts the
initialize response, the advertised/listed tool names, and the actual
`code_analyzer` result. Any JSON-RPC error, missing capability or incorrect
analysis raises an exception and makes the command exit unsuccessfully.
This proves the handler behavior, not an external MCP transport connection.

From any directory inside the checkout:

```bash
cd "$(git rev-parse --show-toplevel)"
python -m scripts.verify_mcp_baseline
python -m pytest tests/test_repo_assist_docs.py tests/test_mcp_baseline_verifier.py -q
```

## CI baseline observed from GitHub Actions

- The repo has active `Python CI` and `Frontend CI` workflows.
- `Python CI` runs `black --check .` as a blocking step. Inspect the current
head's logs; a previous run's result is not evidence for a new commit.
- `pytest --cov=.` is blocking: collection failures and failed assertions fail
the matrix job. `flake8` remains advisory in the existing workflow, so a
green workflow alone does not prove the repository is free of lint findings.

## Skills added for this repo

Project-scoped skills now live under `.github/skills/`:

- `github-actions-failure-debugging`: tailored to the repo's Python/Frontend CI
workflows and GitHub MCP debugging flow.
- `codebase-summary`: tailored to this repo's tree mapping, dependency checks,
and MCP verification workflow.
Loading
Loading