Skip to content

[codex] 正規化 architecture rework OpenSpec change - #52

Merged
monkey1sai merged 1 commit into
mainfrom
codex/openspec/architecture-rework-2026-05-14
May 14, 2026
Merged

monkey1sai merged 1 commit into
mainfrom
codex/openspec/architecture-rework-2026-05-14

Conversation

@monkey1sai

@monkey1sai monkey1sai commented May 14, 2026 •

Copy link
Copy Markdown
Owner

變更內容

  • 將 architecture-rework-2026-05-14 正規化為 OpenSpec CLI 可識別的 change 目錄。
  • 新增 proposal.md、design.md、tasks.md 與 13 個 delta spec 檔案。
  • 保留原 package 說明、decision alignment、manifest 與 contract drafts 到 change 內的 package/、docs/。
  • 將已完成的前置任務標記為完成:建立分支、確認沒有 nested .git、執行 strict validate。

為什麼

原本內容被包在 architecture-rework-2026-05-14-openspec/openspec/changes/...,OpenSpec CLI 只能看到外層 wrapper,導致 change 顯示 no-tasks 並且無法用正確 change id 驗證。這個 PR 把它整理成正式 OpenSpec change 格式,後續才能依 task list 推進 B 方案架構重構。

驗證

  • openspec validate architecture-rework-2026-05-14 --strict
  • openspec validate --all --strict
  • GitNexus detect_changes(scope=staged):risk level low,changed symbols 0,affected processes 0
  • staged secret keyword scan:無命中

未納入本 PR

  • 既有未提交的 AGENTS.md
  • 既有未提交的 CLAUDE.md
  • 未追蹤的 AI-BIM-governance standalone - 重構.html

本 PR 先只處理 OpenSpec change 正規化,不進行 runtime/code implementation。

Summary by CodeRabbit

  • Documentation
    • Updated architecture specifications defining service responsibilities and boundaries for IFC-to-USDC conversion workflows
    • Added API contract specifications for RVT intake, conversion job management, and USD stage composition
    • New deployment boundary requirements and platform readiness health reporting standards
    • Migration strategy with phased rollout guidance and risk mitigation documentation

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 485da3cf-c0af-4e5b-8016-86748f687103

📥 Commits

Reviewing files that changed from the base of the PR and between 5d83508 and d276ec8.

📒 Files selected for processing (26)
  • openspec/changes/architecture-rework-2026-05-14/design.md
  • openspec/changes/architecture-rework-2026-05-14/docs/architecture/ARCHITECTURE_ALIGNMENT_NOTES.md
  • openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/bim-review-platform-boundary-contract.md
  • openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/demo-readiness-evidence-v2.md
  • openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/revit-intake-rvt-ifc-bridge-contract.md
  • openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/streaming-conversion-authority-contract.md
  • openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/usd-stage-composition-contract.md
  • openspec/changes/architecture-rework-2026-05-14/package/APPLY_INSTRUCTIONS.md
  • openspec/changes/architecture-rework-2026-05-14/package/DECISION_ALIGNMENT.md
  • openspec/changes/architecture-rework-2026-05-14/package/PACKAGE_MANIFEST.json
  • openspec/changes/architecture-rework-2026-05-14/package/README.md
  • openspec/changes/architecture-rework-2026-05-14/proposal.md
  • openspec/changes/architecture-rework-2026-05-14/specs/bim-control-revit-intake-facade/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/bim-review-platform-boundary/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/conversion-webhook-lifecycle/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/demo-runtime-readiness-smoke/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/documentation-source-of-truth/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/multi-artifact-kit-routing/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/review-session-request-lifecycle/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/session-first-review-viewer/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/streaming-ifc-usdc-conversion-authority/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/streaming-multi-layer-payload-loading/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/streaming-usd-stage-composition/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/worker-artifact-pipeline/spec.md
  • openspec/changes/architecture-rework-2026-05-14/specs/worker-rvt-ifc-bridge/spec.md
  • openspec/changes/architecture-rework-2026-05-14/tasks.md

📝 Walkthrough

Walkthrough

This pull request introduces a complete OpenSpec architecture redesign package that redefines service responsibilities, conversion job ownership, and integration contracts across the BIM platform. It shifts IFC→USDC conversion authority from _worker to bim-streaming-server, restricts _worker to RVT→IFC bridging, introduces a fake Revit intake facade in _bim-control, and establishes explicit deployment boundaries and multi-layer USD stage composition semantics.

Changes

Architecture Rework 2026-05-14: Service Boundary & Conversion Authority Redesign

Layer / File(s) Summary
Architectural Vision & Decision Framework
openspec/changes/architecture-rework-2026-05-14/proposal.md, openspec/changes/architecture-rework-2026-05-14/design.md, openspec/changes/architecture-rework-2026-05-14/docs/architecture/ARCHITECTURE_ALIGNMENT_NOTES.md, openspec/changes/architecture-rework-2026-05-14/package/DECISION_ALIGNMENT.md
High-level proposal establishing the "B 方案" decision to move IFC→USDC conversion job ownership to bim-streaming-server, restrict _worker to RVT→IFC export bridging, introduce a _bim-control fake Revit intake facade, and define bim-review-platform as an integrated deployment boundary (no nested repos/submodules). Design document provides end-to-end service role definitions, new event flow sequences, and risk mitigation strategies.
Service Boundary & Integration Contracts
openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/*
Five draft API and webhook contracts defining explicit interaction protocols: _bim-control upload endpoint and rvt_uploaded event payload to _worker; _worker to bim-streaming-server ifc_ready webhook; streaming server conversion job creation/status/result endpoints with quality metrics; USD stage composition request (primary + ordered secondary layers) and result payloads; and bim-review-platform boundary health response shape with per-service invariants.
RVT Intake Facade & Worker Bridge Specifications
openspec/changes/architecture-rework-2026-05-14/specs/bim-control-revit-intake-facade/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/worker-rvt-ifc-bridge/spec.md
Behavioral specifications for the fake Revit intake facade (_bim-control) accepting RVT bytes/references without executing Revit or consuming licenses, creating source artifact metadata, and delegating readiness classification to _worker when Revit is absent; and the _worker RVT→IFC bridge handling rvt_uploaded events, creating queued export jobs, emitting IFC artifacts and ifc_ready webhooks, explicitly prohibiting IFC→USDC conversion ownership, and supporting optional fake fixture mode with clear evidence/lineage requirements.
Streaming Conversion Authority & USD Composition Specifications
openspec/changes/architecture-rework-2026-05-14/specs/streaming-ifc-usdc-conversion-authority/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/streaming-multi-layer-payload-loading/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/streaming-usd-stage-composition/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/bim-review-platform-boundary/spec.md
Specifications establishing bim-streaming-server as the IFC→USDC conversion job authority (creation from ifc_ready, job status polling, result retrieval with USDC, entity index, and mapping artifacts plus quality metrics summary); multi-layer USD stage composition semantics (single primary model as root layer, zero-or-more ordered secondary artifacts as subLayers); and bim-review-platform as a deployment boundary combining coordinator, streaming/conversion runtime, and web viewer with combined platform-level readiness that reports failing services separately.
Session Lifecycle, Routing & Component Integration
openspec/changes/architecture-rework-2026-05-14/specs/review-session-request-lifecycle/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/multi-artifact-kit-routing/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/session-first-review-viewer/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/worker-artifact-pipeline/spec.md
Integration specifications requiring review sessions to claim model readiness only with streaming-owned conversion evidence from bim-streaming-server; defining multi-artifact routing as coordinator selection (primary + ordered secondary) expressed in session stream config for streaming server to apply without acting as metadata authority; viewer consumption of stream config fields (conversion authority, job id, quality summary, stage composition) as read-only displays without recomputing metrics; and clarifying _worker artifact pipeline ownership (source intake metadata + RVT→IFC lineage) while bim-streaming-server owns USDC readiness, job status, and mapping-quality results.
Readiness Evidence Tiers, Webhook Lifecycle & Validation
openspec/changes/architecture-rework-2026-05-14/docs/contracts/drafts/demo-readiness-evidence-v2.md, openspec/changes/architecture-rework-2026-05-14/specs/conversion-webhook-lifecycle/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/demo-runtime-readiness-smoke/spec.md, openspec/changes/architecture-rework-2026-05-14/specs/documentation-source-of-truth/spec.md
Specifications defining readiness evidence tiers with per-service ownership and allowed status values (passed/failed/blocked/deferred/not_observed); explicit cross-tier invariants preventing historical _worker conversion evidence from establishing new streaming-owned conversion authority; conversion webhook lifecycle requirements for end-to-end correlation and idempotency, explicit callback failure recording separate from conversion success, and upstream failure blocking downstream success; demo runtime smoke tests classifying new B-scheme tiers across multiple scenarios; and documentation source-of-truth requirements mandating that AGENTS.md, README.md, project workflow, and roadmap describe the new authority split and deployment boundary.
Migration Strategy & Implementation Guidance
openspec/changes/architecture-rework-2026-05-14/design.md (phases A–D), openspec/changes/architecture-rework-2026-05-14/package/README.md, openspec/changes/architecture-rework-2026-05-14/package/APPLY_INSTRUCTIONS.md, openspec/changes/architecture-rework-2026-05-14/package/PACKAGE_MANIFEST.json, openspec/changes/architecture-rework-2026-05-14/tasks.md
Comprehensive implementation guidance including phased migration plan progressing from documentation-only through contract stubs to conversion execution authority transfer and integration testing; package manifest with file inventory and decision metadata; step-by-step apply instructions for branch creation, spec validation (openspec validate ... --strict), and rollout sequence (alignment → fixtures → stubs/contracts → authority migration → smoke tests); README summarizing used decisions and included specs; and detailed task checklist covering baseline/branch setup, source-of-truth alignments, component definition tasks, verification tests, and PR closeout requirements.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • monkey1sai/AI-BIM-governance#31: Updates OpenSpec readiness/evidence tiers and constraints around canonical batch conversion (worker-produced evidence semantics aligned with this PR's conversion-ownership boundary changes).
  • monkey1sai/AI-BIM-governance#49: Updates demo runtime readiness specs and single-Kit viewport proof rules, using the same readiness-evidence classification semantics introduced in this architecture rework.
  • monkey1sai/AI-BIM-governance#26: Establishes the documentation source-of-truth spec foundation that this PR updates to reflect new _worker vs bim-streaming-server authority semantics.

Poem

🐰 A rabbit's whisker-twitch of joy!
The architecture now flows clear:
Conversions flow through streaming's gate,
Workers tend their RVT-IFC bridge so fair.
No nested repos, just boundaries bright—
The platform hops forward, staged just right. ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/openspec/architecture-rework-2026-05-14

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.

@monkey1sai
monkey1sai marked this pull request as ready for review May 14, 2026 08:56
Copilot AI review requested due to automatic review settings May 14, 2026 08:56
@monkey1sai
monkey1sai merged commit e92424b into main May 14, 2026
1 check passed
@monkey1sai
monkey1sai deleted the codex/openspec/architecture-rework-2026-05-14 branch May 14, 2026 08:56
@monkey1sai
monkey1sai restored the codex/openspec/architecture-rework-2026-05-14 branch May 14, 2026 08:56

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 normalizes the architecture-rework-2026-05-14 OpenSpec change into the structure the OpenSpec CLI recognizes. Previously the content lived inside a wrapper directory (architecture-rework-2026-05-14-openspec/openspec/changes/...), which caused the CLI to display no-tasks and prevented validation by change id. The PR adds the standard OpenSpec artifacts (proposal.md, design.md, tasks.md, 13 spec deltas) plus supporting package/contract drafts, all documentation-only — no runtime code is touched.

Changes:

  • Add the canonical proposal.md, design.md, and tasks.md under openspec/changes/architecture-rework-2026-05-14/.
  • Add 13 ADDED / MODIFIED spec deltas defining the B-scheme architecture (streaming-server as IFC→USDC authority, worker as RVT→IFC bridge, platform as deployment boundary, etc.).
  • Preserve the original package README, decision alignment, manifest, architecture notes, and contract drafts under package/ and docs/.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
openspec/changes/architecture-rework-2026-05-14/proposal.md Why/What/Scope/Success criteria for the rework.
openspec/changes/architecture-rework-2026-05-14/design.md Detailed design: decisions, target roles, contracts, migration phases, risks.
openspec/changes/architecture-rework-2026-05-14/tasks.md Numbered task checklist with branch/baseline items marked done.
specs/bim-control-revit-intake-facade/spec.md New capability: fake Revit/RVT intake in _bim-control.
specs/worker-rvt-ifc-bridge/spec.md New capability: _worker as RVT→IFC bridge.
specs/worker-artifact-pipeline/spec.md Modify: split bridge from streaming-owned conversion.
specs/streaming-ifc-usdc-conversion-authority/spec.md New capability: streaming-server owns IFC→USDC.
specs/streaming-usd-stage-composition/spec.md New capability: primary/secondary USD layer composition.
specs/streaming-multi-layer-payload-loading/spec.md Modify: openStageRequest payload semantics.
specs/session-first-review-viewer/spec.md Modify: viewer displays streaming-owned status.
specs/review-session-request-lifecycle/spec.md Modify: session references streaming conversion readiness.
specs/multi-artifact-kit-routing/spec.md Modify: primary/secondary composition policy.
specs/bim-review-platform-boundary/spec.md New capability: platform as deployment boundary.
specs/conversion-webhook-lifecycle/spec.md New capability: correlation IDs and idempotent webhooks.
specs/demo-runtime-readiness-smoke/spec.md Modify: B-scheme readiness tiers.
specs/documentation-source-of-truth/spec.md Modify: source-of-truth alignment rules.
package/README.md, APPLY_INSTRUCTIONS.md, DECISION_ALIGNMENT.md, PACKAGE_MANIFEST.json Original package notes preserved.
docs/architecture/ARCHITECTURE_ALIGNMENT_NOTES.md Architecture alignment narrative.
docs/contracts/drafts/*.md Draft JSON/HTTP contracts for the new flows.

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

@monkey1sai
monkey1sai deleted the codex/openspec/architecture-rework-2026-05-14 branch May 14, 2026 08:59

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d276ec848d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


## MODIFIED Requirements

### Requirement: Worker artifact pipeline separates RVT→IFC bridge from streaming-owned IFC→USDC conversion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Mark new OpenSpec requirements as ADDED

This requirement is under ## MODIFIED Requirements, but there is no requirement with this title in the existing openspec/specs/worker-artifact-pipeline/spec.md (I checked the current requirement headings). The same pattern appears in the other modified deltas, so strict OpenSpec validation/archive will treat these as modifications to non-existent requirements rather than new requirements, blocking the change even though tasks.md marks validation as complete. Use ADDED for genuinely new requirements or modify the exact existing requirement titles.

Useful? React with 👍 / 👎.

#### Scenario: Conversion job failure is honest

- **WHEN** converter execution fails, USDC is missing, USDC cannot be opened, or mapping generation fails past allowed policy
- **THEN** `bim-streaming-server` marks the job `failed` or `succeeded_with_warnings` only when explicitly allowed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the warning status to the enum

This scenario permits succeeded_with_warnings, but the same design's conversion status enum only defines queued, running, succeeded, failed, and cancelled. When implementers wire the status/result contract or tests from these specs, warning conversions will either use an undocumented status or be rejected by enum validation. Please add succeeded_with_warnings to the status enum/contract or model warnings as fields on succeeded.

Useful? React with 👍 / 👎.

"touches_runtime_code": false,
"files": [
{
"path": "APPLY_INSTRUCTIONS.md",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use one path base for manifest entries

The manifest's path values are inconsistent: this entry only exists under package/APPLY_INSTRUCTIONS.md, the docs/... entries only exist under the change directory, and the openspec/changes/... entries only resolve from the repo root. Any integrity check or packaging script that reads this manifest with a single base directory will fail to find or hash a subset of the files, so the package cannot be verified reliably.

Useful? React with 👍 / 👎.


### D2. Keep live streaming runtime separate from heavy conversion execution

Although `bim-streaming-server` owns the conversion job, the actual heavy converter SHOULD run in a headless converter app / subprocess / job lane, not inside the live WebRTC viewport runtime thread.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep OpenSpec prose in Traditional Chinese

The repo-local AGENTS.md says OpenSpec artifacts should default to Traditional Chinese, with only API paths, schema fields, CLI flags, status enums, logs/errors, external product names, and parser-required headings kept in their original language. This design body is English prose, and the same pattern appears across several added specs/contracts, which violates the documentation source-of-truth rule reviewers and local stakeholders rely on. Please translate the prose while leaving contract literals unchanged.

Useful? React with 👍 / 👎.


### Modified existing capabilities

- `worker-artifact-pipeline`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update all worker conversion specs

This change lists worker-artifact-pipeline as the only worker conversion capability to modify, but repo-wide search shows existing specs such as worker-dev-ifc-source-selection and worker-demo-upload-convert-ui still require _worker to create conversion jobs, return _worker conversion results, and hand off worker-produced model.usdc. After archiving this change, those untouched source-of-truth specs will still contradict the B-scheme rule that _worker is no longer the IFC→USDC authority, so implementers will have conflicting requirements.

Useful? React with 👍 / 👎.

"force": false,
"allow_placeholder_ready": false,
"allow_fake_mapping": false
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include callback_url in the conversion contract

The create-job request in this contract closes without callback_url, while the design's _worker → bim-streaming-server payload includes that field and the webhook lifecycle spec requires _bim-control callback failures to be tracked separately. If implementers build from this contract, the streaming server has no per-job callback target to notify, so conversion_result_ready delivery either has to rely on an undocumented global default or cannot satisfy the callback observability requirements.

Useful? React with 👍 / 👎.

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