Add Nature workflow bridge skill#108
Conversation
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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 👍 / 👎.
32c0e91 to
675cac6
Compare
|
Addressed the Codex review about undeclared product-demo plotting dependencies.\n\nChanges:\n- Removed top-level optional imports from |
There was a problem hiding this comment.
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. |
| @@ -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. | |||
There was a problem hiding this comment.
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, andjournal-club pptfrom the smoke proxy. - Added a regression test to ensure those generic phrases do not become
nature-workflowphrase 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 passedpython -m ruff check scholaraio tests=> passedpython -m ruff format --check scholaraio tests=> passedpython -m pytest -q -p no:cacheprovider=> 1467 passed
31d4bd3 to
a9a2a55
Compare
a9a2a55 to
112603c
Compare
Summary
nature-workflowbridge skill that routes Nature/high-impact academic requests to the upstreamnature-*skill index instead of rewriting or simplifying the upstreamnature-skillsbundle.skills/_shared, and label ScholarAIO routes as explicit fallbacks when upstream skills are unavailable.Product Demo
tests/fixtures/nature_workflow_demo/run_demo.pyfor deterministic route cards covering all 10 upstreamnature-*skills plus fallback mode.tests/fixtures/nature_workflow_demo/run_product_demo.pyto generate a research-output-level demo package: source data, SVG/PDF/PNG figure exports, polished abstract, Data Availability statement, PPTX deck, and QA reports.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.pypython -m ruff check scholaraio testspython -m ruff format --check scholaraio testspython -m mkdocs build --strictpython tests/fixtures/nature_workflow_demo/run_product_demo.py --output-dir /tmp/nature-workflow-product-demo-pr-checkpython -m pytest -q -p no:cacheprovider(1465 passed)Close #107