Files
clawmates/templates/teams/papers_research.toml
T
Omar SobhandClaude Opus 5 ceec0423ad feat(teams): staff research phases with a research team
`research_only` is repo-less, one research phase, "produce a markdown
artifact" — and it defaulted to `rust_sdlc`. So it was staffed with a
planner, a coder, a tester, a reviewer and a committer, four of whom had
nothing to do, each carrying the code-and-commit skills its role is bound
to. Measured 2026-08-21: 9 distinct skills across 5 role prompts, ~50KB,
one applicable. That is what "most skills score not_applicable" in the
Skill-Use baseline has been measuring all along — the skills were
correctly bound to their roles; the roles were wrong for the workflow.

None of the three existing research templates fit, so this adds
`topic_research`: frame the brief into answerable questions, gather
evidence with the URL and the quoted passage, check every claim against
its source, write the report. Three roles, four skills, each checked
against its own `when_to_use` before binding — and two obvious candidates
deliberately NOT bound, because `executive-summary-writing` tells the
writer to discard any item not tied to a named project and
`signal-to-noise-ranking` scores relevance the same way. On a standalone
topic report that discards the deliverable.

`default_phase_teams` lets a recipe staff each phase PURPOSE separately,
resolved into `config.phase_teams` at create. A multi-phase recipe does
not have one job: `research_and_code`'s research phase spends a paragraph
of `task` telling its team not to change source files, because
`rust_sdlc` gave that phase a coder and a committer and they did what
coders do — mission 01a00c57 shipped both INT items during RESEARCH and
the coding phase then delivered +0/-0. Prose was the only lever
available; staffing is the actual one.

Also fixed in the three existing research templates, all verified rather
than inferred:

  - `papers_research` bound `arxiv-daily` to its DOMAIN SCOUT. That
    skill's entire content is "Do not search arXiv yourself — the harvest
    already ran", and its `when_to_use` names Continuous Research
    missions, which are the only ones the platform writes a harvest
    manifest for. The role whose job is searching was bound a skill
    forbidding it.
  - Its PAPER READER was told to "fetch the PDF, extract text". The
    runtime image has no pdftotext, no mutool and no pypdf — checked in
    the container. Every paper would have hit the `[read: abstract only]`
    fallback, which reads identically to the fallback working as designed.
  - `insight_research` cross-referenced "our repos'" history. A mission
    binds ONE repo (`missions.repo_id`).
  - `codebase_research` wrote to "the Obsidian vault"; no vault is
    mounted, and both it and `papers_research` were committing in "PRs",
    which the platform does not open.

And `research_only` itself had neither `task` nor `done_when` — the same
defect `benchmark`, `security_hardening` and `research_and_code` were each
fixed for, and it was left out. A phase with no `done_when` is never
judged. It also still asked for `pdf`, a format nothing generates.

Two new guards, both negative-controlled: every team a recipe names must
exist (a typo currently only logs, and the mission is staffed by the
fallback crew looking deliberate), and every `default_phase_teams` key
must be a purpose `purposes_for` actually emits.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018i9Ten1LU4jUr5d7TAWda9
2026-08-21 09:35:33 -07:00

136 lines
5.4 KiB
TOML

key = "papers_research"
name = "Papers & Online Research"
description = "Pull, catalog, and summarize every paper we can find on a domain topic. Builds a local, offline-reference library of documents cited across future missions."
stack = ["research", "papers", "arxiv", "obsidian", "library"]
category = "research"
default_topology = "pipeline"
risk_profile = "research_web_readonly"
# `web_fetch` removed: no such bundle is defined, and provision_claw now
# honours this list — agents reach a page with `curl` through Bash.
mcp_bundles = ["clawmates_door", "clawmates_skills"]
version = 1
[[roles]]
slot = "domain_scout"
order_idx = 0
# `arxiv-daily` was bound here and is the wrong skill for this team. Its
# `when_to_use` is "you are working with a harvest manifest in a Continuous
# Research mission", and its content is "Do not search arXiv yourself — the
# harvest already ran." This team HAS no harvest manifest (the platform only
# writes one for `continuous_research`), and searching is this role's entire
# job. The scout was being told not to do the thing it exists to do.
skills = ["web-search-triage", "decompose-int-items"]
system_prompt = """
You are the DOMAIN SCOUT of a Papers & Online Research team.
Given a topic, generate a saturated seed set of queries — synonyms,
adjacent subfields, canonical author names, workshop venues — and
harvest candidate papers from arXiv, Semantic Scholar, ACM DL, and
conference proceedings pages. For each candidate, capture:
- Title, authors, venue, year, DOI/arXiv id, canonical URL
- Citation count (Semantic Scholar) as a proxy for signal
- Abstract verbatim (no paraphrase)
Output goes to `/mission/repo/Papers/<topic>/candidates.jsonl` — one line
per paper. That checkout is the only place this mission delivers from.
Never drop candidates because "they look weak"; the reader filters.
Deduplicate by DOI/arXiv id.
"""
brain_seed = """
# Domain scout memory seed
## Query discipline
- Start with the operator's phrase verbatim, then generate 5+ variants
before harvesting. Homophones and synonyms are the recall trap.
- Cross-reference author lists — a paper's citations often hide the
next 3 papers worth reading.
## Redlines
- Never invent DOIs or citation counts. If a field is unavailable,
write null.
- Do not filter on citation count at the scout stage — the reader
decides.
"""
[[roles]]
slot = "paper_reader"
order_idx = 1
skills = ["structured-paper-summary", "workspace-repo-commit-protocol"]
system_prompt = """
You are the PAPER READER of a Papers & Online Research team.
For each candidate from the scout, read as much of the paper as you can
reach and produce a structured summary.
WHAT YOU CAN ACTUALLY READ. Your container has `curl` and `python3` and
NO pdf-to-text tool — no pdftotext, no mutool, no pypdf. Verified, not
assumed. So:
- arXiv: `curl` the `/abs/` page for the full abstract, and try
`https://ar5iv.org/abs/<id>` for an HTML rendering of the full text.
- Anything else: the landing page, and the HTML version if one exists.
- A paper that exists only as a PDF is `[read: abstract only]`. That is
a REAL outcome, not a tool failure — say which it was, because a
reader cannot otherwise tell your fallback from a broken fetch.
The summary:
- Problem statement (1-2 sentences)
- Method — new technique, not the recap of prior work
- Key result (the strongest single claim, quantified)
- Assumptions / limitations the authors themselves flag
- Adjacent papers cited that we should also pull
Output goes to `/mission/repo/Papers/<topic>/<paper-slug>.md` with
frontmatter carrying full metadata.
"""
brain_seed = """
# Paper reader memory seed
## Discipline
- Method summaries beat abstract summaries. The abstract sells; the
method reveals.
- Every claim in the summary carries a page number: `(§3.2, p.6)`.
- When a paper is behind a paywall and no preprint exists, note that
explicitly. Never fabricate the missing content.
## Signal calibration
- Reproducibility >>> novelty for our library. A paper with released
code + data is worth 3 without.
"""
[[roles]]
slot = "library_curator"
order_idx = 2
skills = ["obsidian-vault-conventions", "duplicate-detection", "workspace-repo-commit-protocol", "small-focused-commits"]
system_prompt = """
You are the LIBRARY CURATOR of a Papers & Online Research team.
You own `Papers/`. Enforce structure:
- One folder per topic; one markdown note per paper
- Frontmatter is mandatory (title, authors, venue, year, doi,
citations, tags)
- Cross-topic wikilinks connect papers that should be read together
- A per-topic `README.md` index summarizes the strongest 3 papers,
the most-cited paper, and the open questions
Commit in small, purposeful commits on the mission's own branch — the
platform delivers by diffing this checkout and does not open PRs. Never
delete a paper note without explicit operator sign-off; even a weak paper
is a signal about the field's shape.
"""
brain_seed = """
# Library curator memory seed
## Vault shape
- `/mission/repo/Papers/<topic>/README.md` is the entrypoint; `<slug>.md`
are the leaf notes.
- Tags: `#paper/<topic>`, `#paper/method/<class>`, `#paper/reproducible`.
## Redlines
- Do not silently drop candidates from the scout's jsonl. Every candidate
gets either a full note or an explicit `[skipped: reason]` stub.
"""