Skip to content

Add Nature workflow bridge skill#108

Merged
ZimoLiao merged 1 commit into
mainfrom
issue-107-routing-eval
Jun 3, 2026
Merged

Add Nature workflow bridge skill#108
ZimoLiao merged 1 commit into
mainfrom
issue-107-routing-eval

Conversation

@ZimoLiao

@ZimoLiao ZimoLiao commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a nature-workflow bridge skill that routes Nature/high-impact academic requests to the upstream nature-* skill index instead of rewriting or simplifying the upstream nature-skills bundle.
  • Document direct upstream installation through Codex plugin/manual whole-directory copy, including skills/_shared, and label ScholarAIO routes as explicit fallbacks when upstream skills are unavailable.
  • Register the bridge across agent/docs surfaces and add a quick start with executable route and product-demo commands.

Product Demo

  • Adds tests/fixtures/nature_workflow_demo/run_demo.py for deterministic route cards covering all 10 upstream nature-* skills plus fallback mode.
  • Adds tests/fixtures/nature_workflow_demo/run_product_demo.py to generate a research-output-level demo package: source data, SVG/PDF/PNG figure exports, polished abstract, Data Availability statement, PPTX deck, and QA reports.
  • Generated and inspected the demo package locally at workspace/_system/issue-107-routing-eval/nature-workflow-product-demo, then copied it to Windows Downloads for manual review.

Test Plan

  • python -m pytest -q -p no:cacheprovider tests/test_nature_workflow_skill_contract.py tests/test_nature_workflow_demo_fixture.py tests/test_writing_docs_alignment.py tests/test_skill_routing_smoke.py
  • python -m ruff check scholaraio tests
  • python -m ruff format --check scholaraio tests
  • python -m mkdocs build --strict
  • python tests/fixtures/nature_workflow_demo/run_product_demo.py --output-dir /tmp/nature-workflow-product-demo-pr-check
  • python -m pytest -q -p no:cacheprovider (1465 passed)

Close #107

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32c0e91125

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import sys
from pathlib import Path

import matplotlib

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Declare or guard the product-demo plotting dependency

In environments installed from the declared project extras, the new product demo cannot run because matplotlib is imported unconditionally but is not listed in pyproject.toml (neither dev nor full). The new test_tracked_product_demo_generates_research_artifacts executes this script, so a normal dev checkout without an undeclared matplotlib install fails immediately with ModuleNotFoundError: No module named 'matplotlib'; either add the dependency to the relevant extra or skip/guard this demo when the optional plotting stack is unavailable.

Useful? React with 👍 / 👎.

@ZimoLiao ZimoLiao force-pushed the issue-107-routing-eval branch from 32c0e91 to 675cac6 Compare June 2, 2026 14:19
@ZimoLiao

ZimoLiao commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Addressed the Codex review about undeclared product-demo plotting dependencies.\n\nChanges:\n- Removed top-level optional imports from run_product_demo.py.\n- Added an explicit optional-dependency guard with a clear install message for matplotlib, numpy, and python-pptx.\n- Updated the product-demo test to pytest.importorskip the optional plotting/Office stack, so normal dev checkouts without those optional packages skip the demo instead of failing.\n- Added a regression test that verifies the script has no top-level plotting/Office imports and includes the dependency guard.\n\nVerification after the fix:\n- python -m pytest -q -p no:cacheprovider tests/test_nature_workflow_skill_contract.py tests/test_nature_workflow_demo_fixture.py tests/test_writing_docs_alignment.py tests/test_skill_routing_smoke.py => 44 passed\n- python -m ruff check scholaraio tests => passed\n- python -m ruff format --check scholaraio tests => passed\n- python tests/fixtures/nature_workflow_demo/run_product_demo.py --output-dir /tmp/nature-workflow-product-demo-dep-guard-check => generated 14 files\n- python -m pytest -q -p no:cacheprovider => 1466 passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new nature-workflow “bridge” skill so ScholarAIO can route Nature / high-impact-journal requests to the upstream nature-* skill index when available, while explicitly labeling ScholarAIO-native routes as fallbacks. The PR also adds a deterministic demo fixture + contract tests, and wires the new skill into the documentation and skill registry surfaces.

Changes:

  • Introduce .claude/skills/nature-workflow/ with reference docs describing upstream-first routing and fallback policy.
  • Add a tracked demo fixture (tests/fixtures/nature_workflow_demo/) with an executable route demo and a product-demo artifact generator.
  • Register and document the skill across README/agent docs/MkDocs nav, plus add routing smoke tests and contract tests.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_writing_docs_alignment.py Adds assertions ensuring the quickstart doc is present, linked, and legacy router references are removed.
tests/test_skill_routing_smoke.py Extends prompt-token heuristics and adds smoke tests asserting nature-workflow preference for Nature/high-impact prompts.
tests/test_nature_workflow_skill_contract.py Contract tests for the bridge skill’s policy, references, upstream coverage, and fallback mapping.
tests/test_nature_workflow_demo_fixture.py Verifies the tracked demo fixture scripts run and produce expected artifacts (optionally gated by deps).
tests/fixtures/nature_workflow_demo/verify_demo.py Fixture verifier script to validate coverage/policy and execute the route demo.
tests/fixtures/nature_workflow_demo/run_product_demo.py Generates a research-artifact-style demo package (figure exports, writing outputs, data statement, PPTX, QA).
tests/fixtures/nature_workflow_demo/run_demo.py Deterministic prompt classifier that emits route cards for direct-upstream vs fallback modes.
tests/fixtures/nature_workflow_demo/demo_cases.json Defines executable demo cases covering all upstream nature-* targets plus fallback.
tests/fixtures/nature_workflow_demo/04-verifier-output.md Captures expected verifier output for the tracked fixture.
tests/fixtures/nature_workflow_demo/03-demo-prompts.md Documents example prompts covering submission and non-submission scenarios.
tests/fixtures/nature_workflow_demo/02-route-matrix.md Route matrix mapping upstream skills to ScholarAIO fallbacks and emphasizing non-submission breadth.
tests/fixtures/nature_workflow_demo/01-upstream-policy.md Direct-use policy summary for the fixture.
tests/fixtures/nature_workflow_demo/00-artifact-manifest.md Manifest describing fixture artifacts and upstream skill coverage.
README.md Adds nature-workflow to the writing stack overview.
README_CN.md Chinese README: documents nature-workflow as an upstream bridge with fallbacks.
mkdocs.yml Adds “Nature Workflow Quick Start” to the MkDocs navigation.
docs/guide/writing.md Documents /nature-workflow positioning, scenarios, and links to the quickstart.
docs/guide/nature-workflow-quickstart.md New quickstart covering when to use, inputs, install commands, demos, and guardrails.
docs/guide/agent-reference.md Adds nature-workflow to the representative writing skills list.
clawhub.yaml Registers scholaraio/nature-workflow in the published skill index.
CLAUDE.md Mentions nature-workflow in the “core writing skills” pointer list.
AGENTS.md Adds nature-workflow to representative writing skills.
AGENTS_CN.md Adds nature-workflow to representative writing skills (CN).
.claude/skills/nature-workflow/SKILL.md New bridge skill entry doc defining upstream-first routing, fallbacks, and output shape.
.claude/skills/nature-workflow/references/upstream-skill-map.md Maps upstream nature-* skills to triggers and ScholarAIO fallback routes.
.claude/skills/nature-workflow/references/upstream-install.md Documents upstream installation via Codex plugin or manual directory copy.
.claude/skills/nature-workflow/references/quickstart.md Skill-local quickstart reference for prompts and expected first response shape.
.claude/skills/nature-workflow/references/bridge-policy.md Bridge policy: direct upstream use, what the bridge does/doesn’t do, and fallback labeling.

Comment thread .claude/skills/nature-workflow/SKILL.md Outdated
@@ -0,0 +1,103 @@
---
name: nature-workflow
description: Use when the user explicitly asks for Nature Skills, nature-skills, Nature style, Nature-style, Nature-family, CNS, high-impact journal, or Springer Nature workflows, including figures, polishing, writing, reviewer critique, Nature/CNS citations, Nature data-sharing workflows, paper readers, reviewer response, paper-to-PPT, submission checklist, or Nature-specific search workflows.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 31d4bd3.

I did not add the unqualified generic phrases back as nature-workflow triggers because that would reintroduce false positives for ordinary Data Availability / academic-search requests. Instead:

  • Added Nature-qualified trigger wording to the skill frontmatter (Nature Communications, Nature figure work, high-impact journal major revision response, Nature-specific academic-search).
  • Removed unqualified phrase bonuses such as data availability, academic search, major revision, submission package, and journal-club ppt from the smoke proxy.
  • Added a regression test to ensure those generic phrases do not become nature-workflow phrase bonuses.

Verification:

  • python -m pytest -q -p no:cacheprovider tests/test_nature_workflow_skill_contract.py tests/test_nature_workflow_demo_fixture.py tests/test_writing_docs_alignment.py tests/test_skill_routing_smoke.py => 45 passed
  • python -m ruff check scholaraio tests => passed
  • python -m ruff format --check scholaraio tests => passed
  • python -m pytest -q -p no:cacheprovider => 1467 passed

@ZimoLiao ZimoLiao force-pushed the issue-107-routing-eval branch 2 times, most recently from 31d4bd3 to a9a2a55 Compare June 3, 2026 04:05
@ZimoLiao ZimoLiao force-pushed the issue-107-routing-eval branch from a9a2a55 to 112603c Compare June 3, 2026 04:23
@ZimoLiao ZimoLiao merged commit 983f85c into main Jun 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize Skills

2 participants