Skip to content

docs(openspec): 歸檔 optimize-worker-source-entity-enumeration 並同步 specs - #41

Merged
monkey1sai merged 2 commits into
mainfrom
claude/lucid-meitner-9004ce
May 13, 2026
Merged

monkey1sai merged 2 commits into
mainfrom
claude/lucid-meitner-9004ce

Conversation

@monkey1sai

@monkey1sai monkey1sai commented May 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 將 OpenSpec change optimize-worker-source-entity-enumeration 歸檔到 openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/(所有 4 個 artifacts 完成、26 個 tasks 全部勾選)
  • 將兩個 ADDED Requirements 合併進對應主規格
    • runtime-verification-evidence:新增 "Source entity enumeration optimization evidence"(3 scenarios)
    • worker-artifact-pipeline:新增 "Worker optimizes source entity enumeration for canonical IFC fixtures"(5 scenarios)

Test plan

  • openspec list 不再列出 optimize-worker-source-entity-enumeration 為 active
  • openspec/specs/runtime-verification-evidence/spec.md 已包含 source enumeration evidence 需求
  • openspec/specs/worker-artifact-pipeline/spec.md 已包含 worker enumeration optimization 需求

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a runtime verification evidence requirement for recording optimized source-entity enumeration results, timing, outcomes (including timeouts/blocks), and related gating state to ensure mapping baseline correctness.
    • Added guidance for conversion workers to treat entity enumeration as a measurable subphase with stable identity, additive diagnostics, prohibition of product-only fallbacks, and handling for timeout/advance scenarios.

Review Change Stack

… specs

將 optimize-worker-source-entity-enumeration change 歸檔至 archive/2026-05-13-,並把兩個 ADDED Requirements 合併到對應主規格:
- runtime-verification-evidence:新增 "Source entity enumeration optimization evidence"(3 scenarios)
- worker-artifact-pipeline:新增 "Worker optimizes source entity enumeration for canonical IFC fixtures"(5 scenarios)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 13, 2026 10:19
@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR adds complementary OpenSpec requirements: the worker spec defines source_entity_enumeration as a measurable conversion subphase with stable per-entity identities and no product-only fallback; the runtime-verification-evidence spec requires recording enumeration burn-down, timeout/blocking outcomes, and gating rules before advancing mapping coverage baselines.

Changes

Source Entity Enumeration Optimization Specification

Layer / File(s) Summary
Worker enumeration optimization subphase
openspec/specs/worker-artifact-pipeline/spec.md
Canonical IFC conversions must optimize source_entity_enumeration as a measurable subphase preserving the all-IFC-entity coverage denominator, with stable per-entity identity fields, deterministic blocking when all-entity iteration is unavailable (rejecting model.by_type("IfcProduct") fallback), and optional additive enumeration diagnostics remaining backward-compatible.
Runtime verification evidence capture and gating
openspec/specs/runtime-verification-evidence/spec.md
Runtime verification evidence must record the canonical batch's source_entity_enumeration burn-down with required fields (fixture identity, command/timeout, result, optimization summary, pre/post timing, entity counts, advancement flag, fallback usage, next phase/blocker), mandate timed_out/blocked outcomes with minimum_coverage_locked=false when enumeration times out, and enforce baseline-unlocked behavior when evidence is incomplete.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • monkey1sai/AI-BIM-governance#38: Implements worker streaming/progress and profiling behavior and the canonical “no IfcProduct fallback”/timeout evidence details referenced by these spec updates.
  • monkey1sai/AI-BIM-governance#33: Adds per-fixture phase timings/status diagnostics that align with the runtime evidence requirement to capture enumeration timing and timeout/blocking outcomes.
  • monkey1sai/AI-BIM-governance#35: Adds worker-side per-fixture timeouts and phase timing/progress reporting for the source_entity_enumeration phase referenced by this PR.

Poem

🐰 I counted entities one by one,
Timed the race beneath the BIM sun,
Workers hum, evidence hums too,
Baselines wait till the burn-down's through,
Hooray — coverage unlocks when the run is done!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title uses mixed language (Chinese characters with English terms) and is overly compact. While it references the main changes (archiving and syncing specs), it lacks clarity for English-speaking developers scanning PR history. Use a clear, English-language title that describes the primary change, such as 'docs(openspec): Archive source entity enumeration optimization change and sync specs' or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/lucid-meitner-9004ce

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (2)
openspec/specs/runtime-verification-evidence/spec.md (1)

221-245: 💤 Low value

Consider using Traditional Chinese for consistency with coding guidelines.

The new requirement and its scenarios are written entirely in English, while the coding guidelines specify that "OpenSpec artifacts must use Traditional Chinese (繁體中文) by default." The immediately preceding requirements in this file (lines 143-166 and 168-206) use Traditional Chinese, creating an inconsistency within the specification.

While the technical content properly complements the worker-artifact-pipeline spec changes and covers the necessary evidence capture scenarios, consider translating the requirement title, description, and scenario descriptions to Traditional Chinese for consistency with the guidelines and adjacent content. Technical terms, field names, and status values should remain in English as specified.

As per coding guidelines: "OpenSpec artifacts must use Traditional Chinese (繁體中文) by default; preserve original text for API paths, schema fields, CLI flags, status enums, log/error messages, external product names, and OpenSpec parser required headers."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openspec/specs/runtime-verification-evidence/spec.md` around lines 221 - 245,
Translate the new requirement block titled "Requirement: Source entity
enumeration optimization evidence" and its scenario headings/descriptions into
Traditional Chinese to match adjacent content, while preserving technical
identifiers and literals in English (e.g., `source_entity_enumeration`,
`timed_out`, `_worker`, `--limit 1 --timeout-seconds 600`, `conversion_job_id`,
`artifact_group_id`, USDC/artifact IDs, etc.); update the section title,
descriptive paragraphs, and scenario bullets to 繁體中文 but leave API/CLI flags,
schema field names, enums, and status values unchanged so the spec remains
consistent with the OpenSpec language guideline and adjacent lines.
openspec/specs/worker-artifact-pipeline/spec.md (1)

304-340: 💤 Low value

Consider using Traditional Chinese for consistency with coding guidelines.

The new requirement and its scenarios are written entirely in English, while the coding guidelines specify that "OpenSpec artifacts must use Traditional Chinese (繁體中文) by default." Additionally, the immediately preceding requirement (lines 253-302) uses Traditional Chinese extensively, creating an inconsistency within the same specification file.

While the technical content is sound and comprehensive, consider translating the requirement title, description, and scenario descriptions to Traditional Chinese to align with the established guidelines and maintain consistency with adjacent content. Technical terms, API paths, field names, and status enums should remain in English as specified in the guidelines.

As per coding guidelines: "OpenSpec artifacts must use Traditional Chinese (繁體中文) by default; preserve original text for API paths, schema fields, CLI flags, status enums, log/error messages, external product names, and OpenSpec parser required headers."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openspec/specs/worker-artifact-pipeline/spec.md` around lines 304 - 340,
Translate the requirement title, description paragraphs, and all scenario
headings/descriptions into Traditional Chinese while preserving English for
technical identifiers and literals (e.g., source_entity_enumeration,
ifc_entity_key, ifc_entity_id, ifc_class, ifc_guid, name,
source_ifc_entity_count, coverage_denominator, minimum_coverage_locked,
IfcProduct, model.by_type("IfcProduct")), keep the OpenSpec headers and
API/field/enum/CLI text exactly as-is, and ensure the translated text matches
the adjacent section style (lines 253-302) and retains original semantics and
formatting for parser-required headers and examples.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@openspec/specs/runtime-verification-evidence/spec.md`:
- Around line 221-245: Translate the new requirement block titled "Requirement:
Source entity enumeration optimization evidence" and its scenario
headings/descriptions into Traditional Chinese to match adjacent content, while
preserving technical identifiers and literals in English (e.g.,
`source_entity_enumeration`, `timed_out`, `_worker`, `--limit 1
--timeout-seconds 600`, `conversion_job_id`, `artifact_group_id`, USDC/artifact
IDs, etc.); update the section title, descriptive paragraphs, and scenario
bullets to 繁體中文 but leave API/CLI flags, schema field names, enums, and status
values unchanged so the spec remains consistent with the OpenSpec language
guideline and adjacent lines.

In `@openspec/specs/worker-artifact-pipeline/spec.md`:
- Around line 304-340: Translate the requirement title, description paragraphs,
and all scenario headings/descriptions into Traditional Chinese while preserving
English for technical identifiers and literals (e.g., source_entity_enumeration,
ifc_entity_key, ifc_entity_id, ifc_class, ifc_guid, name,
source_ifc_entity_count, coverage_denominator, minimum_coverage_locked,
IfcProduct, model.by_type("IfcProduct")), keep the OpenSpec headers and
API/field/enum/CLI text exactly as-is, and ensure the translated text matches
the adjacent section style (lines 253-302) and retains original semantics and
formatting for parser-required headers and examples.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 60611db9-f489-4c7e-b7af-394d88d5d684

📥 Commits

Reviewing files that changed from the base of the PR and between 97538fb and 2e68878.

📒 Files selected for processing (9)
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/.openspec.yaml
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/README.md
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/design.md
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/proposal.md
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/specs/runtime-verification-evidence/spec.md
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/specs/worker-artifact-pipeline/spec.md
  • openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/tasks.md
  • openspec/specs/runtime-verification-evidence/spec.md
  • openspec/specs/worker-artifact-pipeline/spec.md

依 CodeRabbit nitpick 建議,將同步進主規格的兩個 ADDED Requirements 改為繁體中文,與相鄰段落一致;技術識別字(API path、schema field、CLI flag、status enum、OpenSpec 標頭)保持原文。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

This PR archives the OpenSpec change optimize-worker-source-entity-enumeration into openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/ and syncs the “ADDED Requirements” into the main specs so canonical IFC verification can require measurable/optimized source_entity_enumeration behavior and associated runtime evidence.

Changes:

  • Adds a new requirement to worker-artifact-pipeline specifying optimized, measurable source_entity_enumeration semantics (including diagnostics and rejection of IfcProduct-only fallback).
  • Adds a new requirement to runtime-verification-evidence specifying what before/after optimization evidence must record.
  • Introduces a new archived change folder containing proposal/design/tasks plus the delta spec artifacts.

Reviewed changes

Copilot reviewed 2 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
openspec/specs/worker-artifact-pipeline/spec.md Synces “Worker optimizes source entity enumeration…” requirement into the main worker pipeline spec.
openspec/specs/runtime-verification-evidence/spec.md Synces “Source entity enumeration optimization evidence” requirement into the main evidence spec.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/tasks.md Archived task checklist and validation notes for the change.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/specs/worker-artifact-pipeline/spec.md Archived delta (“ADDED Requirements”) for worker pipeline spec.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/specs/runtime-verification-evidence/spec.md Archived delta (“ADDED Requirements”) for runtime evidence spec.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/README.md Archive README summarizing the change intent.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/proposal.md Archived proposal describing why/what/impact.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/design.md Archived design notes, decisions, risks, and current evidence.
openspec/changes/archive/2026-05-13-optimize-worker-source-entity-enumeration/.openspec.yaml Archive metadata for the change.

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

Comment thread openspec/specs/worker-artifact-pipeline/spec.md
Comment thread openspec/specs/runtime-verification-evidence/spec.md

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openspec/specs/runtime-verification-evidence/spec.md`:
- Line 225: The spec introduces a new flag key `minimum_coverage_locked=false`
but the established key used elsewhere is `minimum_coverage_baseline_locked`;
update the text to use the single canonical key
`minimum_coverage_baseline_locked` consistently (including the occurrence at the
other noted location) so runtime evidence parsing and baseline gating are
unambiguous; search for `minimum_coverage_locked` and replace with
`minimum_coverage_baseline_locked`, and verify any examples, schema entries, and
normative language reference the canonical key only.

In `@openspec/specs/worker-artifact-pipeline/spec.md`:
- Around line 339-340: The spec uses a non-canonical field name
`minimum_coverage_locked` in the new scenario; replace it with the canonical
`minimum_coverage_baseline_locked` everywhere in this scenario and any related
gate/evidence checks (including references in `_worker` behavior descriptions
and any examples/tests) so all gate logic, logging, and evidence contracts
consistently use `minimum_coverage_baseline_locked`; ensure any mention in
prose, JSON/YAML examples, and validation logic is updated to the canonical
symbol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a915aac-6458-4c22-877e-4d78c7f5784a

📥 Commits

Reviewing files that changed from the base of the PR and between 2e68878 and a633bbc.

📒 Files selected for processing (2)
  • openspec/specs/runtime-verification-evidence/spec.md
  • openspec/specs/worker-artifact-pipeline/spec.md

Comment thread openspec/specs/runtime-verification-evidence/spec.md
Comment thread openspec/specs/worker-artifact-pipeline/spec.md
@monkey1sai
monkey1sai merged commit 17e5255 into main May 13, 2026
1 check passed
@monkey1sai
monkey1sai deleted the claude/lucid-meitner-9004ce branch May 13, 2026 10:43
monkey1sai added a commit that referenced this pull request May 13, 2026
…e_locked 為兩層 key (#42)

* docs(openspec): archive optimize-worker-source-entity-enumeration 並同步 specs

將 optimize-worker-source-entity-enumeration change 歸檔至 archive/2026-05-13-,並把兩個 ADDED Requirements 合併到對應主規格:
- runtime-verification-evidence:新增 "Source entity enumeration optimization evidence"(3 scenarios)
- worker-artifact-pipeline:新增 "Worker optimizes source entity enumeration for canonical IFC fixtures"(5 scenarios)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(openspec): 將 source enumeration 需求翻譯為繁體中文以符合慣例

依 CodeRabbit nitpick 建議,將同步進主規格的兩個 ADDED Requirements 改為繁體中文,與相鄰段落一致;技術識別字(API path、schema field、CLI flag、status enum、OpenSpec 標頭)保持原文。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(openspec): 釐清 minimum_coverage_locked 與 minimum_coverage_baseline_locked 為兩層 key

CodeRabbit 於 PR #41 提出兩者在主規格並存疑似不一致;經與 `_worker` 程式碼比對確認兩者其實是兩個不同層級的 key、非別名:

- `quality_metrics.minimum_coverage_baseline_locked`:per-fixture/per-conversion result,由 converter 設定(_worker/app/converters.py、store.py)
- batch summary 頂層 `minimum_coverage_locked`:由 _worker/app/batch_verification.py 在所有 selected fixture 皆 baseline locked 且 coverage_status=pass 時匯總

於 worker-artifact-pipeline 與 runtime-verification-evidence 主規格各加一段澄清,避免再被誤判為命名不一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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