Skip to content

docs(plans): 實作紀律與技術債防線(AI coding 防呆 + 精準執行) - #214

Merged
monkey1sai merged 2 commits into
mainfrom
docs/ai-coding-discipline
Jun 16, 2026
Merged

monkey1sai merged 2 commits into
mainfrom
docs/ai-coding-discipline

Conversation

@monkey1sai

@monkey1sai monkey1sai commented Jun 16, 2026 •

Copy link
Copy Markdown
Owner

這個 PR 做什麼

新增一份「實作紀律與技術債防線」HOW 補充層,讓之後用 AI(Claude Code 等)照規格寫程式時不欠技術債、且依規格精準執行與驗收。需求與規格一字未改。

變更(純新增:273 insertions / 0 deletions)

  • 新增 docs/plans/ai-bim-governance-實作紀律與技術債防線.md(267 行)
  • README + 互動規格 + 設計規格 + 開發軌跡:各加 1 處純新增掛鉤指向主檔

主檔內容

  • 八條最高原則、技術債陷阱 D-01~D-23(含上一輪審批抓到的落差預防)
  • M0–M8 DoD 硬化(只把既有 DoD 講精準+要求附證據,不新增門檻)
  • IX 互動卡執行守則、識別碼/API「禁止偏離」清單、AI 動作邊界與防擅改、交付前總檢查表

效力與安全

  • 效力順序維持不變(互動規格 > v3 > v2 > 兩份 .html);與規格衝突時以規格為準
  • 經多 agent 交叉驗證(Haiku 盤點 / Sonnet 起草 / Opus 整合 / Sonnet 獨立驗證):純新增、無新需求門檻、無斷鏈

Summary by CodeRabbit

  • Documentation
    • Introduced implementation discipline and technical debt prevention guidelines with pre-delivery validation checklists, milestone acceptance gates, and execution rules for project delivery.
    • Enhanced governance documents with explicit cross-references clarifying relationships and precedence between specification, design, implementation discipline, and execution planning documents.

新增 ai-bim-governance-實作紀律與技術債防線.md(HOW 補充層,不改需求/規格):
- 八條最高原則、技術債陷阱 D-01~D-23、M0-M8 DoD 硬化(只補證據要求、不加新門檻)
- IX 互動卡執行守則、識別碼/API 禁止偏離清單、AI 動作邊界與防擅改、交付前總檢查表

README + 互動規格 + 設計規格 + 開發軌跡:各加純新增掛鉤指向主檔。

效力順序維持不變;與規格衝突時一律以規格為準。
經多 agent(Haiku 盤點 / Sonnet 起草 / Opus 整合 / Sonnet 獨立驗證)交叉驗證:
純新增(273 insertions, 0 deletions)、無新需求門檻、無斷鏈。
Copilot AI review requested due to automatic review settings June 16, 2026 05:07
@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@monkey1sai, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 21 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f37e179e-4cdd-4ee5-99ea-16eb4ab9a0bd

📥 Commits

Reviewing files that changed from the base of the PR and between 9754856 and e4843e8.

📒 Files selected for processing (1)
  • docs/plans/ai-bim-governance-實作紀律與技術債防線.md
📝 Walkthrough

Walkthrough

A new 267-line Markdown document ai-bim-governance-實作紀律與技術債防線.md is created, defining the HOW-layer for AI coding discipline: pre-delivery checklists, eight principles, 23 tech-debt traps, milestone DoD gates (M0–M8), IX interaction-card rules, forbidden-deviation lists, and a dangerous-action protocol. Four existing governance docs each receive a one-line cross-reference entry pointing to this new file.

Changes

AI Coding Discipline HOW-Layer Documentation

Layer / File(s) Summary
New implementation discipline document
docs/plans/ai-bim-governance-實作紀律與技術債防線.md
Introduces the complete HOW-layer document covering authority hierarchy, eight highest principles, D-01D-23 tech-debt trap list, M0M8 milestone DoD evidence requirements, IX interaction-card execution rules, forbidden-deviation contract for data model/API/route/ID, intent→confirm→audited dangerous-action protocol with SPEC-GAP TODO template, and the A~I pre-delivery total checklist with maintenance hooks.
Cross-references in existing governance docs
docs/plans/docs-plans-README.md, docs/plans/ai-bim-governance-設計規格.md, docs/plans/ai-bim-governance-互動實作規格與標準對齊.md, docs/plans/ai-bim-governance-開發軌跡與執行計畫.md
Each existing governance document gains a one-line "實作紀律 / 技術債防線" entry linking to the new file and declaring that the host document's requirements take precedence on conflict; the README also adds a row to its file-role table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • monkey1sai/AI-BIM-governance#203: Modifies the same docs-plans-README.md and ai-bim-governance-開發軌跡與執行計畫.md files in overlapping sections where the new implementation discipline cross-references are inserted.

Poem

🐰 Hop, hop — a checklist appears,
Eight principles guard against fears,
D-01 through D-23 stand tall,
A HOW-layer doc to guide them all.
No tech debt shall slip through my ears! 📋✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main addition: a new implementation discipline and technical debt safeguard documentation layer that serves as an AI coding safeguard and precise execution guide.
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 docs/ai-coding-discipline

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.

@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: 9754856046

ℹ️ 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".

**E · 官方工具邊界**
- ☐ E1 A2 diff 走 `ifcdiff`,無自寫比對〔鐵律9/C.1〕
- ☐ E2 無 `IfcConvert` 帶 `.usd/.usdc` 輸出〔C.2〕
- ☐ E3 BCF 走官方庫語意/自建 2.1,無完全自寫 BCF-XML〔C.1〕

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 Align BCF checklist with stdlib exporter

The current BCF export is deliberately implemented as a stdlib zipfile/XML writer to avoid importing the GPLv3 bcf-client at runtime (governance-service/bcf/bcf_writer.py:1-10, also surfaced in web-viewer-sample/src/console/data.ts:177). This new hard gate rejects “完全自寫 BCF-XML” and steers future work back to an official library, so following the checklist would either fail the existing as-built exporter or reintroduce the dependency/licensing risk it was designed to avoid. Please gate on BCF 2.1 conformance/tests instead of forbidding the current implementation strategy.

Useful? React with 👍 / 👎.

Comment on lines +160 to +161
`/ui`、`#home`、`#a1`、`#viewer`、`#conv`、`#sessions`、`#instances`、`#minio`、`#review`;operator 工具 `#kit`、`#demo-control`。
全部**無斜線**。不得新增、移除、改名任何 route(要改先改文件並確認)。

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 List all supported console routes

The current product shell registers many additional supported hashes in web-viewer-sample/src/console/data.ts:48-76 and routing.ts accepts them through PRODUCT_CONSOLE_ROUTES (web-viewer-sample/src/console/routing.ts:11-20). Marking this shortened set as the unique route contract and banning extra routes makes existing deep links such as #a2, #issues, #runtime, #coordinator, and #intake fail the new §8 I1 checklist, which can lead future work to reject or remove implemented pages. Distinguish the M0/core subset from the full supported route list, or include all aliases here.

Useful? React with 👍 / 👎.

| Issue `severity` | `Critical\|Major\|Minor` | 不得改名(`High/Low` 是錯的)、不得新增等級 |
| Issue `status` | `open\|in_progress\|resolved\|closed` | 不得新增/改名 |
| Issue `viewpoint` | 無 3D 時填 `null` | 不得填假空字串/空物件 |
| ConvJob `status` | `queued\|running\|done\|failed` | 不得新增中間狀態(如 `processing`) |

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 Allow actual conversion lifecycle statuses

The runtime already exposes conversion states beyond this list: the streaming authority uses queued/running/succeeded/succeeded_with_warnings/failed/cancelled (bim-streaming-server/.../conversion_authority.py:17), and coordinator intake separately has states such as accepted, queued_for_conversion, dispatched, and dispatch_failed (bim-review-coordinator/src/types.ts:150-161). Freezing ConvJob to only queued|running|done|failed will make the checklist reject valid API responses or encourage collapsing warning/cancel/dispatch evidence, which undermines the runtime status shown to operators. Please document the actual authority/coordinator state machines or call this a high-level v3 placeholder.

Useful? React with 👍 / 👎.

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 adds a new "implementation discipline and technical debt prevention" document (ai-bim-governance-實作紀律與技術債防線.md) as a supplementary HOW layer to the existing specification stack in docs/plans/. It codifies anti-patterns, checklists, and execution guardrails for AI-assisted coding sessions (e.g., Claude Code) to prevent technical debt accumulation and ensure precise adherence to existing specifications. Four existing docs receive single-line cross-reference hooks pointing to the new file.

Changes:

  • New 267-line guideline document with eight principles, 23 tech debt traps (D-01–D-23), milestone DoD hardening (M0–M8), IX interaction card execution rules, a "do not deviate" API/identifier list, and a comprehensive pre-delivery checklist (§8).
  • Cross-reference hooks added to the README, 開發軌跡 (v3), 設計規格 (v2), and 互動規格 headers — all pure insertions with no modification of existing content.

Reviewed changes

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

Show a summary per file
File Description
docs/plans/ai-bim-governance-實作紀律與技術債防線.md New guideline document: principles, tech debt traps, DoD hardening, IX card rules, identifier/API contracts, AI action boundaries, and pre-delivery checklist
docs/plans/docs-plans-README.md Added header-level cross-reference (line 8) and table row entry (line 19) pointing to the new file
docs/plans/ai-bim-governance-開發軌跡與執行計畫.md Added one cross-reference line in the header block (line 7)
docs/plans/ai-bim-governance-設計規格.md Added one blank line + one cross-reference line in the header block (lines 12–13)
docs/plans/ai-bim-governance-互動實作規格與標準對齊.md Added one cross-reference line in the header block (line 10)

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

- §3 出處欄「審批落差 N」加可回溯註記:指向同資料夾 2026-06-16 審批報告逐項落差表
- §6 issueId 措辭對齊 v3:由「禁止偏離的強制格式」改為「沿用 v3 §2.0.3 範例風格,改格式走 §7.2」
純文件、純語意潤飾,仍不改任何需求/規格。
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