Skip to main content
Glama
README.md
# šŸ›°ļø SHIRYAN (Ų“Ų±ŁŠŲ§Ł†) — The Energy-Artery Sentinel

> Sovereign, onboard-AI **infrastructure-integrity intelligence** for Saudi Arabia.
> *"We see the excavator before the rupture."* — built for **SARI 2** (Saudi Space Agency).

SHIRYAN watches the Kingdom's pipeline & critical-infrastructure corridors, detects third-party intrusion / geohazards / leaks from before/after imagery, and **downlinks the decision (a small alert), not the image** — delivered to operators and to AI agents via an MCP server, and shown live in the **SHIRYAN Watch** demo.

This repository is the **ground-side product, MCP server, and pitch demo**. The flight satellite is built later with SSA. See [DESIGN.md](DESIGN.md) for the spec and scope.

## Repo layout
```
shiryan/
ā”œā”€ packages/
│  ā”œā”€ core/          @shiryan/core — change detection, ROW geofencing, alert synthesis (pure TS, tested)
│  ā”œā”€ data/          @shiryan/data — corridors, sample scenes, Sentinel-2 converters
│  └─ mcp-server/    @shiryan/mcp-server — SHIRYAN intelligence as MCP tools (stdio, 4 tools)
ā”œā”€ apps/
│  └─ web/           SHIRYAN Watch — MapLibre live demo (builds offline)
ā”œā”€ scripts/          fetch-sentinel.ts — optional live Copernicus fetch (env creds; graceful fallback)
ā”œā”€ data/             sample corridors + cached Sentinel-2 tiles
ā”œā”€ docs/             architecture, pitch, Obsidian links
└─ DESIGN.md README.md STATE.md PROGRESS.md AGENT.md AGENTS.md memory.md LOG.md NOTES.md DECISIONS.md
```

## Quick start
```bash
npm install         # installs workspace dev deps (typescript, @types/node)
npm run verify      # typecheck + tests  (the gate — must be green)
npm run typecheck   # types only
npm test            # tests only (node --test, runs TypeScript natively)
```
Requires Node ≄ 22 (developed on Node 24; uses native TypeScript type-stripping, no build step for tests).

## Quickstart
```bash
bash scripts/quickstart.sh
```
Runs an end-to-end offline SHIRYAN flow (load corridor → detect change → emit alerts → persist & read back history) and prints the result. One command, no network.

## Status
| Component | State |
|---|---|
| `@shiryan/core` | āœ… working + tested |
| `@shiryan/data` | āœ… corridors + sample scene + geojson |
| `@shiryan/mcp-server` | āœ… stdio MCP, 4 tools, tested over stdio |
| `apps/web` (SHIRYAN Watch) | āœ… MapLibre demo, builds offline (`npm run build -w @shiryan/web`) |
| Real Sentinel-2 fetch | ⬜ planned (P4) |
Full backlog: [PROGRESS.md](PROGRESS.md).

## Obsidian
Research, strategy, scoring, and the winning dossiers live in the Obsidian vault:
`../Sarri 2 Vault/00_SARI2_Idea_Engine/` (flagship dossier: `Round2/Model-1/Ideas/flagship.md`).
This repo is the *build*; the vault is the *brain*. See [memory.md](memory.md).

## CI
One-command gate for any runner: `bash scripts/verify.sh` (typecheck + lint + test + build, offline). Per-package coverage: `bash scripts/coverage.sh`. See [AGENT.md](AGENT.md#ci--coverage).

## Built autonomously
Developed via an overnight **night-loop**: fresh context each pass, filesystem-as-memory (DESIGN+README+ledger), one verified task per worker, green-gate-only commits. See [AGENTS.md](AGENTS.md).