---
phase: 36-registry-publishing-maintainer-docs
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - description.yml
  - LICENSE
  - Cargo.toml
autonomous: true
requirements:
  - CREG-01
  - CREG-02
  - CREG-03

must_haves:
  truths:
    - "description.yml exists at repo root with all required CE fields"
    - "hello_world in description.yml is self-contained and uses native DDL"
    - "LICENSE file content matches Cargo.toml license field (MIT)"
    - "Cargo.toml version is 0.5.4"
  artifacts:
    - path: "description.yml"
      provides: "CE registry descriptor"
      contains: "extension:"
    - path: "LICENSE"
      provides: "MIT license text"
      contains: "MIT License"
    - path: "Cargo.toml"
      provides: "Package metadata with correct version"
      contains: "version = \"0.5.4\""
  key_links:
    - from: "description.yml"
      to: "Cargo.toml"
      via: "version and license fields must match"
      pattern: "version: 0.5.4"
    - from: "description.yml"
      to: "LICENSE"
      via: "license field must match LICENSE file"
      pattern: "license: MIT"
---

<objective>
Create the description.yml file for DuckDB Community Extension Registry submission, fix the LICENSE file mismatch (BSD-3-Clause -> MIT), and bump Cargo.toml version to 0.5.4.

Purpose: The description.yml is the sole artifact required for CE registry submission. The license mismatch between LICENSE (BSD-3-Clause) and Cargo.toml (MIT) must be resolved before publishing. The version bump marks the milestone close.
Output: description.yml, updated LICENSE, updated Cargo.toml
</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="auto">
  <name>Task 1: Create description.yml and fix LICENSE mismatch</name>
  <files>description.yml, LICENSE</files>
  <read_first>
    - Cargo.toml (current version and license field)
    - LICENSE (current content -- BSD-3-Clause, needs replacing with MIT)
    - .github/workflows/Build.yml (excluded_platforms reference -- line 33)
    - .planning/phases/36-registry-publishing-maintainer-docs/36-RESEARCH.md (canonical description.yml format)
  </read_first>
  <action>
    1. Create `description.yml` at repo root (per D-08) with the following exact content:

    ```yaml
    extension:
      name: semantic_views
      description: "Semantic views -- a declarative layer for dimensions, metrics, and relationships"
      version: 0.5.4
      language: Rust
      build: cargo
      license: MIT
      excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl;linux_arm64_musl;windows_arm64"
      requires_toolchains: "rust;python3"
      maintainers:
        - anentropic

    repo:
      github: anentropic/duckdb-semantic-views
      ref: PLACEHOLDER_COMMIT_SHA

    docs:
      hello_world: |
        -- Create sample data
        CREATE TABLE demo(region VARCHAR, amount DECIMAL(10,2));
        INSERT INTO demo VALUES ('US', 100), ('US', 200), ('EU', 150);

        -- Define a semantic view
        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));

        -- Query it
        FROM semantic_view('sales', dimensions := ['region'], metrics := ['revenue']);
      extended_description: |
        Semantic views let you define dimensions, metrics, joins, and filters once,
        then query any combination. The extension handles GROUP BY, JOIN, and filter
        composition automatically. Supports multi-table joins with PK/FK relationships,
        fan trap detection, role-playing dimensions, derived metrics, and FACTS.

        Documentation: https://anentropic.github.io/duckdb-semantic-views/
    ```

    Key decisions applied:
    - Per D-01: GitHub org is `anentropic` (not `paul-rl`)
    - Per D-02: hello_world uses single-table native DDL with CREATE TABLE + INSERT + CREATE SEMANTIC VIEW + query
    - Per D-03: version matches Cargo.toml (will be 0.5.4 after Task 2), language Rust, build cargo
    - Per D-04 + Build.yml reconciliation: excluded_platforms is the union of Build.yml `exclude_archs` and D-04 list
    - Per D-05: requires_toolchains is `rust;python3`
    - Per D-06: ref is a placeholder -- will be replaced with actual main SHA after squash-merge during /gsd:complete-milestone
    - Per D-08: description.yml lives in THIS repo at root

    2. Replace LICENSE file content with MIT license text:

    ```
    MIT License

    Copyright (c) 2026, Paul Garner

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    ```

    This resolves the license mismatch: LICENSE said BSD-3-Clause but Cargo.toml said MIT. MIT is canonical (per planning note and Cargo.toml).
  </action>
  <verify>
    <automated>grep -q 'name: semantic_views' description.yml && grep -q 'build: cargo' description.yml && grep -q 'license: MIT' description.yml && grep -q 'anentropic' description.yml && grep -q 'MIT License' LICENSE && echo "PASS" || echo "FAIL"</automated>
  </verify>
  <acceptance_criteria>
    - description.yml exists at repo root
    - Contains `name: semantic_views`
    - Contains `build: cargo`
    - Contains `language: Rust`
    - Contains `license: MIT`
    - Contains `github: anentropic/duckdb-semantic-views`
    - Contains `ref: PLACEHOLDER_COMMIT_SHA`
    - Contains `excluded_platforms:` with semicolon-separated string including all 8 excluded platforms
    - Contains `requires_toolchains: "rust;python3"`
    - Contains `maintainers:` with `- anentropic`
    - hello_world block contains CREATE TABLE, INSERT INTO, CREATE SEMANTIC VIEW, FROM semantic_view
    - extended_description mentions documentation URL
    - LICENSE file contains "MIT License" (not "BSD 3-Clause")
    - LICENSE file preserves "Copyright (c) 2026, Paul Garner"
  </acceptance_criteria>
  <done>description.yml has all required CE fields per rusty_quack format, hello_world is self-contained native DDL (per D-02), LICENSE is MIT (matching Cargo.toml)</done>
</task>

<task type="auto">
  <name>Task 2: Bump Cargo.toml version to 0.5.4</name>
  <files>Cargo.toml</files>
  <read_first>
    - Cargo.toml (current version field -- line 3)
  </read_first>
  <action>
    Per D-15: Update Cargo.toml `version` field from `"0.5.0"` to `"0.5.4"`.

    Change line 3:
    ```
    version = "0.5.0"
    ```
    to:
    ```
    version = "0.5.4"
    ```

    Do NOT change any other fields in Cargo.toml. The `license = "MIT"` field is already correct.
  </action>
  <verify>
    <automated>grep -q 'version = "0.5.4"' Cargo.toml && echo "PASS" || echo "FAIL"</automated>
  </verify>
  <acceptance_criteria>
    - Cargo.toml line 3 reads `version = "0.5.4"`
    - No other Cargo.toml fields changed
    - `license = "MIT"` still present
  </acceptance_criteria>
  <done>Cargo.toml version is 0.5.4, matching description.yml version field</done>
</task>

</tasks>

<verification>
- `grep 'version: 0.5.4' description.yml` returns a match
- `grep 'license: MIT' description.yml` returns a match
- `grep 'version = "0.5.4"' Cargo.toml` returns a match
- `grep 'MIT License' LICENSE` returns a match
- `just test-all` passes (version bump and LICENSE change should not break tests)
</verification>

<success_criteria>
- description.yml exists at repo root with all CE-required fields
- LICENSE file is MIT (resolving mismatch with Cargo.toml)
- Cargo.toml version is 0.5.4
- hello_world is self-contained: CREATE TABLE, INSERT, CREATE SEMANTIC VIEW, query
- All tests pass
</success_criteria>

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