Skip to content
Merged
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
59 changes: 59 additions & 0 deletions .github/workflows/release-legacy-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish archived binary assets

on:
workflow_dispatch:
inputs:
tag_name:
description: Release tag for the archived asset bundle
required: true
default: legacy-assets-v1.0.0
type: string

permissions:
contents: write

jobs:
package-and-release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
ASSET_SOURCE_SHA: 50dcd4dfd4aefab233a548faf400e46353291cb3
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract original binary files from repository history
run: |
set -euo pipefail
archive_dir="$(mktemp -d)"
git archive "$ASSET_SOURCE_SHA" \
assets docs/images "docs/ClimateX.ai Features .pdf" \
artifacts/reports models frontend/public/docs/images \
| tar -xf - -C "$archive_dir"
find "$archive_dir" -type f -size 0 -delete
mkdir -p dist
tar -czf dist/climate-crew-legacy-assets.tar.gz \
-C "$archive_dir" \
assets docs/images "docs/ClimateX.ai Features .pdf" \
artifacts/reports models frontend/public/docs/images
sha256sum dist/climate-crew-legacy-assets.tar.gz > dist/SHA256SUMS.txt
- name: Publish or replace the release asset
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ inputs.tag_name }}
run: |
set -euo pipefail
NOTES="dist/release-notes.md"
cat > "$NOTES" <<'NOTES'
Archived images, audit reports, and retail prototype model files retained for historical traceability.
These files are not loaded by the default Climate Crew application. The zero-byte audit PDF was excluded.
The archive was extracted from the repository snapshot recorded in .github/workflows/release-legacy-assets.yml.
See PROVENANCE.md and docs/release-assets.md.
NOTES
if gh release view "$TAG_NAME" >/dev/null 2>&1; then
gh release upload "$TAG_NAME" dist/climate-crew-legacy-assets.tar.gz dist/SHA256SUMS.txt --clobber
else
gh release create "$TAG_NAME" dist/climate-crew-legacy-assets.tar.gz dist/SHA256SUMS.txt \
--title "Climate Crew archived assets" --notes-file "$NOTES"
fi
33 changes: 33 additions & 0 deletions .github/workflows/science-slice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Climate science slice

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
offline-science:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install minimal offline-science dependencies
run: python -m pip install -r requirements-science.txt
- name: Check generated benchmark dataset
run: |
python eval/science_quality/build_dataset.py
git diff --exit-code -- eval/science_quality/data/climate_evidence_benchmark.json
- name: Run offline tests with network blocked
run: python -m pytest -q tests/science
- name: Reproduce pinned GISTEMP output
run: python analysis/reproduce_gistemp.py --check
- name: Compile the focused Python modules
run: python -m compileall -q analysis src/science eval/science_quality tests/science
90 changes: 0 additions & 90 deletions .github/workflows/unpack-climatex.yml

This file was deleted.

24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MIT License

Copyright (c) 2026 Jason Lee

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

This license applies to original project contributions. Third-party material,
if any, remains subject to its applicable license; see PROVENANCE.md.
25 changes: 25 additions & 0 deletions PROVENANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Provenance and attribution

## Climate Crew source lineage

The public repository history contains commit `e2691313d9bd8dfdf3f07a3cc2cbaa0922f79b0a`, titled **“Unpack ClimateX source into repository”**, dated 2026-09-26. The prior workflow `.github/workflows/unpack-climatex.yml` extracted `ClimateX.ai-main.zip`, replaced matching repository paths, and pushed the result to `main`. That workflow is removed in this branch because it granted write access and could overwrite current files.

The archive is not present in the current default-branch tree. The commit history does not record an upstream repository URL, original author, or source license. This document therefore records ClimateX as the codebase's predecessor but does not claim the contents came from a specific external project. The old audit agent, route identifiers, PDF footer and some comments still use ClimateX branding; those names are historical code identifiers, not an attribution claim. Historical binary assets are removed from the current source tree and can be reconstructed by the release workflow from the pre-cleanup snapshot `50dcd4dfd4aefab233a548faf400e46353291cb3`. The release itself still needs to be created from the workflow after merge.

The former retail and climate-finance/ESG modules are moved under `examples/` and removed from the default API/frontend. They are archived prototypes, not supported app modules. `LICENSE` applies MIT terms to original project contributions by Jason Lee only; it does not establish licensing for historical code whose source and authorship are unknown or supersede any third-party license. Restore any discovered upstream notices alongside the affected files before redistribution.

## NASA GISTEMP data

The reproducible analysis uses NASA GISS GISTEMP v4 global land-ocean temperature anomalies:

- Data page: <https://data.giss.nasa.gov/gistemp/data_v4.html>
- CSV: <https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts%2BdSST.csv>
- Snapshot date: 2026-10-04
- Snapshot SHA-256: `c9ce0750ca93a8241c42fe86cd5bf54d07b28b21ae650b0ae49a206907018cd9`
- Analysis: annual `J-D` column, 1951–1980 reference period, complete years 1880–2025

NASA periodically revises the source data. The checked-in file is a fixed reproducibility snapshot; later source revisions should be added as a new snapshot rather than silently replacing this one.

## Test and evaluation provenance

The CI tests use local data and mocked provider responses. The 60-case evaluation dataset is synthetic and generated by `eval/science_quality/build_dataset.py`; it is not observational climate evidence. The existing application and general evaluation modules have not been fully reproduced in CI by this workflow.
88 changes: 60 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Climate Crew

Climate Crew is a climate and environmental research prototype. The repository contains climate data connectors, specialist agents, a FastAPI backend, a React frontend, and a multi-agent deep-research pipeline. The broad application is not yet validated as an end-to-end scientific system.

## Implemented, prototype, planned

| Status | Capability | Evidence in this repository |
|---|---|---|
| Implemented and offline-tested | One reproducible climate result: source snapshot → trend statistics → endpoint sensitivity check → uncertainty → report and plot | `analysis/reproduce_gistemp.py`, `src/science/`, `data/science/`, `artifacts/science/` |
| Implemented as typed records | Evidence records with source, retrieval date, evidence type, independence group and derivation links; competing hypotheses; falsification test; uncertainty assessment | `src/science/models.py` |
| Prototype | Climate/environment data adapters, specialist agents, FastAPI routes and React workspace | `src/`, `main.py`, `frontend/` |
| Prototype | Deep-research orchestration with planning, search, debate and synthesis; provider credentials and external services are required | `src/agents/deep_research/` |
| Planned | Durable project-wide evidence graph, independent replication across datasets, and expert validation gates integrated into the application | Not implemented end to end |
<p align="center">
<img src="assets/climate-crew-banner.svg" alt="Climate Crew research platform: specialist agents, data adapters, debate, and reviewable reports." width="100%" />
</p>
Expand Down Expand Up @@ -291,49 +304,68 @@ Climate Crew separates **producing a result** from **trusting a result**. Signif

Assessment can consider source, dataset, methodological and model independence; measurement and statistical uncertainty; assumption sensitivity; unresolved contradictions; replication history; and missing evidence.

Ten articles derived from one dataset should not automatically count as ten independent confirmations.
The former retail and climate-finance/ESG experiments are preserved under [`examples/`](examples/README.md) and are no longer mounted by the default API or frontend. They are not part of the climate-science portfolio focus.

---
## Reproduce the climate result

## 🔎 Discovery lifecycle
The checked-in input is a pinned snapshot of NASA GISTEMP v4 global land-ocean annual anomalies. The `J-D` column is measured in degrees Celsius relative to 1951–1980. The analysis excludes the incomplete 2026 row and uses complete years 1880–2025.

```text
Observation
↓
Finding
↓
Candidate Finding
↓
Replicated Finding
↓
Novel Finding
↓
Discovery Candidate
↓
Externally Validated Discovery
```bash
python -m pip install -r requirements-science.txt
python analysis/reproduce_gistemp.py
python analysis/reproduce_gistemp.py --check
python -m pytest -q tests/science
```

A **Discovery Candidate** contains the evidence, provenance, methods, contradictions, uncertainty, replication history and novelty assessment required for external evaluation. Validation may require experts, independent datasets, field investigation, laboratory work or peer review.
The script has no network or model-key requirement. It writes a machine-readable report to [`artifacts/science/gistemp_trend_result.json`](artifacts/science/gistemp_trend_result.json) and a plot to [`artifacts/science/gistemp_global_trend.svg`](artifacts/science/gistemp_global_trend.svg). CI checks both outputs against the pinned data and runs the offline tests.

---
**Result for this snapshot:** 146 annual observations; OLS trend **0.0834 °C/decade** (95% circular 5-year moving-block bootstrap interval **0.0676–0.0980**); Theil–Sen slope **0.0812 °C/decade**; two-sided Mann–Kendall tau-b **0.7347**, *p* = **3.44 × 10⁻³⁹**. The exploratory endpoint check excludes 2016–2025 and still finds a positive 1880–2015 trend (Sen slope 0.0711 °C/decade; Mann–Kendall *p* = 4.37 × 10⁻³³). That check does not overturn the observed trend in this series.

## 🌎 Distributed Climate Discovery Network
![NASA GISTEMP annual anomaly series and OLS trend](artifacts/science/gistemp_global_trend.svg)

Large investigations can be decomposed into bounded research tasks and distributed across agents, machines, institutions or community contributors. Returned work enters the same evidence and provenance system and remains subject to validation gates.
**Limits:** this is a descriptive result from one global dataset, not an independent replication or causal-attribution analysis. The Mann–Kendall p-value uses the normal approximation with tie correction and does not adjust its variance for serial autocorrelation. The block-bootstrap interval uses the stated 5-year residual blocks and does not cover every measurement or structural uncertainty. See the JSON report for methods and caveats.

Examples include reproducing calculations, analysing datasets, testing parameter regions, sensitivity analysis, comparing models, searching for contradictory evidence, investigating prior art and examining geographic anomalies.
Source: [NASA GISS GISTEMP v4 data downloads](https://data.giss.nasa.gov/gistemp/data_v4.html). Snapshot retrieved 2026-10-04; SHA-256 is recorded in `data/science/gistemp_manifest.json`.
The intended research-memory layer would preserve previous questions, hypotheses, rejected explanations, evidence, contradictions, datasets, methods, model outputs, replication attempts, uncertainty assessments and findings without confusing remembered information with verified evidence.

---
## Evaluation

## 🧬 Research memory & integrity
`eval/science_quality/` contains 60 balanced, **synthetic controlled evidence scenarios** and a paired comparison harness for the Climate Crew adapter and a single-LLM adapter. It reports relationship accuracy with Wilson 95% intervals, evidence precision/recall/F1, a Brier score, and a paired bootstrap interval for the accuracy difference.

The intended research-memory layer would preserve previous questions, hypotheses, rejected explanations, evidence, contradictions, datasets, methods, model outputs, replication attempts, uncertainty assessments and findings without confusing remembered information with verified evidence.
CI uses mocked adapters to test the harness on all 60 cases without network access. Those mocked scores are plumbing checks, not model-performance evidence. To run a real provider comparison, follow [`eval/science_quality/README.md`](eval/science_quality/README.md); start with a small `--limit` because the multi-agent run makes multiple provider calls per case. No real comparative score is claimed until that run is made and its model IDs, date, commit, and cost are published.

The older `eval/` runner remains a prototype: its system integration currently returns mock outputs. Do not treat its results as measured Climate Crew performance.

## Tests and CI boundary

The new workflow runs only the offline scientific slice:

```bash
python -m pytest -q tests/science
python analysis/reproduce_gistemp.py --check
```

The older scripts under `test/` include provider-backed demos and integration checks. They are not all automated by this workflow and may require credentials, services, or network access. Passing the new suite validates the bounded result and benchmark harness, not the complete API, frontend, or all external integrations.

The legacy three-query baseline can also be run with `python -m pytest test/test_eval.py -k offline_baseline`. It verifies the mock-runner plumbing only and is not a model benchmark.

## Run the application prototype

The complete backend and frontend have a larger pinned dependency set and external-service requirements:

```bash
python -m venv .venv
source .venv/bin/activate # Windows: .venv\\Scripts\\activate
python -m pip install -r requirements.txt
uvicorn main:app --reload
```

Research records can preserve source attribution, timestamps, dataset identity, transformations, model and tool involvement, assumptions, agent contributions, critiques, contradictions, replication results and human validation decisions.
The API docs are normally available at `http://localhost:8000/docs`. For the frontend, run `npm install` and `npm run dev` from `frontend/`. Set provider credentials through environment variables when using integrations that require them.

Synthetic, fallback, demonstration and simulated information must remain distinguishable from observational evidence throughout the pipeline.
## Provenance and license

The repository history records a migration from `ClimateX.ai-main.zip` on 2026-09-26. The archive is not in the current tree, and the history does not identify an upstream URL or license. [`PROVENANCE.md`](PROVENANCE.md) records this boundary and the NASA data source. Non-core retail and finance experiments are preserved under `examples/`; the historical binary asset bundle can be published with the workflow described in [`docs/release-assets.md`](docs/release-assets.md).
---
## 🌍 Climate Crew

**Investigate independently. Challenge aggressively. Preserve the evidence. Discover carefully.**
The repository includes an MIT license for original project contributions. Third-party material remains subject to its applicable terms; no unverified upstream attribution is invented.
Loading
Loading