Skip to content

docs: 收斂 agent governance 決策入口 - #318

Merged
monkey1sai merged 1 commit into
mainfrom
docs/governance-cleanup
Jul 9, 2026
Merged

monkey1sai merged 1 commit into
mainfrom
docs/governance-cleanup

Conversation

@monkey1sai

@monkey1sai monkey1sai commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

摘要

本 PR 是 docs-only governance cleanup,收斂本 repo 中容易讓 agent 反覆人工干預的文件矛盾:source-of-truth ladder、Codex workflow/model lane、Frontend Verification labels、GitNexus unavailable gate、MinIO/轉檔 current decision、A1/A3 狀態粒度、歷史 verification evidence 降權與 deploy PID-stop 安全邊界。

AI Coding Governance

Item Result
Linked issue User request in Codex session: docs governance contradiction cleanup
Requirement source AGENTS.md + docs audit findings from 2026-07-09 session
CODEOWNERS / owner review Required via normal PR review for governance docs
GitNexus evidence gitnexus detect-changes --repo AI-BIM-governance --scope staged => low risk, 0 affected processes; symbol mapping showed index drift, so raw staged file list also checked
gstack evidence Not applicable: docs-only governance cleanup, no user-facing route changed
Agent workflow changed? Yes: Codex workflow/model lane, worker schema, GitNexus unavailable gate, evidence labels
Required checks expected agent-governance, pr-review-agent, PR body evidence, standard GitHub branch protection checks

驗證

  • powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\tests\test-agent-governance-check.ps1
  • powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\tests\test-pr-body-evidence.ps1
  • powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\tests\test-pr-review-agent.ps1
  • git diff --cached --check
  • gitnexus detect-changes --repo AI-BIM-governance --scope staged

備註

  • 未修改 runtime code。
  • 未讀取或修改 .env。
  • 未跑 browser E2E,因本 PR 不改 user-facing route。
  • 主 checkout 既有 .gitignore dirty state 未納入本 branch。

Summary by CodeRabbit

  • Documentation
    • Clarified evidence and verification requirements for PRs, including required frontend checks, screenshots/traces, and completion labels.
    • Updated deployment guidance for handling blocked builds and process conflicts more safely.
    • Refined source-of-truth rules, artifact URL handling, and GitNexus unavailable-state behavior.
    • Aligned product planning docs with current MinIO browsing, conversion history, and A1 workflow status.

Copilot AI review requested due to automatic review settings July 9, 2026 03:18
@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c60ad6e2-275a-4642-b2b3-5b65d869f696

📥 Commits

Reviewing files that changed from the base of the PR and between dd4dff9 and 22b8990.

📒 Files selected for processing (18)
  • AGENTS.md
  • docs/AGENTS.md
  • docs/agents/advanced-agent-reasoning-contract.md
  • docs/agents/codex-loop-workflows.md
  • docs/agents/github-workflow.md
  • docs/agents/gitnexus-usage.md
  • docs/agents/product-operability-and-script-contract.md
  • docs/agents/sub-repo-verify-commands.md
  • docs/contracts/conversion-api.md
  • docs/contracts/review-session-api.md
  • docs/plans/ai-bim-governance-design-system-對齊矩陣.md
  • docs/plans/ai-bim-governance-互動實作規格與標準對齊.md
  • docs/plans/ai-bim-governance-前端對齊DS-保留後端-實作手冊.md
  • docs/plans/docs-plans-README.md
  • docs/plans/審批報告-docs-plans-SaaS改版-2026-07-06.md
  • docs/runbooks/one-click-deploy-smoke.md
  • docs/superpowers/specs/2026-06-23-a1a3-design-system-alignment-design.md
  • docs/verification/README.md

📝 Walkthrough

Walkthrough

This PR is a documentation-only update revising AGENTS.md and docs/agents/*.md governance rules: it restructures source-of-truth priority into agent-instruction vs runtime-truth axes, tightens PR evidence labeling tied to a validation script, defines a GitNexus unavailable gate, refines deploy Phase-3 blocker remediation, and corrects MinIO/conversion status claims in plan documents.

Changes

Agent governance and evidence rules

Layer / File(s) Summary
Source-of-truth priority and conflict resolution rules
AGENTS.md, docs/AGENTS.md, docs/agents/advanced-agent-reasoning-contract.md
Replaces single-list source-of-truth ordering with a two-axis model separating agent instruction priority from runtime/product behavior truth, and defines mismatch-handling rules.
Worker/reviewer dispatch and Codex loop output contracts
docs/agents/advanced-agent-reasoning-contract.md, docs/agents/codex-loop-workflows.md
Reworks worker/reviewer extraction rules, adds a Codex Model/Effort Lane Routing section, and replaces subagent/coordinator output schemas and the not-done report format.
PR frontend verification evidence labels
AGENTS.md, docs/agents/github-workflow.md, docs/agents/product-operability-and-script-contract.md, docs/agents/sub-repo-verify-commands.md, docs/contracts/conversion-api.md, docs/contracts/review-session-api.md, docs/verification/README.md
Ties PR completion status to machine-checked labels validated by a PR-body-evidence script, updates archival references, and documents artifact URL opacity and evidence tiers.
GitNexus unavailable gate handling
AGENTS.md, docs/agents/gitnexus-usage.md
Adds a GitNexus unavailable-gate section defining permissible scenarios, minimal repair commands, decision rules, and forbids bypassing the gate.
Deploy Phase-3 blocker remediation and skills governance
AGENTS.md, docs/agents/product-operability-and-script-contract.md, docs/agents/sub-repo-verify-commands.md, docs/runbooks/one-click-deploy-smoke.md
Requires deploy-checkout PID-tree evidence before rerunning deploy.ps1 -Build, downgrades .codex/skills adapter-modification severity, and adds a repo-root guard plus conditional backup to the cleanup script.
MinIO/conversion status corrections in plan docs
docs/plans/*.md, docs/superpowers/specs/2026-06-23-a1a3-design-system-alignment-design.md
Corrects claims about MinIO raw-folder browsing, conversion record connectivity, A1 v2 selection behavior, adds a backend-freeze exception record, and supersedes an older A3 design decision.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related issues

Possibly related PRs

🚥 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 is concise and accurately reflects the docs-only effort to consolidate agent governance decision points.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/governance-cleanup

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.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

PR Review Agent Summary

Field Value
Status passed
Risk low
PR 318
Head docs/governance-cleanup / 22b8990c41b293797db176271ddfd3f35fa18c54
Base main / dd4dff90f9e6951866eef38d6b42b280c8dfee14

Blockers

  • None

Warnings

  • None

Validation Commands

  • None selected

Checks

  • None

Human Review Notes

  • OpenSpec archive or formal spec evidence detected; active change-id validation was skipped.
  • Optional AI adapter is not required by policy and was skipped.

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 is a documentation-only governance cleanup that reconciles several contradictions across the repo's agent-facing docs so that agents stop needing manual intervention. It splits the previously conflated "agent instruction priority" vs "runtime/product behavior truth" ladders, adds a MinIO/conversion "current decision ledger" to prevent stale snapshots from overwriting current state, aligns the PR verification labels with the machine-checked truth in check-pr-body-evidence.ps1, adds a GitNexus-unavailable gate and a Codex model/effort lane map, tightens the deploy PID-stop safety boundary, and de-weights historical verification evidence. No runtime code is touched.

Changes:

  • Introduces two explicit priority tracks (agent-instruction vs runtime-behavior) and a §1.1 current-decision ledger; corrects MinIO/conversion status wording to match implemented endpoints.
  • Aligns Frontend Verification labels/tables with the 7 machine-required labels and documents an approved backend-freeze exception for the A1 for-ifc-ready rule-run proxy.
  • Adds a GitNexus-unavailable gate, a Codex model/effort lane routing table, tighter deploy PID-ownership rules, a verification-evidence index/tiers, and artifact-URL opacity notes.

Reviewed changes

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

Show a summary per file
File Description
AGENTS.md Splits source-of-truth into two ladders, tightens deploy PID-stop and .env echo rules, updates PR labels and .codex/skills blocker wording
docs/AGENTS.md Reframes docs/ as non-runtime authority; updates owns/not-owns and wiki/OpenSpec wording
docs/agents/advanced-agent-reasoning-contract.md Renames worker→worker/reviewer extraction, rewrites source-of-truth priority into two tracks
docs/agents/codex-loop-workflows.md Adds Codex model/effort lane routing section; renumbers later sections; wraps schemas in code fences
docs/agents/gitnexus-usage.md Adds a GitNexus-unavailable gate with allowed conditions and decisions
docs/agents/github-workflow.md Points Frontend Verification labels to the machine-checked 7-label set
docs/agents/product-operability-and-script-contract.md Drops non-required labels from the verification table; tightens deploy PID-ownership rule
docs/agents/sub-repo-verify-commands.md Aligns acceptance labels to machine truth; tightens deploy PID-ownership rule
docs/contracts/conversion-api.md Fixes stale AGENTS.md §1.A/§10/§11 reference to root AGENTS.md §1
docs/contracts/review-session-api.md Adds artifact-URL opacity note
docs/verification/README.md New evidence index with tiers and superseded/archival guidance
docs/runbooks/one-click-deploy-smoke.md Adds repo-root safety guard and env-file backup before cleanup
docs/plans/docs-plans-README.md Adds §1.1 current-decision ledger; updates MinIO/conversion role-table wording
docs/plans/ai-bim-governance-前端對齊DS-保留後端-實作手冊.md Adds approved backend-freeze exceptions table
docs/plans/ai-bim-governance-互動實作規格與標準對齊.md Updates data-storage current status to match implemented endpoints
docs/plans/ai-bim-governance-design-system-對齊矩陣.md Corrects #minio over/under-claim wording
docs/plans/審批報告-docs-plans-SaaS改版-2026-07-06.md Points inherited honesty framework to the new current decision
docs/superpowers/specs/2026-06-23-a1a3-design-system-alignment-design.md Adds superseded note deprecating the A3 clash implementation plan

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

@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: 22b8990c41

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

Remove-Item -LiteralPath .\web-viewer-sample\node_modules -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -LiteralPath .\.env.web-plane.host-kit -Force -ErrorAction SilentlyContinue
if (Test-Path -LiteralPath .\.env.web-plane.host-kit) {
Copy-Item -LiteralPath .\.env.web-plane.host-kit -Destination ".\.env.web-plane.host-kit.bak-$(Get-Date -Format yyyyMMddHHmmss)" -Force

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 Avoid leaving credential backups in the repo

When this smoke cleanup runs on a machine with a real .env.web-plane.host-kit, this line copies the private env file to .env.web-plane.host-kit.bak-<timestamp> under the repository root. That backup name is not ignored by the current .gitignore patterns (e.g. *.bak only covers names ending exactly in .bak), while the file can contain MinIO credentials, so operators following the runbook can accidentally leave and commit secrets. Please back it up outside the repo or use an ignored path/name before deleting the original.

Useful? React with 👍 / 👎.


| 主題 | 現行裁決 | Superseded / 禁用說法 |
|---|---|---|
| MinIO `#minio` | `#minio` 已接 coordinator `GET /api/minio/objects?prefix=&delimiter=/`,是真 MinIO raw-folder 逐層唯讀瀏覽;`GET /api/governance/files/tree` local_fs 仍是 A1 v2 另一選檔來源。 | 禁寫「只剩 local_fs 兩層樹」、「真 MinIO 三層待接」。三層「專案/種類/版本」只是 watcher 解析語意,不是 bucket 結構宣稱。 |

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 Update active MinIO guidance with the new truth

This new ledger makes GET /api/minio/objects the current #minio truth and forbids the old “local_fs only / true MinIO pending” wording, but the active implementation-discipline doc still says MinioDataPage only uses GET /api/governance/files/tree and that true S3/MinIO is NOT BUILT (docs/plans/ai-bim-governance-實作紀律與技術債防線.md lines 101, 162, and 224). Agents are told to use both files for implementation checks, so leaving the old active HOW guidance unmarked can make a later UI pass block or undo the MinIO path this row is trying to canonicalize. Please update that doc or mark those sections superseded in the same decision change.

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