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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ insert_final_newline = true
trim_trailing_whitespace = true

# Matched file extensions
[*.{py,js,ts,jsx,tsx,json,yml,yaml,toml,md,html,css,scss,less,sass,sh,zsh,bash,fish,rst,txt,ql,sql,csv,tsv,xml,svg,rs,go,java,kt,kts,scala,rb,php,swift,dart,elm,lua,zig,coq,v,agda,idr,purs}]
[*.{js,ts,jsx,tsx,json,yml,yaml,kyaml,toml,md,adoc,html,css,scss,less,sass,sh,zsh,bash,fish,sql,csv,tsv,xml,svg,rs,zig,adb,ads,ecx,c,cpp,h,hpp}]
indent_size = 4

# Makefile requires tabs
Expand Down
36 changes: 36 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: MPL-2.0
# GSBot — Garment Sustainability Bot
# Copy this file to `.env` and fill in the required values.
# https://github.com/hyperpolymath/gsbot

# ── Discord ──────────────────────────────────────────────────────────
# REQUIRED. Bot token from the Discord Developer Portal.
DISCORD_TOKEN=
# Command prefix (default "!").
DISCORD_PREFIX=!
# Comma-separated Discord user IDs allowed to run admin commands.
DISCORD_ADMIN_IDS=

# ── Database ─────────────────────────────────────────────────────────
# SQLite URL. Defaults to sqlite:///<cwd>/data/gsbot.db
DATABASE_URL=
# Echo SQL statements to the log (default false).
DATABASE_ECHO=false

# ── Caching ──────────────────────────────────────────────────────────
ENABLE_CACHING=true
CACHE_TTL=3600
CACHE_MAXSIZE=1000

# ── Logging ──────────────────────────────────────────────────────────
# TRACE | DEBUG | INFO | WARN | ERROR
LOG_LEVEL=INFO
# Optional file path for rolling log output (leave blank for stderr only).
LOG_FILE=

# ── HTTP ─────────────────────────────────────────────────────────────
API_TIMEOUT=30
API_RETRY_COUNT=3

# ── Telemetry ────────────────────────────────────────────────────────
ENABLE_ANALYTICS=false
56 changes: 28 additions & 28 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Auto-detect text files and perform LF normalization
* text=auto

# Denote all Python files as text
*.py text

# Denote all shell scripts as text
*.sh text

# Denote all Markdown files as text
# Denote all AsciiDoc files as text
*.adoc text
*.md text
*.asc text

# Denote all YAML files as text
*.yaml text
*.yml text

# kyaml files (hyperpolymath typed-YAML replacement)
*.kyaml text

# Denote all JSON files as text
*.json text

Expand All @@ -35,55 +34,56 @@
# Denote all Rust files as text
*.rs text

# Denote all Java files as text
*.java text

# Denote all Go files as text
*.go text

# Denote all C/C++ files as text
*.c text
*.cpp text
*.h text
*.hpp text
*.cxx text

# Denote all Lua files as text
*.lua text
# Denote all Ada/SPARK files as text
*.adb text
*.ads text

# Denote all Zig files as text
*.zig text

# Denote all Eclexia files (piloted in this repo)
*.ecx text

# Line endings
*.sh eol=lf
*.py eol=lf
*.adoc eol=lf
*.md eol=lf
*.yaml eol=lf
*.yml eol=lf
*.json eol=lf
*.toml eol=lf
*.rs eol=lf
*.zig eol=lf
*.adb eol=lf
*.ads eol=lf
*.ecx eol=lf
*.js eol=lf
*.ts eol=lf
Makefile eol=lf
Justfile eol=lf
Mustfile eol=lf
Dockerfile eol=lf
Containerfile eol=lf

# Language-specific attributes
*.py diff=python
*.js diff=javascript
*.ts diff=typescript
*.rs diff=rust
*.go diff=go
*.java diff=java
*.zig diff=zig
*.adb diff=ada
*.ads diff=ada

# Linguist-specific overrides
*.ecx linguist-language=Eclexia
*.kyaml linguist-language=YAML
*.adb linguist-language=Ada
*.ads linguist-language=Ada
*.coq linguist-language=Coq
*.v linguist-language=V
*.agda linguist-language=Agda
*.idr linguist-language=Idris
*.purs linguist-language=PureScript
*.elm linguist-language=Elm
*.rkt linguist-language=Racket
*.scm linguist-language=Scheme
*.clj linguist-language=Clojure
*.cljs linguist-language=Clojure
*.cljc linguist-language=Clojure
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Report a crash, wrong sustainability score, broken command, or data issue
title: "[bug] "
labels: ["bug", "triage"]
assignees: []
---

## Describe the bug

<!-- A clear description of what's wrong. -->

## To reproduce

Steps / command invoked (e.g. `!impact cotton`, `!compare polyester hemp`):

1.
2.
3.

## Expected behaviour

<!-- What did you expect to happen? -->

## Actual behaviour

<!-- What actually happened (paste the bot's output if relevant)? -->

## Environment

- GSBot version / commit:
- Data source (fixtures / live):
- Any relevant material/garment/brand identifiers:

## Additional context

<!-- Screenshots, logs, suspected scoring-formula issue, etc. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Discussions
url: https://github.com/hyperpolymath/gsbot/discussions
about: Ask questions and discuss sustainability methodology / axiology.
- name: Security disclosure
url: https://github.com/hyperpolymath/gsbot/security/advisories
about: Please report security vulnerabilities privately via advisories (see SECURITY.adoc).
- name: Standards / open-interop proposals
url: https://github.com/hyperpolymath/gsbot/issues/new?labels=standards,enhancement&template=feature_request.md
about: Propose new open standards integrations (RSS/ActivityStreams, catalogues, safety feeds).
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/data_curation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Data / material / brand curation
about: Add or correct material, garment, brand, or supplier data
title: "[data] "
labels: ["data", "good first issue"]
assignees: []
---

## Data class

- [ ] Material (water / CO2 / energy / chemical / biodegradability scores)
- [ ] Garment (category, weight, lifespan, care)
- [ ] Brand (environmental / labour / animal ratings, certifications)
- [ ] Supplier / facility (via Open Apparel Registry)
- [ ] Safety notice / recall feed
- [ ] Other:

## Source citation

<!-- Every data point needs a citable source. Link the LCA study, brand
transparency report, certification registry entry, or regulatory notice.
Uncited PRs will be returned for sourcing. -->

- Source URL:
- Publication date:
- Methodology / standard (e.g. GHG Protocol, ISO 14040, EU ECHA):

## Proposed entry

<!-- Paste the structured data. kyaml/yaml preferred; JSON acceptable. -->

```yaml
# example:
name: "…"
water_liters_per_kg: …
co2_kg_per_kg: …
energy_mj_per_kg: …
# …
```

## Confidence / provenance notes

<!-- Any caveats (regional variation, data quality tier, modelled vs measured). -->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature / vision request
about: Suggest new capability — material data, standards integration, Eclexia/verisimdb work, UI, detachable-panel features
title: "[feat] "
labels: ["enhancement"]
assignees: []
---

## Problem this solves

<!-- What user-visible or architecture-level need does this address? -->

## Proposed shape

<!-- If you have a design in mind — commands, UI surfaces, FFI seams, Eclexia
predicates, Pareto axes, open-standard endpoints — describe it here. -->

## Alternatives considered

<!-- Any alternatives you've thought about and why they're worse? -->

## Standards / interoperability

<!-- Does this touch STANDARDS.adoc? List the standards (e.g. ActivityStreams 2.0,
OAR, ILCD, EU Safety Gate, OpenAPI 3.1) and any schemas involved. -->

## References / prior art

<!-- Links to papers, oikosbot/echidna precedent, academic data sources, etc. -->
38 changes: 38 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
SPDX-License-Identifier: MPL-2.0
Thanks for contributing to GSBot! Before opening this PR please confirm:
-->

## Summary

<!-- What does this change do, and why? Link any issues it resolves. -->

## Checklist

- [ ] I have read CONTRIBUTING.md and accept MPL-2.0 for code / CC-BY-SA-4.0
for docs.
- [ ] All new source files carry an `SPDX-License-Identifier` header.
- [ ] `just fmt && just lint && just test` pass locally (or CI would pass them).
- [ ] If this changes the scoring kernel (`src/domain.rs`):
- [ ] Pure/total; no I/O, no panics.
- [ ] Tests pin the behaviour before and after.
- [ ] The C-ABI in `mod ffi` either stays stable or is versioned.
- [ ] If this adds an open-standard integration (feeds/catalogues/safety):
- [ ] STANDARDS.adoc updated with ✅/🧪/🔭 status.
- [ ] No proprietary lock-in; feeds are RSS/Atom/ActivityStreams/OpenAPI/etc.
- [ ] If this is data curation: every new number is cited (LCA study, brand
report, regulator feed, peer-reviewed source).
- [ ] I have not introduced Python or any other banned-language file (the
Hypatia scanner will flag this as CRITICAL).

## Testing

<!-- Which commands did you run? Which fixtures did you use? -->

## Screenshots / transcripts (if UX changes)

<!-- Paste Discord output snippets or dashboard screenshots. -->

## Notes for reviewers

<!-- Axial trade-offs, things to watch for, future work. -->
2 changes: 1 addition & 1 deletion .github/labels.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_generated_from": ".github/labels.yml in hyperpolymath/.git-private-farm",
"_do_not_edit": "regenerate with scripts/gen-labels-json.py",
"_do_not_edit": "regenerate with the fleet labels tooling (do NOT reintroduce Python — this repo is Rust/SPARK and Hypatia bans Python)",
"version": 1,
"labels": [
{
Expand Down
46 changes: 46 additions & 0 deletions .github/repo-meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: CC-BY-SA-4.0
# Repository metadata block — for manual application via
# https://github.com/hyperpolymath/gsbot/settings
# The arena bot token lacks public_repo scope, so these cannot be applied
# via the API; please paste them into the Settings UI.
name: gsbot
description: >-
GSBot (Garment Sustainability Bot) — a neurosymbolic Kautz-6 chat+dashboard
for fashion & textiles. Materials science, math & engineering for
triple-bottom-line sustainability: water/carbon/energy/chemical footprints,
LCA, Pareto-optimal trade-offs, circular economy, open-standards
catalogue/safety feeds (RSS+ActivityStreams), SPARK verification seam.
Rust/SPARK • Eclexia pilot • verisimdb/kyaml • Zig-API adapter.
homepage: https://hyperpolymath.github.io/gsbot
topics:
- sustainability
- fashion
- textiles
- garment
- materials-science
- lca
- life-cycle-assessment
- circular-economy
- triple-bottom-line
- pareto-optimality
- neurosymbolic
- discord-bot
- rust
- spark-ada
- eclexia
- verisimdb
- kyaml
- permaculture
- supply-chain
- open-standards
default_branch: main
has_issues: true
has_projects: false
has_wiki: false
has_discussions: true
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: true
delete_branch_on_merge: true
# Social preview image: upload static/social-preview.svg (or a 1280×640 PNG
# rendering of it) via Settings → Social preview.
Loading
Loading