← Back to Plugins
Tools

PoggioAI_MSc Openclaw

PoggioAI By PoggioAI ⭐ 1 stars 👁 124 views ▲ 0 votes

Plugin for OpenClaw of PoggioAI/MSc

GitHub

Install

npm install
npm

Configuration Example

{
  "plugins": {
    "pai-msc-openclaw": {
      "enabled": true,
      "config": {
        "consortiumPath": "",
        "condaEnvName": "poggioai-msc",
        "defaultPreset": "max-quality",
        "defaultMode": "local",
        "defaultModel": "claude-opus-4-6",
        "defaultBudgetUsd": 300,
        "progressPollIntervalMs": 15000,
        "steeringBasePort": 5001,
        "uploadTimeoutMs": 60000
      }
    }
  }
}

README

# pAI/MSc-openclaw

Native OpenClaw plugin for the [pAI/MSc](https://github.com/PoggioAI/PoggioAI_MSc) autonomous research pipeline. Transforms a research hypothesis into a conference-grade manuscript with a single command — zero config, zero human steers required.

```
================================================================
  pAI/MSc-openclaw — Autonomous Research Pipeline
================================================================

  Thanks from the PoggioAI Team for using this tool!

  Contact us:
    Discord: https://discord.gg/Pz7spPPY
    Email:   pierb@mit.edu

  Please acknowledge PoggioAI in your papers and cite our
  technical report if you use this tool:
    https://poggioai.github.io/papers/poggioai-msc-v0.pdf

================================================================
```

---

## Quick Start

```
/pai-msc "Investigate whether batch normalization implicitly regularizes the spectral norm of weight matrices in shallow ReLU networks"
```

That's it. The plugin:
1. Auto-installs the pAI/MSc Python backend on first use
2. Passes your existing OpenClaw API keys (no separate `.env` needed)
3. Creates an isolated run workspace with all inputs in `initial_context/`
4. Prompts you for reference files (papers, datasets) via Telegram/interface
5. Injects 25 backtested quality prompts + a 647-line author style guide
6. Runs the full 22-agent pipeline with quality-maximizing defaults
7. Streams progress updates to your chat as stages complete
8. Delivers the finished paper (PDF or markdown) back to you

---

## What's In This Repository

```
├── openclaw.plugin.json              # Plugin manifest — name, version, config schema
├── package.json                      # TypeScript package (build with npm run build)
├── tsconfig.json                     # TypeScript compiler config
├── README.md                         # This file
│
├── src/                              # TypeScript source (3,000+ lines)
│   ├── index.ts                      # Entry point: definePluginEntry() — registers
│   │                                 #   4 commands, 4 tools, 1 background service,
│   │                                 #   and a shutdown hook
│   │
│   ├── commands/                     # User-facing slash commands
│   │   ├── research.ts               # /pai-msc "hypothesis" [flags] — the main entry
│   │   ├── pai-msc-status.ts         # /pai-msc-status — show current stage + budget
│   │   ├── pai-msc-stop.ts           # /pai-msc-stop — kill a running pipeline
│   │   └── pai-msc-list.ts           # /pai-msc-list — list all runs in this session
│   │
│   ├── tools/                        # Agent-callable tools (programmatic access)
│   │   ├── run-pipeline.ts           # pai-msc.runPipeline — start a run
│   │   ├── steer-pipeline.ts         # pai-msc.steerPipeline — inject instructions
│   │   ├── get-results.ts            # pai-msc.getResults — retrieve status + paper
│   │   └── approve-milestone.ts      # pai-msc.approveMilestone — gate responses
│   │
│   ├── services/                     # Core services
│   │   ├── workspace-manager.ts      # Creates per-run workspace with initial_context/,
│   │   │                             #   logs/, uploads/ directories. All run data is
│   │   │                             #   isolated under ~/.openclaw/poggioai-msc/runs/
│   │   ├── upload-handler.ts         # Prompts user for reference files via Telegram/
│   │   │                             #   interface with 3-strategy fallback. Saves to
│   │   │                             #   initial_context/uploads/
│   │   ├── installer.ts              # Auto-install: clone repo → conda env → pip →
│   │   │                             #   patch prompts → preflight check → sentinel
│   │   ├── process-manager.ts        # Spawn Python subprocess with workspace-aware
│   │   │                             #   env. Logs to logs/stdout.log + stderr.log
│   │   ├── progress-poller.ts        # Background service: polls every 15s for stage
│   │   │                             #   changes, budget thresholds, completion/failure.
│   │   │                             #   Also handles the narrative voice hook and
│   │   │                             #   review score escalation.
│   │   └── quality-injector.ts       # Copies backtested prompts + style guide into
│   │                                 #   initial_context/ and paper_workspace/
│   │
│   ├── bridge/                       # Integration layer between plugin and Python backend
│   │   ├── env-passthrough.ts        # Reads API keys from OpenClaw env → writes .env
│   │   ├── config-writer.ts          # Generates .llm_config.yaml from preset + flags
│   │   ├── steering-client.ts        # HTTP client for live steering API
│   │   │                             #   (POST /interrupt, /instruction, GET /status)
│   │   └── result-reader.ts          # Reads run_summary.json, budget_state.json,
│   │                                 #   review_verdict.json, finds paper file
│   │
│   ├── defaults/                     # Configuration defaults
│   │   ├── quality-presets.ts        # QUALITY_MAX and QUALITY_FAST presets with all
│   │   │                             #   CLI flag values pre-configured
│   │   └── stage-names.ts            # 24 pipeline stage constants + human-readable
│   │                                 #   display names for progress messages
│   │
│   └── types/                        # TypeScript type definitions
│       ├── openclaw-api.ts           # OpenClawApi interface + runtime guards
│       ├── pipeline.ts               # RunHandle, PipelineOptions, StageEvent, RunSummary
│       ├── config.ts                 # PluginConfig interface + DEFAULT_CONFIG
│       ├── budget.ts                 # BudgetState, BudgetEntry, BUDGET_THRESHOLDS
│       └── steering.ts              # SteeringInstruction, SteeringStatus, ReviewVerdict
│
├── assets/                           # Quality artifacts (ported from backtested Claude skill)
│   │
│   ├── author_style_guide_default.md # 647-line ML theory writing standard
│   │                                 # Contains: non-negotiable principles, anti-patterns
│   │                                 # (paper/section/sentence/epistemic), abstract rules
│   │                                 # (120-180 words, no theorem refs), related-work rules
│   │                                 # (organize by ideas not authors), concrete lints,
│   │                                 # epistemic lints, deletion pass, self-audit checklist,
│   │                                 # case studies with diagnosis + fix
│   │
│   ├── state_template.json           # Pipeline state machine template (32 fields)
│   │
│   └── prompts/                      # 25 backtested agent prompts
│       ├── 01-persona-practical.md   # Practical Compass persona
│       ├── 02-persona-rigor.md       # Rigor & Novelty persona
│       ├── 03-persona-narrative.md   # Narrative Architect persona
│       ├── 04-persona-synthesis.md   # Synthesis coordinator (min 3 debate rounds)
│       ├── 05-literature-review.md   # Adversarial novelty falsification
│       ├── 06-brainstorm.md          # 3-phase: divergent → convergent → dependency
│       ├── 07-formalize-goals.md     # Goal formalization + track decomposition
│       ├── 08-math-literature.md     # Theory-specific literature search
│       ├── 09-math-proposer.md       # Claim graph construction
│       ├── 10-math-prover.md         # Proof construction with technique library
│       ├── 11-math-verifier.md       # Adversarial proof auditor + numerical checks
│       ├── 12-experiment-design.md   # Experiment design with anti-hallucination
│       ├── 13-experimentation.md     # Experiment execution
│       ├── 14-experiment-verify.md   # Cross-seed stability, verdict annotation
│       ├── 15-formalize-results.md   # Conservative results synthesis
│       ├── 16-duality-check.md       # Dual-lens: actionability + soundness (>= 6/10)
│       ├── 17-resource-prep.md       # Figures, tables, bibliography
│       ├── 18-writeup.md             # 260-line writeup: 12 passes, 2 full edit cycles
│       ├── 19-proofreading.md        # AI-voice detection checklist (9 categories)
│       ├── 20-reviewer.md            # Hard blockers B1-B5, AI voice risk assessment
│       ├── 21-research-plan-writeup.md
│       ├── 22-track-merge.md         # Theory-experiment unified summary
│       ├── 23-verify-completion.md   # 3-way routing: COMPLETE/INCOMPLETE/RETHINK
│       ├── 24-followup-lit-review.md # Gap-specific targeted follow-up
│       └── 25-narrative-voice.md     # Pre-writeup tone/voice guidance
│
├── scripts/
│   ├── install-consortium.sh         # Manual installer (normally auto-runs)
│   └── check-prereqs.sh             # Verify conda, python, pdflatex, API keys
│
└── examples/
    ├── quickstart-task.txt           # Example research hypothesis
    └── custom-style-guide-example.md # How to write a custom style guide
```

---

## How It Works

### The Pipeline

When you run `/pai-msc "hypothesis"`, the plugin orchestrates a 22-agent pipeline:

```
/pai-msc "hypothesis"
  │
  │ ── Plugin Layer ──────────────────────────────────────────────
  │
  ├─ 1. Auto-install pAI/MSc Python backend (first time only)
  ├─ 2. Create isolated run workspace under ~/.openclaw/poggioai-msc/runs/
  ├─ 3. Copy prompts + style guide → initial_context/
  ├─ 4. Write task.txt + pipeline_options.json → initial_context/
  ├─ 5. Prompt user for reference files → initial_context/uploads/
  ├─ 6. Write .env + .llm_config.yaml (per-run, not shared)
  ├─ 7. Spawn: python launch_multiagent.py --resume {workspace} [flags]
  │
  │ ── pAI/MSc Pipeline (Python/LangGraph) ──────────────────────
  │
  ├─ Phase 1: Persona Debate (3-5 rounds)
  │     3 personas (Practical, Rigor, Narrative) debate in escalating
  │     rounds. Each round must be HARDER than the last. Minimum 3
  │     rounds; extends to 5 if any persona still rejects. Synthesis
  │     produce

... (truncated)
tools

Comments

Sign in to leave a comment

Loading comments...