Skip to content

feat(deploy): add LLM agentic release notes skill suite for Data Commons Platform - #200

Draft
clincoln8 wants to merge 70 commits into
datacommonsorg:mainfrom
clincoln8:feat/release-notes-tool
Draft

feat(deploy): add LLM agentic release notes skill suite for Data Commons Platform#200
clincoln8 wants to merge 70 commits into
datacommonsorg:mainfrom
clincoln8:feat/release-notes-tool

Conversation

@clincoln8

Copy link
Copy Markdown
Contributor

Description

This PR introduces an end-to-end, LLM-native Skill Suite for generating publication-ready, partner-facing release notes for the Data Commons Platform (DCP) stack.

Instead of relying on rigid Python CLI scripts or manual PR curation, this tool provides a 4-step agentic workflow using LLM subagents and structured verification checkpoints:

Architecture & Skill Suite Breakdown:

  1. Master Orchestrator (deploy/generate_release_notes/SKILL.md): Entrypoint skill that orchestrates the release notes pipeline across 6 repositories and 6 container images.
  2. PR Extraction Skill (deploy/generate_release_notes/skills/pr-extraction/SKILL.md): Instructs subagents to resolve image tags across Artifact Registry (with user prompt fallback on missing tags), query merged PRs via gh pr list, extract change summaries & DCP impact, filter out intermediate release-window regressions and Base DC flag flips, and output human-verifiable text files (prs_*.txt).
  3. Release Delta Synthesis Skill (deploy/generate_release_notes/skills/release-delta-synthesis/SKILL.md): Analyzes all prs_*.txt files to distinguish true platform bug fixes present in prior releases vs. intra-release intermediate fixes, synthesizes salient features per container image (separating Mixer, MCP Agent Toolkit, and Website UI into distinct sections), and outputs IMAGE_DELTAS_<version>.txt.
  4. DCP Domain Context Skill (deploy/generate_release_notes/skills/dcp-context/SKILL.md): Architectural reference mapping DCP components, persona principles (external contracts, zero internal DB table exposure), and section mapping rules.
  5. Release Writer Skill (deploy/generate_release_notes/skills/release-writer/SKILL.md): Authors publication-ready release notes with dynamic Executive Summary scaling (2-3 sentences for major releases, 1 sentence for patch releases), two-tier Key Feature Updates (What's New + Specific Capabilities), GFM links ([repo#PR](URL)), and 4 grouped Bug Fix categories.
  6. Developer Guide (deploy/generate_release_notes/README.md): Comprehensive instructions for developers on how to prompt their LLM agent to execute the pipeline.

Technical Highlights

  • 1-to-1 Subagent Isolation: Spawns 6 dedicated subagents matching the 6 container image output files 1-to-1.
  • Strict User Prompt on Missing Tags: Prompts the user directly if an image tag is missing rather than making invalid assumptions.
  • Complete Ignored PRs Audit Log: Every ignored PR in prs_*.txt includes a 1-sentence Reason: explaining why it was excluded.
  • No Database Internals Exposure: Sanitizes internal Spanner table names (KeyValueStore, IngestionHistory) for partner-facing clarity.
  • Repo-Relative Link Portability: All skill references use relative paths without hardcoded user home directory URIs.

Verification

  • Successfully executed the complete 4-step pipeline to generate release notes for v1.1.0 -> v1.1.1 (RELEASE_NOTES_v1.1.1.md and IMAGE_DELTAS_v1.1.1.txt).
  • Evaluated generated outputs with subagent audit:
    • Executive summary: 23 words (dynamic budget).
    • Key Feature Updates: 4 major features with zero horizontal rule dividers between features.
    • Bug Fixes: Grouped into 4 functional categories with zero intermediate SDMX regression leaks.
    • Links: 100% valid GFM links [repo#PR](URL) without backtick formatting errors.

clincoln8 added 30 commits July 29, 2026 18:42
- Add ComponentConfig and SourceRule multi-repository mapping rules in config.py
- Add PullRequest, ComponentVersionInfo, and ReleaseInfoManifest models in models.py
- Add PRExtractor with gcloud container image tag lookup and single-call gh pr list date search in pr_extractor.py
- Add unit and integration tests in deploy/generate_release_notes/tests/
- Add generate-release-notes dependency group to pyproject.toml
…i pipeline (Flash + Pro)

- Add Two-Stage Gemini LLM Pipeline in feature_extractor.py (Stage 1 Flash noise filter + Stage 2 Pro synthesis and SOP classification)
- Add unit tests with mocked Gemini Client in test_feature_extractor.py
…ed PR IDs, SOPCategory enum, merged_at timestamps)
… FeatureUpdate model and Stage 2 Gemini prompt
…er using Gemini Pro

- Add ReleaseNotesWriter in release_notes_writer.py with agentic prompt following streamlined DCP template
- Add unit and integration test suite in test_release_notes_writer.py
…eration tool

- Connect Step 1 (PRExtractor), Step 2 (FeatureExtractor), and Step 3 (ReleaseNotesWriter) into click CLI
- Add test_main.py unit test suite
…etails across Feature Extractor and Release Notes Writer
…ipeline with direct bot/noise filtering instructions
…tform (focus on Ingestion Inputs & APIs, de-emphasize Spanner DB layer, drop internal testing)
…ng so t_max extends to current time for all repos
…de-emphasize Spanner DB layer in Release Notes Writer
…Enabled, focusing on explicit user actions and input types
clincoln8 added 17 commits July 29, 2026 20:34
…at (Change Summary + DCP Impact), and add IMAGE_DELTAS.txt pipeline stage
…tinct component sections in Release Delta Synthesis skill
…g resolution fallback, 6 dedicated subagents, and SOP mapping matrix
…ns for all ignored PRs, and simplify section mapping principles in dcp-context

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an agentic, skill-driven tool suite for generating partner-facing release notes for the Data Commons Platform (DCP), adding orchestrator and subagent skills alongside configuration and dependency updates in pyproject.toml and uv.lock. The review feedback highlights several necessary improvements, including resolving inconsistencies in the README regarding the number of skills and executive summary rules, replacing LaTeX arrows with standard Unicode arrows for proper markdown rendering, formatting the gcloud timestamp output to UTC to avoid timezone mismatches, and removing a contradiction in the release-writer skill instructions where a banned word was used.

Comment thread deploy/generate_release_notes/README.md Outdated

## Agentic Skill Suite Architecture

The release notes generation pipeline is structured into 4 modular `SKILL.md` instruction sets. Point your LLM agent at these skills to execute the generation process:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The text states that the pipeline is structured into "4 modular SKILL.md instruction sets", but the directory tree directly below lists 5 SKILL.md files (the master orchestrator plus 4 sub-skills). This should be updated to "5 modular SKILL.md instruction sets" or clarified as "1 master orchestrator and 4 subagent skills" to avoid confusion.

Suggested change
The release notes generation pipeline is structured into 4 modular `SKILL.md` instruction sets. Point your LLM agent at these skills to execute the generation process:
The release notes generation pipeline is structured into 5 modular SKILL.md instruction sets. Point your LLM agent at these skills to execute the generation process:

Comment thread deploy/generate_release_notes/README.md Outdated

### 4. Release Writer Skill (`skills/release-writer/SKILL.md`)
Defines the non-verbose, partner-facing GFM format:
- **Executive Summary**: 1 single sentence (max 25 words).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a discrepancy between the executive summary rule defined here and the one in skills/release-writer/SKILL.md. Here, it states that the executive summary is strictly "1 single sentence (max 25 words)". However, release-writer/SKILL.md defines a dynamic executive summary that scales up to "2-3 sentences" for large/feature-rich releases. Please update this description to reflect the dynamic scaling rules.

Suggested change
- **Executive Summary**: 1 single sentence (max 25 words).
- Executive Summary: Dynamic length scaling with release scope (2-3 sentences for major releases, 1 single sentence of max 25 words for patch releases).

Comment thread deploy/generate_release_notes/README.md Outdated
Comment on lines +93 to +99
| `datacommonsorg/website` | All PRs (excluding `cdc_data/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/mixer` | All PRs (`internal/server/`, `proto/`, `deploy/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/agent-toolkit` | All PRs (`src/datacommons_mcp/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/import` | `simple/` | Data Preprocessor (`preprocessing`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-data` |
| `datacommonsorg/import` | `pipeline/ingestion/` | Dataflow Worker (`dataflow_worker`) $\rightarrow$ Dataflow Templates |
| `datacommonsorg/import` | `pipeline/workflow/ingestion-helper/` | Ingestion Helper (`ingestion_helper`) $\rightarrow$ `datacommons-ingestion-helper` |
| `datacommonsorg/import` | `pipeline/workflow/aggregation-helper/` | Postprocessing Helper (`postprocessing`) $\rightarrow$ `datacommons-aggregation-helper` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The LaTeX math symbol $\rightarrow$ is used in the markdown table. In standard GitHub Flavored Markdown (GFM), this may not render correctly outside of a math block. It is cleaner and more portable to use a standard Unicode arrow () or a text arrow (->).

Suggested change
| `datacommonsorg/website` | All PRs (excluding `cdc_data/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/mixer` | All PRs (`internal/server/`, `proto/`, `deploy/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/agent-toolkit` | All PRs (`src/datacommons_mcp/`) | Core Services (`services`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-services` |
| `datacommonsorg/import` | `simple/` | Data Preprocessor (`preprocessing`) $\rightarrow$ `gcr.io/datcom-ci/datacommons-data` |
| `datacommonsorg/import` | `pipeline/ingestion/` | Dataflow Worker (`dataflow_worker`) $\rightarrow$ Dataflow Templates |
| `datacommonsorg/import` | `pipeline/workflow/ingestion-helper/` | Ingestion Helper (`ingestion_helper`) $\rightarrow$ `datacommons-ingestion-helper` |
| `datacommonsorg/import` | `pipeline/workflow/aggregation-helper/` | Postprocessing Helper (`postprocessing`) $\rightarrow$ `datacommons-aggregation-helper` |
| datacommonsorg/website | All PRs (excluding cdc_data/) | Core Services (services) → gcr.io/datcom-ci/datacommons-services |
| datacommonsorg/mixer | All PRs (internal/server/, proto/, deploy/) | Core Services (services) → gcr.io/datcom-ci/datacommons-services |
| datacommonsorg/agent-toolkit | All PRs (src/datacommons_mcp/) | Core Services (services) → gcr.io/datcom-ci/datacommons-services |
| datacommonsorg/import | simple/ | Data Preprocessor (preprocessing) → gcr.io/datcom-ci/datacommons-data |
| datacommonsorg/import | pipeline/ingestion/ | Dataflow Worker (dataflow_worker) → Dataflow Templates |
| datacommonsorg/import | pipeline/workflow/ingestion-helper/ | Ingestion Helper (ingestion_helper) → datacommons-ingestion-helper |
| datacommonsorg/import | pipeline/workflow/aggregation-helper/ | Postprocessing Helper (postprocessing) → datacommons-aggregation-helper |

Comment thread deploy/generate_release_notes/SKILL.md Outdated
Comment on lines +46 to +50
- **Subagent 1 (`services-extractor`)**: Extract PRs for `gcr.io/datcom-ci/datacommons-services` from `website`, `mixer`, `agent-toolkit` $\rightarrow$ write `output/prs_services.txt`.
- **Subagent 2 (`preprocessing-extractor`)**: Extract PRs for `gcr.io/datcom-ci/datacommons-data` (preprocessor) from `import` repo $\rightarrow$ write `output/prs_preprocessing.txt`.
- **Subagent 3 (`dataflow-worker-extractor`)**: Extract PRs for Dataflow Ingestion Worker from `import` repo $\rightarrow$ write `output/prs_dataflow_worker.txt`.
- **Subagent 4 (`ingestion-helper-extractor`)**: Extract PRs for Ingestion Helper Service from `import` repo $\rightarrow$ write `output/prs_ingestion_helper.txt`.
- **Subagent 5 (`postprocessing-extractor`)**: Extract PRs for Postprocessing Helper Service from `import` repo $\rightarrow$ write `output/prs_postprocessing.txt`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The LaTeX math symbol $\rightarrow$ is used here. Please replace it with a standard Unicode arrow () or text arrow (->) to ensure proper rendering in GFM.

Suggested change
- **Subagent 1 (`services-extractor`)**: Extract PRs for `gcr.io/datcom-ci/datacommons-services` from `website`, `mixer`, `agent-toolkit` $\rightarrow$ write `output/prs_services.txt`.
- **Subagent 2 (`preprocessing-extractor`)**: Extract PRs for `gcr.io/datcom-ci/datacommons-data` (preprocessor) from `import` repo $\rightarrow$ write `output/prs_preprocessing.txt`.
- **Subagent 3 (`dataflow-worker-extractor`)**: Extract PRs for Dataflow Ingestion Worker from `import` repo $\rightarrow$ write `output/prs_dataflow_worker.txt`.
- **Subagent 4 (`ingestion-helper-extractor`)**: Extract PRs for Ingestion Helper Service from `import` repo $\rightarrow$ write `output/prs_ingestion_helper.txt`.
- **Subagent 5 (`postprocessing-extractor`)**: Extract PRs for Postprocessing Helper Service from `import` repo $\rightarrow$ write `output/prs_postprocessing.txt`.
- Subagent 1 (services-extractor): Extract PRs for gcr.io/datcom-ci/datacommons-services from website, mixer, agent-toolkit write output/prs_services.txt.
- Subagent 2 (preprocessing-extractor): Extract PRs for gcr.io/datcom-ci/datacommons-data (preprocessor) from import repo write output/prs_preprocessing.txt.
- Subagent 3 (dataflow-worker-extractor): Extract PRs for Dataflow Ingestion Worker from import repo write output/prs_dataflow_worker.txt.
- Subagent 4 (ingestion-helper-extractor): Extract PRs for Ingestion Helper Service from import repo write output/prs_ingestion_helper.txt.
- Subagent 5 (postprocessing-extractor): Extract PRs for Postprocessing Helper Service from import repo write output/prs_postprocessing.txt.

1. **Artifact Registry Tag Resolution**:
Resolve the creation timestamp for `<prev_version>` and `<new_version>` for your assigned `image_uri`:
```bash
gcloud container images list-tags <image_uri> --filter="tags:<version>" --format="value(timestamp.datetime)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The gcloud container images list-tags command outputs the timestamp in the local timezone of the environment by default. Since GitHub's search API expects UTC timestamps, using local time can lead to timezone mismatches and missed or extra PRs in the query range. It is highly recommended to explicitly format the timestamp in UTC.

Suggested change
gcloud container images list-tags <image_uri> --filter="tags:<version>" --format="value(timestamp.datetime)"
gcloud container images list-tags <image_uri> --filter="tags:<version>" --format="value(timestamp.format('%Y-%m-%dT%H:%M:%SZ', tz=UTC))"

- **BANNED AI FLUFF WORDS (STRICT)**: DO NOT use AI cliché words: `seamlessly`, `empower`, `leveraging`, `robust`, `overhaul`, `delivers a major`, `comprehensive`, `fosters`, `game-changing`, `cutting-edge`, `paradigm`.
- **DYNAMIC EXECUTIVE SUMMARY**:
- The summary length and detail level MUST scale dynamically with the scope of the release.
- **Large / Feature-Rich Releases**: Provide a comprehensive 2–3 sentence overview highlighting all major capabilities, API protocols, preprocessor boosts, and critical fixes without an artificial word count cap.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a direct contradiction in the instructions. Line 15 explicitly bans the word comprehensive as an "AI fluff word". However, line 18 instructs the LLM to "Provide a comprehensive 2-3 sentence overview". This contradiction will likely confuse the LLM agent. Please replace comprehensive in line 18 with a non-banned alternative like detailed or thorough.

Suggested change
- **Large / Feature-Rich Releases**: Provide a comprehensive 2–3 sentence overview highlighting all major capabilities, API protocols, preprocessor boosts, and critical fixes without an artificial word count cap.
- Large / Feature-Rich Releases: Provide a detailed 2-3 sentence overview highlighting all major capabilities, API protocols, preprocessor boosts, and critical fixes without an artificial word count cap.

@clincoln8
clincoln8 marked this pull request as draft July 30, 2026 23:35
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.

1 participant