GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Dexter-Yao/sustainability-workbench: Open-source AI drafting for ESG / sustainability reports: HKEX ESG Reporting Code (EN, 繁體) and China A-share SSE/SZSE/BSE guidelines. Source-traced drafts, Word export, self-hosted. 开源 ESG 可持续发展报告 AI 编制工具

BranchesTags
Open more actions menu

Latest commit

 

History

63 Commits
63 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
backend
backend
 
 
docs
docs
 
 
frontend
frontend
 
 
hooks
hooks
 
 
plugins/codex
plugins/codex
 
 
scripts/dev
scripts/dev
 
 
.gitignore
.gitignore
 
 
.gitleaks.toml
.gitleaks.toml
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
README.zh-CN.md
README.zh-CN.md
 
 
SECURITY.md
SECURITY.md
 
 
SETUP.md
SETUP.md
 
 
SETUP.zh-CN.md
SETUP.zh-CN.md
 
 
design.md
design.md
 
 

Repository files navigation

Sustainability Workbench

Open-source, self-hosted AI drafting for ESG and sustainability reports — HKEX and China A-share disclosure rules, exported to Word.

English · 简体中文 · Setup · Architecture · Handbook (Chinese)

Sustainability Workbench is an open-source (MIT) web application that drafts ESG and sustainability reports with large language models (LLMs) and exports them to Word (.docx). It writes section by section against a disclosure standard — the HKEX Environmental, Social and Governance Reporting Code, or the sustainability reporting guidelines of the Shanghai, Shenzhen and Beijing stock exchanges — drafting from the company information, metrics and documents you provide, and it shows which of your files and answers each block of text drew on. It runs on your own machine, with Azure OpenAI or any OpenAI-compatible model, including one you host yourself.

It is built for the people who prepare these reports: in-house reporting teams at companies of any size, and the consultants and accounting firms who do it on their behalf.

The report body with its content-sources panel

Generated prose with its sources on the right — which uploaded file supported this block, which questions you answered, and what the generation run did.

It drafts; it does not assure. What comes out is a draft for professional review — not an assurance opinion, not a compliance guarantee. Someone still has to read it and sign it off.

Supported disclosure standards

Rules and language live in knowledge packages — one package per rule set per language. You pick one when you create a report.

Package / language Standard
hkex_en
English
HKEX Listing Rules Appendix C2, Environmental, Social and Governance Reporting Code — the version effective 1 January 2025, including the Part D climate-related disclosures
hkex_zh_hant
Traditional Chinese
香港聯合交易所《證券上市規則》附錄 C2《環境、社會及管治報告守則》 — the same Code, with the same structure as hkex_en
sse_zh_hans
Simplified Chinese
Shanghai Stock Exchange Self-Regulatory Guidelines for Listed Companies No. 14 — Sustainability Report (Trial) (《上海证券交易所上市公司自律监管指引第14号——可持续发展报告(试行)》). A company listed in Shenzhen or Beijing names its own exchange's guideline — SZSE No. 17 or BSE No. 11 — as the basis instead

The exchange standards serve as the structure whether or not you are listed. Adding an exchange or a language means adding a package, not changing the generation pipeline.

A fourth package, for the GRI Standards, is present but sealed: it is not selectable when creating a report. It was built against a route that needs wording changes before it can honestly claim conformance.

When it fits, and when it doesn't

It fits if you are:

  • an HKEX-listed issuer preparing its annual ESG report, including the Part D climate-related disclosures;
  • an A-share company listed in Shanghai, Shenzhen or Beijing preparing a sustainability report under its exchange's guideline, whether that report is mandatory for you or voluntary;
  • an unlisted company whose customer, bank or tender has asked for an ESG report — plenty of companies write one for that reason rather than because a regulator did;
  • a consultant or accounting firm preparing drafts for clients.

It does not fit if you need:

  • a report under CSRD / ESRS, or one prepared "in accordance with" the GRI Standards;
  • carbon accounting — it takes the emission figures you enter, Scope 1, 2 and 3 included, but does not calculate emissions from activity data;
  • an assurance opinion or a compliance sign-off;
  • a hosted or multi-user service — it is a single-user application for your own machine.

Why not just hand the files to ChatGPT or another LLM

A sustainability report is constrained by the standard it follows: which topics must be covered, what each topic has to disclose, which metrics need numbers. Handing every file to a model and asking for a report fails in two places — it writes things the company never did, and it misses disclosures the standard requires.

Two constraints address that:

  • Agents select material; they don't write prose. A File Agent reads each document into a summary; a Mapping Agent decides which materials a given chapter may draw on. Neither produces report text. Prose is generated block by block, and each block only sees the facts assigned to it.
  • A deterministic gate stands before delivery. Code — not a model — checks completeness and consistency, and blocks the export with the location of anything that fails. The same report always gets the same verdict.

This is a workbench, not a one-click ESG report generator: you read the draft, revise it paragraph by paragraph, rewrite whole sections, and decide when it ships.

How it works

Five preparation steps, then generate:

  1. Company basics (required) — company, reporting period and, for A-share reports, which exchange's guideline is the basis
  2. Materiality assessment — decides which topics enter the report; the A-share package scores financial and impact materiality separately (double materiality)
  3. Quantitative metrics — each with its unit and definition: greenhouse gas emissions, energy, water, waste, workforce, health and safety, training, supply chain, anti-corruption and more
  4. Guided topic questions
  5. Document upload — policies, records and certificates as PDF, Word, Excel or PowerPoint files (scanned PDFs need the optional OCR component)

The last four can be left empty. After generation you get two Word files: a final version, and a review version carrying annotations about what still needs human confirmation.

The repository ships a fully synthetic corpus — two fictional companies, no real business data — so you can run the whole flow end to end without supplying anything of your own.

Edit any paragraph in place. The green dot marks what you changed, and the panel shows the difference from the generated draft:

A revised paragraph shown against the generated draft

Before export, a deterministic gate — no model involved — lists what still needs attention:

The pre-export checks drawer

Architecture

Your input
├─ Company basics (name, reporting period)          ┐
├─ Topic materiality scoring (what enters the report)├─────────────┐
├─ Quantitative metrics (emissions, workforce, waste)┘             │
└─ Documents (policies, records, certificates)                     │
        │                                                          │
        ▼                                                          │
   File Agent            material.file_agent                       │
   reads each file → traceable dossier                             │
        │                                                          │
        ▼                                                          │
   Mapping Agent         material.mapping_agent                    │
   picks material per chapter; selects, never writes               │
        │                                                          ▼
   ┌──────────────────────────────────────────────────────────────────┐
   │ Controlled evidence set — each block sees only its assigned facts │
   └──────────────────────────────────────────────────────────────────┘
        │
        ▼
   Block-by-block drafting   generation.blocks → generation.commit
        │                            ▲
        ▼                            │ blocking issue → back for revision
   Diagnostic gate           delivery.export_gate
        │
        ▼
   Final + review Word       delivery.docx.word / .review

Paragraph-by-paragraph revision is optional and sits between drafting and the gate. Of the four inputs only company basics is required; the rest may be left empty, and the system adjusts what it writes rather than inventing filler.

Full detail in docs/architecture.md.

FAQ

Is it free?

Yes. The code is MIT-licensed. What you pay for is model usage — your API provider's charges, or your own hardware if you run the model yourself.

Which models does it work with?

The default targets a named Azure OpenAI deployment. You can select your own deployment through the OpenAI-compatible configuration, including a model served by vLLM or Ollama. Choose a model that supports structured tool calls. See SETUP.md for configuration and details about the retired model names used by the DeepSeek and direct Kimi presets.

Does my data leave my machine?

Report data — the database, sign-in, uploaded files and exported documents — stays on your machine. The exception is the model: the text each drafting step needs is sent to the endpoint you configure. With a model running on your own machine, none of it leaves.

Does it support GRI, ISSB or CSRD?

Not as a reporting basis. The HKEX packages follow the Code's Part D, whose climate-related disclosures are structured after IFRS S2, but there is no standalone ISSB (IFRS S1 / S2) package and no CSRD / ESRS package. The GRI package is sealed, as described above.

Can it write a report with no documents uploaded?

Yes. Only company basics are required. Where materials or answers are missing, it adjusts what it writes rather than inventing filler, and the review version marks what still needs confirmation.

Is there a hosted version?

No. It is self-hosted only, and it is not built to be exposed to a public network.

Can I add another exchange, standard or language?

Yes — by adding a knowledge package; the generation pipeline stays as it is. See docs/architecture.md.

Getting started

Install Node.js 22 and uv, then run:

uv sync --project backend
npm ci --prefix frontend
make build-frontend
make run

The launcher opens a one-time browser session. The embedded SQLite database, originals, and Word files stay in your local data directory. Configure a model provider to analyse material and generate text. See SETUP.md for details and optional OCR and LibreOffice tooling.

For coding agents

Read CLAUDE.md and the architecture. Run make verify for the full project checks and make install-hooks to enable the pre-push checks. Tests use temporary SQLite files and synthetic reports.

Stack

Layer What
Backend Python / FastAPI, SQLite queue with an integrated worker
Frontend Next.js
Storage & auth SQLite and private files with a local launcher session
Export python-docx for rendering; LibreOffice optionally pre-computes TOC page numbers
Models Azure OpenAI by default; any OpenAI-compatible endpoint works without code changes

License

MIT. See LICENSE.

Generation quality depends on calibration, and calibration is specific to each firm's house style and review standards. If you want help building an evaluation setup for your own reports, or AI engineering support more broadly, get in touch — Dexter Yao, [email protected]

Clause numbers and metric names are cited as fact; the wording of disclosure requirements is rewritten rather than copied from official texts.

About

Open-source AI drafting for ESG / sustainability reports: HKEX ESG Reporting Code (EN, 繁體) and China A-share SSE/SZSE/BSE guidelines. Source-traced drafts, Word export, self-hosted. 开源 ESG 可持续发展报告 AI 编制工具

github.com/Dexter-Yao/sustainability-workbench/blob/main/docs/architecture.md

Topics

ai-agentsclimate-disclosuredocxdouble-materialityesgesg-reportingfastapihkexissbllmlocal-firstmateriality-assessmentnextjspythonreport-generationself-hostedsupabasesustainabilitysustainability-reporting

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.