$npx -y skills add Ar9av/PaperOrchestra --skill agent-research-aggregatorPre-pipeline aggregator that scans AI agent cache directories (.claude, .cursor, .antigravity, .openclaw) or any user-specified directory for experimentation logs, extracts insights and numeric results, and formats them as PaperOrchestra-ready inputs (idea.md + experimental_log.m
| 1 | # agent-research-aggregator |
| 2 | |
| 3 | --- |
| 4 | |
| 5 | ## Should I run? (decision gate) |
| 6 | |
| 7 | Before starting Phase 1, check whether aggregation is actually needed: |
| 8 | |
| 9 | | Situation | Action | |
| 10 | |---|---| |
| 11 | | `workspace/inputs/idea.md` **and** `workspace/inputs/experimental_log.md` both exist and are non-empty | **Skip this skill entirely.** Proceed directly to `paper-orchestra`. | |
| 12 | | Either file is missing or empty, **and** the user provided a directory path | **Run this skill** with that directory as `--search-roots`. | |
| 13 | | Either file is missing or empty, **and** no directory was provided | Scan cwd and `~` by default; show the discovery summary to the user before continuing. | |
| 14 | | The inputs exist but look thin (e.g. idea.md has < 5 lines, no numeric data in experimental_log.md) | **Ask the user** whether to supplement with aggregation or proceed as-is. | |
| 15 | |
| 16 | The skill is intentionally a pre-pass — it is cheap to skip and should only run when the structured inputs don't already exist. |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | A pre-processing skill for PaperOrchestra (arXiv:2604.05018). Reads scattered |
| 21 | experimentation artifacts from AI coding-agent cache directories and synthesizes |
| 22 | them into the structured `(I, E)` input pair the PaperOrchestra pipeline expects. |
| 23 | |
| 24 | ``` |
| 25 | [.claude/] [.cursor/] [.antigravity/] [.openclaw/] |
| 26 | │ │ │ │ |
| 27 | └────────────┴──────────────┴───────────────┘ |
| 28 | │ |
| 29 | Phase 1: Discovery |
| 30 | (discover_logs.py) |
| 31 | │ |
| 32 | discovered_logs.json |
| 33 | │ |
| 34 | Phase 2: Extraction |
| 35 | (LLM call per log batch) |
| 36 | │ |
| 37 | raw_experiments.json |
| 38 | │ |
| 39 | Phase 3: Synthesis |
| 40 | (LLM call — consolidate) |
| 41 | │ |
| 42 | synthesis.json |
| 43 | │ |
| 44 | Phase 4: Formatting |
| 45 | (format_po_inputs.py) |
| 46 | │ |
| 47 | ┌────────────┴────────────┐ |
| 48 | workspace/inputs/ workspace/ara/ |
| 49 | idea.md aggregation_report.md |
| 50 | experimental_log.md discovered_logs.json |
| 51 | raw_experiments.json |
| 52 | synthesis.json |
| 53 | ``` |
| 54 | |
| 55 | The output drops directly into `workspace/inputs/` so the user can immediately |
| 56 | run `paper-orchestra` on the same workspace. |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Inputs |
| 61 | |
| 62 | | Parameter | Required | Default | Description | |
| 63 | |---|---|---|---| |
| 64 | | `--search-roots` | no | cwd, `~` | Comma-separated directories to scan for agent caches | |
| 65 | | `--agents` | no | all | Comma-separated subset: `claude,cursor,antigravity,openclaw` | |
| 66 | | `--workspace` | no | `./workspace` | PaperOrchestra workspace root | |
| 67 | | `--depth` | no | 4 | Max directory scan depth (prevents runaway scans on large home dirs) | |
| 68 | | `--since` | no | none | Only include logs modified after this date (ISO 8601: `2025-01-01`) | |
| 69 | |
| 70 | The user specifies these when invoking the skill, or you may ask them for |
| 71 | `--search-roots` if the current directory has no detectable agent caches. |
| 72 | |
| 73 | --- |
| 74 | |
| 75 | ## Phase 1 — Discovery (deterministic) |
| 76 | |
| 77 | Run the discovery script to catalog every relevant log file: |
| 78 | |
| 79 | ```bash |
| 80 | python skills/agent-research-aggregator/scripts/discover_logs.py \ |
| 81 | --search-roots <roots> \ |
| 82 | --agents <agents> \ |
| 83 | --depth <depth> \ |
| 84 | --since <since> \ |
| 85 | --out workspace/ara/discovered_logs.json |
| 86 | ``` |
| 87 | |
| 88 | The script exits with code **2** when no `--project` filter is set (this is |
| 89 | expected on the first run). It prints a **"Projects found"** list to stdout — |
| 90 | show it to the user immediately. |
| 91 | |
| 92 | **If no logs are found at all:** stop and ask the user to specify |
| 93 | `--search-roots` or point you at a directory that contains agent cache folders. |
| 94 | |
| 95 | --- |
| 96 | |
| 97 | ## Phase 1.5 — Project Selection (mandatory) |
| 98 | |
| 99 | **A paper can only be written from a single project. You must ask the user |
| 100 | which project to use before any LLM processing begins.** |
| 101 | |
| 102 | 1. Display the numbered project list from the discovery summary, e.g.: |
| 103 | ``` |
| 104 | Projects found: |
| 105 | [1] /home/alice/p |