diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..ce17766 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,14 @@ +{ + "name": "prathikcannotcode-aranya", + "owner": { + "name": "Aranya contributors", + "url": "https://github.com/prathikcannotcode/aranya" + }, + "plugins": [ + { + "name": "aranya", + "source": "./", + "description": "Indian environmental-law skills for Claude Code" + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..2c567fc --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "aranya", + "displayName": "Aranya", + "version": "0.3.2", + "description": "Indian environmental-law skills for Claude Code: NGT case analysis, EIA review and restoration-scaled damage (REA/HEA) arguments, each citing a source-checked catalog. Skills, catalog and calculator; the write guards need an Aranya workspace.", + "author": { + "name": "Aranya contributors", + "url": "https://github.com/prathikcannotcode/aranya" + }, + "homepage": "https://github.com/prathikcannotcode/aranya#readme", + "repository": "https://github.com/prathikcannotcode/aranya", + "license": "Apache-2.0", + "keywords": ["environmental-law", "india", "ngt", "eia", "rea", "hea"], + "skills": "./.claude/skills/" +} diff --git a/.claude/skills/eia-review/SKILL.md b/.claude/skills/eia-review/SKILL.md index ae234b9..0fcf12c 100644 --- a/.claude/skills/eia-review/SKILL.md +++ b/.claude/skills/eia-review/SKILL.md @@ -31,6 +31,7 @@ Review a supplied EIA report or Environmental Clearance against the EIA Notifica - Cites the 2006 Notification, never the 2020 draft. - Every finding cites the provision and its `verification` state; tooling, not legal advice. - A finding needs a `catalog_id` from `catalog/provisions.json`. If the provision is not in the catalog, raise a flag naming it and tell the user the catalog needs an entry; do not write a finding on it. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. ## Commands diff --git a/.claude/skills/env-case-analysis/SKILL.md b/.claude/skills/env-case-analysis/SKILL.md index d92f314..fc61d89 100644 --- a/.claude/skills/env-case-analysis/SKILL.md +++ b/.claude/skills/env-case-analysis/SKILL.md @@ -31,6 +31,7 @@ Open and orient a matter. Decide the forum before anything else, map the applica - Decide forum/jurisdiction before drafting any relief. - Every finding cites a provision and repeats its `verification` state; nothing unverified reaches a court-facing output. - A finding needs a `catalog_id` from `catalog/provisions.json`. If the provision is not in the catalog, raise a flag naming it and tell the user the catalog needs an entry; do not write a finding on it. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. - No merits prediction; this is tooling, not legal advice. ## Commands diff --git a/.claude/skills/env-catalog/SKILL.md b/.claude/skills/env-catalog/SKILL.md index 3874028..0947b9d 100644 --- a/.claude/skills/env-catalog/SKILL.md +++ b/.claude/skills/env-catalog/SKILL.md @@ -29,6 +29,7 @@ Everything traces to an entry in `catalog/provisions.json`, each carrying a `sou - Every answer repeats the item's `verification` state. If `verify`/`unverified`, say so and name what a human must confirm. - The draft EIA Notification 2020 is not in force; cite only the 2006 Notification as operative. - This is tooling, not legal advice. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. ## Commands diff --git a/.claude/skills/hea-rea-calculator/SKILL.md b/.claude/skills/hea-rea-calculator/SKILL.md index dacb8f3..70f71a7 100644 --- a/.claude/skills/hea-rea-calculator/SKILL.md +++ b/.claude/skills/hea-rea-calculator/SKILL.md @@ -21,7 +21,7 @@ Size compensatory restoration by matching the discounted ecological-service loss ## Capabilities 1. **Gather inputs** per `injury-params.schema.json`: `method` (`HEA` or `REA`), `injured_area` in hectares, `baseline_service` and `injured_service` (0..1), `injury_years`, `recovery_years`, `restoration_gain` (0..1), `restoration_years` and `discount_rate` as a fraction (0.03 means 3%). Optional: `restoration_lag` (years from the start of the injury until restoration delivers service), `restoration_unit_cost` per hectare, `currency`. If any required input is missing, ask for it. Never assume one. -2. **Run** `npm run calc -- --out matters/{id}/calc/{run}.json`. The calculator validates the inputs and refuses bad ones; show the user its message rather than adjusting the numbers yourself. When the record contradicts the inputs you were given, run them as given first, then each labelled alternative from its own file in `matters/{id}/inputs/`. +2. **Run** `npm run calc -- --out matters/{id}/calc/{run}.json`. The calculator validates the inputs and refuses bad ones; show the user its message rather than adjusting the numbers yourself. When the record contradicts the inputs you were given, run them as given first, then each labelled alternative from its own file in `matters/{id}/inputs/`. Installed as a plugin with no Aranya workspace here, run `node "${CLAUDE_PLUGIN_ROOT}/.claude/scripts/hea-rea.mjs" ` with no `--out` and save its output, unchanged, to `matters/{id}/calc/{run}.json`. 3. **Read the output** — debit and credit in discounted service-hectare-years, the restoration area needed, the scaling ratio, and an optional cost when an expert unit cost is supplied. 4. **Sensitivity**: always present `range` first (area, and cost if there is one). It moves each expert input by `sensitivity_pct` one at a time, so it is not a worst case; say which rows move the result most. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d98ad9..401e8aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ Changes carried over from Vigil's 11 November guardrail review, and answers to t ### Catalog - `catalog/patches/2026-11-source-pack/QUESTIONS-FOR-COUNSEL.md` is back. Release 0.3.0 deleted it, but seven catalog notes still send readers there for Q1 to Q3. +### Plugin +- Aranya installs as a Claude Code plugin: `.claude-plugin/plugin.json` and a marketplace file. It ships the skills, the catalog and the calculator, and no hooks, because a plugin-wide write guard would block every edit in a project with no layout. Four skills say where to find the catalog and the calculator when there is no workspace. + ## 0.3.2 (2026-11-09) - The README says where Aranya comes from: the book *Evolution of Environmental Jurisprudence in India: The National Green Tribunal* (Cambridge University Press, 2025), and the aim of making REA/HEA compensation analysis free and open to anyone. diff --git a/README.md b/README.md index 8b83914..9d3521c 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,18 @@ You need [Node.js 22+](https://nodejs.org) and [Claude Code](https://claude.com/ 5. **Start a matter.** Say *"Analyse this matter: untreated effluent degraded a mangrove stretch; the unit holds an EC."* Aranya checks the forum, applies the statutes, and records findings and flags under `matters/`. 6. **Quantify.** Give the injury and restoration parameters and run `/hea-rea-calculator`; it returns the restoration scale with its range. +### Or install the skills as a plugin + +```bash +claude plugin marketplace add prathikcannotcode/aranya +``` + +```bash +claude plugin install aranya@prathikcannotcode-aranya +``` + +The plugin carries the five skills (namespaced, as in `/aranya:env-catalog`), the catalog and the calculator, and they work in any project. It carries no hooks. Outside an Aranya workspace nothing enforces the write guard, schema validation or append-only flags, and the calculator's result is saved by the agent, so clone the repo for work that will reach a court. + ## Skills Every skill is a slash command. You can also describe the task in plain English and Claude picks the right one.