Skip to content

Add glossary with auto-update logic#4

Open
kkorotkov wants to merge 3 commits into
masterfrom
2k/add-glossary
Open

Add glossary with auto-update logic#4
kkorotkov wants to merge 3 commits into
masterfrom
2k/add-glossary

Conversation

@kkorotkov

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an automated glossary system to the Labs64.IO documentation repo, including a Python monitor that scans Labs64 org repositories for documentation changes and a scheduled GitHub Actions workflow to regenerate and propose glossary updates.

Changes:

  • Introduces scripts/glossary_monitor.py to fetch changed docs across labs64.io-* repos, call an OpenRouter-backed LLM, and regenerate GLOSSARY.md.
  • Adds the glossary source files (GLOSSARY-MANUAL.md, scripts/.glossary-auto.md, scripts/.glossary-state.json) and the generated GLOSSARY.md.
  • Adds a scheduled workflow (.github/workflows/glossary-monitor.yml) to run weekly and open/update a PR when glossary content changes.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/requirements.txt Adds Python dependencies for the monitor script.
scripts/glossary_monitor.py Implements repo scanning, change detection, LLM prompting, and glossary generation/state handling.
scripts/.glossary-state.json Seeds last-processed SHAs per repo for incremental runs.
scripts/.glossary-auto.md Seeds AI-generated glossary entries (auto source).
GLOSSARY.md Adds initial generated glossary output.
GLOSSARY-MANUAL.md Adds the manual glossary source-of-truth section.
.github/workflows/glossary-monitor.yml Schedules/executes the monitor and opens PRs for glossary updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/glossary_monitor.py
Comment thread scripts/glossary_monitor.py
Comment thread scripts/.glossary-auto.md Outdated
Comment thread .github/workflows/glossary-monitor.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Comment thread .github/workflows/glossary-monitor.yml Outdated
Comment thread .github/workflows/glossary-monitor.yml Outdated
Comment thread .github/workflows/glossary-monitor.yml Outdated
Comment thread scripts/glossary_monitor.py
Comment thread scripts/glossary_monitor.py
Comment thread scripts/.glossary-state.json Outdated
@kkorotkov
kkorotkov force-pushed the 2k/add-glossary branch 2 times, most recently from 1d59bb7 to 7ed59ba Compare July 8, 2026 13:38
@kkorotkov
kkorotkov requested a review from Copilot July 8, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated 8 comments.

Comment thread scripts/glossary_monitor.py
Comment thread scripts/glossary_monitor.py
Comment thread .github/workflows/glossary-monitor.yml
Comment thread .github/workflows/glossary-monitor.yml
Comment thread scripts/.glossary-auto.md
Comment thread scripts/.glossary-auto.md
Comment thread scripts/.glossary-auto.md
Comment thread scripts/.glossary-auto.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 13 comments.

Comment thread scripts/.glossary-auto.md

Internal source file maintained by `scripts/glossary_monitor.py`. Do not edit manually.

| **API Gateway** | API Gateway, AuditFlow, Payment Gateway | A reverse proxy that routes client requests to appropriate microservices, handling cross-cutting concerns like authentication, SSL termination, and rate limiting. | labs64.io/_posts/2025-05-26-labs64io-ecosystem-under-the-hood.md, labs64.io-auditflow/AGENTS.md, labs64.io-docs/payment-gateway/readme.md#general-architecture |
Comment thread scripts/.glossary-auto.md
| **Buyer** | Checkout | The end customer who interacts with the Checkout UI and completes the payment process. May be anonymous from the Checkout service perspective. | labs64.io-docs/checkout/checkout-service-spec-en.md#12-actors |
| **CDN (Content Delivery Network)** | API Gateway | A geographically distributed cache that serves static assets from edge locations to reduce latency. | labs64.io/_posts/2025-05-29-labs64io-ecosystem-architecture.md |
| **Condition Evaluator** | AuditFlow | A component that evaluates pipeline conditions against audit events using operators like equals, contains, regex, and range comparisons. | labs64.io-auditflow/AGENTS.md |
| **CorrelationIdFilter** | AuditFlow | A cross-cutting filter that populates trace_id and span_id into the logging MDC for distributed tracing correlation. | labs64.io-auditflow/AGENTS.md |
Comment thread GLOSSARY.md
| **Buyer** | [Checkout](https://github.com/Labs64/labs64.io-docs/blob/master/checkout/checkout-service-spec-en.md#12-actors) | The end customer who interacts with the Checkout UI and completes the payment process. May be anonymous from the Checkout service perspective. |
| **CDN (Content Delivery Network)** | [API Gateway](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-05-29-labs64io-ecosystem-architecture.md) | A geographically distributed cache that serves static assets from edge locations to reduce latency. |
| **Condition Evaluator** | [AuditFlow](https://github.com/Labs64/labs64.io-auditflow/blob/master/AGENTS.md) | A component that evaluates pipeline conditions against audit events using operators like equals, contains, regex, and range comparisons. |
| **CorrelationIdFilter** | [AuditFlow](https://github.com/Labs64/labs64.io-auditflow/blob/master/AGENTS.md) | A cross-cutting filter that populates trace_id and span_id into the logging MDC for distributed tracing correlation. |
Comment thread scripts/.glossary-auto.md
| **forwardAuth** | API Gateway, AuditFlow | A Traefik middleware that delegates authentication decisions to an external service by forwarding request headers. | labs64.io/_posts/2025-08-01-configuring-traefik-middleware-for-kubernetes.md, labs64.io-auditflow/AGENTS.md |
| **GammaLedger** | AI-Assisted Development | An open-source options trading portfolio tracker built as an experiment in AI-assisted development, demonstrating vibe-coding with multiple AI tools. | labs64.io/_posts/2025-10-31-how-i-vibecoded-gammaledger.md |
| **GitHub Copilot** | AI-Assisted Development | An AI-powered coding assistant that provides code completions, chat-based refactoring, and agentic multi-file editing within IDEs. | labs64.io/_posts/2025-10-31-how-i-vibecoded-gammaledger.md |
| **GlobalExceptionHandler** | AuditFlow | A cross-cutting component that provides centralized exception handling and consistent error responses across the service. | labs64.io-auditflow/AGENTS.md |
Comment thread GLOSSARY.md
| **forwardAuth** | [API Gateway](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-08-01-configuring-traefik-middleware-for-kubernetes.md), [AuditFlow](https://github.com/Labs64/labs64.io-auditflow/blob/master/AGENTS.md) | A Traefik middleware that delegates authentication decisions to an external service by forwarding request headers. |
| **GammaLedger** | [AI-Assisted Development](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-10-31-how-i-vibecoded-gammaledger.md) | An open-source options trading portfolio tracker built as an experiment in AI-assisted development, demonstrating vibe-coding with multiple AI tools. |
| **GitHub Copilot** | [AI-Assisted Development](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-10-31-how-i-vibecoded-gammaledger.md) | An AI-powered coding assistant that provides code completions, chat-based refactoring, and agentic multi-file editing within IDEs. |
| **GlobalExceptionHandler** | [AuditFlow](https://github.com/Labs64/labs64.io-auditflow/blob/master/AGENTS.md) | A cross-cutting component that provides centralized exception handling and consistent error responses across the service. |
Comment thread GLOSSARY.md
| **Loki** | [AuditFlow](https://github.com/Labs64/labs64.io-auditflow/blob/master/AGENTS.md), [Observability](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-06-11-helm-chart-repository.md) | A log aggregation system that collects and indexes logs from microservices for querying and visualization in Grafana. |
| **Metrics Server** | [Kubernetes](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-07-07-pod-metrics-in-kubernetes.md) | A cluster-wide aggregator of resource usage data (CPU, memory) that exposes the Kubernetes Metrics API for autoscaling and kubectl top. |
| **Middleware** | [API Gateway](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-08-01-configuring-traefik-middleware-for-kubernetes.md), Traefik | A Traefik component that modifies requests or responses before forwarding to services, enabling authentication, rate limiting, and header manipulation. |
| **OFX (Open Financial Exchange)** | [Checkout](https://github.com/Labs64/labs64.io/blob/master/_posts/2025-10-31-how-i-vibecoded-gammaledger.md), [AI-Assisted Development](https://github.com/Labs64/labs64.io-docs/blob/master/checkout/checkout-service-spec-en.md#11-core-domain-entities) | A standardized file format for exchanging financial data between institutions and applications, used by GammaLedger for broker transaction imports. |
Comment on lines +679 to +690
# 1. Discover repos
print("Discovering labs64.io-* repositories…")
repos = discover_repos(token)
print(f" Repos: {repos}")

# 2. Pre-populate default-branch cache (authenticated → higher rate limit).
# source_to_url() reads from this cache, so all URL generation after this
# point uses the correct branch per repo without extra API calls.
print("Fetching default branches…")
for repo in repos:
branch = get_default_branch(repo, token)
print(f" {repo}: {branch}")
Comment on lines +482 to +491
def build_docs_block(docs: dict[str, str]) -> str:
parts, total = [], 0
for path, content in docs.items():
block = f"=== {path} ===\n{content}\n"
if total + len(block) > MAX_PROMPT_CHARS:
parts.append(f"=== {path} === [omitted — character limit reached]\n")
break
parts.append(block)
total += len(block)
return "\n".join(parts)
- [ ] Context column lists the correct module(s)
- [ ] Alphabetical order is preserved

> Generated by [`scripts/glossary_monitor.py`](../blob/master/scripts/glossary_monitor.py)
Comment on lines +697 to +699
for repo in repos:
print(f" Checking {repo}…", end=" ", flush=True)
head_sha = get_head_sha(token, repo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants