Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions research-reproducibility-intelligence/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Research Reproducibility Intelligence

Self-contained AI-powered research assistant suite milestone for [SCIBASE.AI issue #16](https://github.com/SCIBASE-AI/SCIBASE.AI/issues/16).

This module turns a scientific project packet into a deterministic assistant report covering auto peer-review, reproducibility checks, and research-gap discovery. It is designed for easy review: no API keys, no external services, no package install required beyond Node.js.

## What It Adds

- Auto peer-review report with manuscript structure checks, clarity findings, statistical reporting signals, and claim-to-evidence alignment.
- Reproducibility report with artifact fingerprinting, pinned dependency checks, runnable file detection, data dictionary/source data checks, and a runbook.
- Sandbox execution plan and evidence validation for notebooks/scripts, including disabled-network policy, resource limits, output hashes, execution logs, and reported-output consistency checks.
- Linked prior reproducibility attempts, sorted by current artifact fingerprint match and recency.
- Research-gap feed that ranks corpus items by relevance, replication gap, limitation signals, and novelty.
- Workflow orchestration that converts findings into staged, owner-assigned, evidence-hashed actions.
- Combined assistant packet with readiness score, orchestration status, and next-action queue.
- Sample project fixture, tests, requirement mapping, CLI demo, and short demo GIF.

## Run

```bash
cd research-reproducibility-intelligence
npm run check
npm test
npm run demo
```

Expected demo shape:

```json
{
"project": "Longitudinal microbiome shifts after coastal flooding",
"readinessScore": 71,
"peerReviewScore": 62,
"reproducibilityStatus": "reproducible",
"sandboxSummary": {
"plannedRuns": 1,
"observedRuns": 1,
"cleanRuns": 1,
"consistentOutputs": 1,
"missingRuns": 0
},
"workflowBlocked": true,
"workflowRiskScore": 88,
"topWorkflowAction": {
"id": "review-1",
"stage": "peer-review",
"status": "blocking",
"owner": "Dr. Chen"
},
"linkedAttempt": {
"id": "attempt-2026-04-dry-run",
"matchesCurrentArtifacts": true
},
"topResearchGap": {
"paperId": "paper-1",
"priority": 0.8
}
}
```

## Demo Artifact

See [docs/demo.gif](docs/demo.gif) for a short visual walkthrough. The SVG source is included at [docs/demo.svg](docs/demo.svg).

## Files

- `src/research-assistant.js` - deterministic assistant engine.
- `data/sample-project.json` - reviewable project/corpus fixture.
- `test/research-assistant.test.js` - Node assertion tests.
- `scripts/demo.js` - CLI demo.
- `docs/issue-16-requirement-map.md` - maps implementation to bounty requirements.

## AI-Assisted Disclosure

This contribution was produced with AI assistance and manually verified with the local commands above.
110 changes: 110 additions & 0 deletions research-reproducibility-intelligence/data/sample-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"id": "proj-microbiome-2026",
"title": "Longitudinal microbiome shifts after coastal flooding",
"domain": "environmental health",
"interests": ["microbiome", "coastal flooding", "public health", "replication"],
"manuscript": {
"abstract": "We study microbiome shifts after coastal flooding using repeated household samples. The analysis suggests water intrusion changes bacterial diversity and may affect respiratory outcomes.",
"methods": "Households were sampled monthly. DNA sequencing was performed and results were normalized by read depth. The current manuscript clearly shows that flooding changes all exposed communities in a way that is obviously relevant to public health but the text still needs more direct evidence links.",
"results": "Observed diversity increased in exposed homes and returned toward baseline after remediation. The estimated effect size was larger in homes with persistent moisture.",
"limitations": "The pilot cohort is small and future work should replicate findings across more regions."
},
"claims": [
{
"id": "claim-1",
"text": "Flood exposure increases microbial diversity in sampled homes."
},
{
"id": "claim-2",
"text": "Hospital admissions declined after a regional policy intervention."
}
],
"results": [
{
"id": "result-1",
"summary": "Microbial diversity increased in exposed homes after flooding and moved toward baseline after remediation."
},
{
"id": "result-2",
"summary": "Persistent moisture was associated with a larger estimated effect size."
}
],
"files": [
{ "name": "README.md" },
{ "name": "analysis.ipynb" },
{ "name": "data_dictionary.md" },
{ "name": "samples.csv" },
{ "name": "requirements.txt" }
],
"dependencies": [
{ "name": "python", "version": "3.12.3" },
{ "name": "pandas", "version": "2.2.2" },
{ "name": "scipy", "version": "1.13.0" }
],
"sandboxPolicy": {
"image": "python:3.12-slim",
"network": "disabled",
"cpu": "2",
"memory": "4g",
"timeoutSeconds": 1800
},
"executionEvidence": [
{
"targetId": "run-13846284",
"exitCode": 0,
"durationSeconds": 142,
"outputHashes": ["sha256:diversity-summary-2026", "sha256:moisture-effect-2026"],
"logUrl": "https://example.org/reproducibility/proj-microbiome-2026/logs/analysis-ipynb",
"generatedArtifacts": ["diversity-summary.csv", "moisture-effect.json"],
"reportedArtifacts": ["diversity-summary.csv", "moisture-effect.json"]
}
],
"workflowPreferences": {
"reviewOwner": "Dr. Chen",
"reproducibilityOwner": "Replication Desk",
"strategyOwner": "Research Strategy",
"publicationOwner": "Corresponding Author",
"deadline": "2026-05-28"
},
"reproducibilityAttempts": [
{
"id": "attempt-2026-04-dry-run",
"date": "2026-04-18",
"status": "successful",
"url": "https://example.org/reproducibility/proj-microbiome-2026/attempt-2026-04-dry-run",
"artifactFingerprint": "d584da823d10eaa1",
"notes": "Clean-room rerun reproduced reported diversity trends and stored execution logs."
},
{
"id": "attempt-2026-03-pilot",
"date": "2026-03-12",
"status": "partial",
"url": "https://example.org/reproducibility/proj-microbiome-2026/attempt-2026-03-pilot",
"artifactFingerprint": "legacy-artifacts",
"notes": "Earlier attempt predated dependency pinning and did not include all source data."
}
],
"corpus": [
{
"id": "paper-1",
"title": "Microbial exposure after hurricane flooding",
"abstract": "A pilot study of household microbial exposure after hurricane flooding. Limitations include small sample size and unresolved replication across regions.",
"keywords": ["microbiome", "flooding", "indoor exposure"],
"replications": 0
},
{
"id": "paper-2",
"title": "Respiratory health after household remediation",
"abstract": "Remediation studies report mixed respiratory health outcomes and call for future work that links environmental sampling to clinical endpoints.",
"keywords": ["respiratory", "remediation", "public health"],
"replications": 1
},
{
"id": "paper-3",
"title": "Open protocols for environmental sequencing",
"abstract": "Protocol standardization improves reproducibility in environmental sequencing projects.",
"keywords": ["sequencing", "reproducibility", "protocol"],
"replications": 4
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
34 changes: 34 additions & 0 deletions research-reproducibility-intelligence/docs/demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Issue #16 Requirement Map

This module is a deterministic milestone for SCIBASE issue #16, AI-Powered Research Assistant Suite. It provides local, reviewable implementations of the three requested capabilities without external APIs or model keys.

| Issue requirement | Implementation |
| --- | --- |
| Auto peer review reports | `buildPeerReviewReport()` checks manuscript structure, clarity risks, statistical reporting signals, and claim-to-evidence alignment. |
| Reproducibility checker | `buildReproducibilityReport()` evaluates README/runbook presence, pinned dependencies, runnable artifacts, data dictionary, source data, sandbox execution plans, sandbox run evidence, reported-output consistency, and produces a reproducibility runbook. |
| Auto-executes project code and notebooks in sandbox environments | `buildSandboxExecutionPlan()` creates disabled-network sandbox targets for notebooks/scripts with resource limits, read-only project mounts, writable output mounts, expected result IDs, and executable commands. `evaluateSandboxEvidence()` validates exit codes, output hashes, log URLs, generated artifacts, reported artifacts, clean-run counts, and missing-run counts. |
| Research gap finder | `buildResearchGapFeed()` scans a corpus fixture for relevance, low replication count, limitation language, and novelty signals, then ranks opportunities. |
| Real-time insights and workflow automation | `buildWorkflowOrchestration()` turns review, reproducibility, and gap signals into staged actions with owners, blockers, dependencies, risk score, deadline, and evidence hashes. |
| Integrated assistant packet | `buildAssistantPacket()` combines review, reproducibility, gap discovery, workflow orchestration, one readiness score, and a prioritized action queue. |
| Reviewer-friendly local demo | `npm run demo` prints the assistant packet summary for `data/sample-project.json`. |
| Verification | `npm run check` and `npm test` run with Node built-ins only. |

## Design Notes

- The scoring is transparent and deterministic, which makes it suitable for review and regression testing.
- The module is isolated under `research-reproducibility-intelligence/`.
- It is intentionally credential-free. A future production integration can replace deterministic scoring with model-backed adapters while keeping the same report shape.
12 changes: 12 additions & 0 deletions research-reproducibility-intelligence/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "scibase-research-reproducibility-intelligence",
"version": "0.1.0",
"private": true,
"description": "Deterministic AI-powered research assistant suite milestone for SCIBASE issue #16.",
"type": "commonjs",
"scripts": {
"check": "node --check src/research-assistant.js && node --check scripts/demo.js && node --check test/research-assistant.test.js",
"demo": "node scripts/demo.js",
"test": "node test/research-assistant.test.js"
}
}
27 changes: 27 additions & 0 deletions research-reproducibility-intelligence/scripts/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"use strict";

const sampleProject = require("../data/sample-project.json");
const { buildAssistantPacket } = require("../src/research-assistant");

const packet = buildAssistantPacket(sampleProject);

console.log(
JSON.stringify(
{
project: packet.project.title,
readinessScore: packet.readinessScore,
peerReviewScore: packet.peerReview.score,
reproducibilityStatus: packet.reproducibility.status,
sandboxTarget: packet.reproducibility.sandboxPlan.targets[0],
sandboxSummary: packet.reproducibility.sandboxEvidence.summary,
workflowBlocked: packet.workflow.blocked,
workflowRiskScore: packet.workflow.riskScore,
topWorkflowAction: packet.workflow.actions[0],
linkedAttempt: packet.reproducibility.linkedAttempts[0],
topResearchGap: packet.researchGaps[0],
nextActions: packet.nextActions.slice(0, 5),
},
null,
2,
),
);
Loading