---
phase: 36-registry-publishing-maintainer-docs
plan: 03
type: execute
wave: 2
depends_on:
  - 36-01
  - 36-02
files_modified: []
autonomous: false
requirements:
  - CREG-04
  - CREG-05

must_haves:
  truths:
    - "Draft PR submitted to duckdb/community-extensions with description.yml"
    - "CE build pipeline passes for the extension"
    - "Extension installable via INSTALL semantic_views FROM community"
  artifacts: []
  key_links:
    - from: "description.yml"
      to: "extensions/semantic_views/description.yml in CE fork"
      via: "manual copy during PR submission"
      pattern: "description.yml"
---

<objective>
Submit draft PR to DuckDB Community Extension Registry and verify the extension is installable.

Purpose: The CE build pipeline is the real validation that the hybrid Rust+C++ extension builds correctly across all platforms. A draft PR surfaces issues early (per D-07). After the pipeline passes and the PR is merged, the extension becomes installable from the community registry.
Output: CE PR submitted, extension installable
</objective>

<execution_context>
@$HOME/.claude/get-shit-done/workflows/execute-plan.md
@$HOME/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/36-registry-publishing-maintainer-docs/36-CONTEXT.md
@.planning/phases/36-registry-publishing-maintainer-docs/36-RESEARCH.md
</context>

<tasks>

<task type="checkpoint:human-action" gate="blocking">
  <name>Task 1: Submit draft PR to duckdb/community-extensions</name>
  <read_first>
    - description.yml (the file to copy to the CE fork)
    - .planning/phases/36-registry-publishing-maintainer-docs/36-RESEARCH.md (CE submission process details)
  </read_first>
  <action>
    This task requires manual human action because the CE PR must be submitted from the user's GitHub account.

    NOTE: This task should be executed AFTER the milestone branch is squash-merged to main
    (during /gsd:complete-milestone). The `ref` field in description.yml must be updated to
    the actual main branch merge commit SHA before submission.
  </action>
  <what-built>
    description.yml is ready at repo root with all required CE fields.
    MAINTAINER.md documents the full CE submission process.
  </what-built>
  <how-to-verify>
    Steps to submit:

    1. Complete milestone: squash-merge milestone/v0.5.4 to main, tag v0.5.4
    2. Get the merge commit SHA:
       ```bash
       git checkout main
       git rev-parse HEAD
       ```
    3. Update description.yml `ref` field with the actual SHA:
       ```bash
       # Replace PLACEHOLDER_COMMIT_SHA with the real SHA
       sed -i '' "s/PLACEHOLDER_COMMIT_SHA/$(git rev-parse HEAD)/" description.yml
       git add description.yml && git commit -m "chore: set CE ref to release SHA"
       ```
    4. Fork duckdb/community-extensions (if not already forked)
    5. Clone the fork:
       ```bash
       gh repo fork duckdb/community-extensions --clone
       cd community-extensions
       ```
    6. Create the extension directory and copy descriptor:
       ```bash
       mkdir -p extensions/semantic_views
       cp /path/to/duckdb-semantic-views/description.yml extensions/semantic_views/description.yml
       ```
    7. Submit as draft PR:
       ```bash
       git checkout -b add-semantic-views
       git add extensions/semantic_views/description.yml
       git commit -m "Add semantic_views extension"
       gh pr create --draft --title "Add semantic_views extension" \
         --body "Rust+C++ extension providing semantic views for DuckDB. Uses cargo build with cc crate for C++ shim compilation."
       ```
    8. Monitor the CE build pipeline in the PR checks
    9. If build fails, check logs for amalgamation download or C++ compilation issues
  </how-to-verify>
  <resume-signal>Provide the PR URL, or describe any build pipeline issues encountered</resume-signal>
  <acceptance_criteria>
    - Draft PR exists on duckdb/community-extensions
    - description.yml is at extensions/semantic_views/description.yml in the PR
    - ref field contains a valid 40-char commit SHA from the main branch
  </acceptance_criteria>
  <done>Draft PR submitted to duckdb/community-extensions with correct description.yml</done>
</task>

<task type="checkpoint:human-verify" gate="blocking">
  <name>Task 2: Verify extension is installable from community</name>
  <read_first>
    - description.yml (hello_world content to verify)
  </read_first>
  <action>
    This task verifies the extension is installable after the CE PR is merged.
    It may be deferred if the CE review process takes time.
  </action>
  <what-built>
    After the CE PR is merged and the registry is updated, the extension should be installable.
  </what-built>
  <how-to-verify>
    1. Open a fresh DuckDB CLI (matching the version in .duckdb-version):
       ```bash
       duckdb
       ```
    2. Install and load the extension:
       ```sql
       INSTALL semantic_views FROM community;
       LOAD semantic_views;
       ```
    3. Run the hello_world to verify end-to-end:
       ```sql
       CREATE TABLE demo(region VARCHAR, amount DECIMAL(10,2));
       INSERT INTO demo VALUES ('US', 100), ('US', 200), ('EU', 150);

       CREATE SEMANTIC VIEW sales AS
         TABLES (d AS demo PRIMARY KEY (region))
         DIMENSIONS (d.region AS d.region)
         METRICS (d.revenue AS SUM(d.amount));

       FROM semantic_view('sales', dimensions := ['region'], metrics := ['revenue']);
       ```
    4. Expected output: two rows with region and revenue columns
       - EU: 150.00
       - US: 300.00
  </how-to-verify>
  <resume-signal>Type "verified" if the hello_world works, or describe issues</resume-signal>
  <acceptance_criteria>
    - `INSTALL semantic_views FROM community` succeeds without error
    - `LOAD semantic_views` succeeds without error
    - The hello_world query returns correct results (EU=150, US=300)
  </acceptance_criteria>
  <done>Extension installable via INSTALL semantic_views FROM community, hello_world works end-to-end</done>
</task>

</tasks>

<verification>
- CE draft PR exists and build pipeline status is visible
- After merge: `INSTALL semantic_views FROM community; LOAD semantic_views;` works in fresh DuckDB
- hello_world produces correct output
</verification>

<success_criteria>
- Draft PR submitted to duckdb/community-extensions
- CE build pipeline passes (or issues are identified and tracked)
- Extension installable from community registry (after PR merge)
</success_criteria>

<output>
After completion, create `.planning/phases/36-registry-publishing-maintainer-docs/36-03-SUMMARY.md`
</output>
