---
name: anti-silo-implementation
scope:
  - '*'
products:
  - '*'
id: ka-hard-rule-防孤岛实现规则
asset_kind: governance_rule
lifecycle_status: active
authority: canonical
owner_mechanism_id: mc-main-path-integration
routes: ['*']
primary_triggers:
  - 防孤岛实现规则
secondary_triggers: []
negative_triggers: []
priority: P0
specificity: 5
consumes:
  - mc-workflow-contract
hard_blocks:
  - 模块无entry_trace
  - orphan_module
fallback: manual_required
required_evidence:
  - main_path_integration
  - orphan_scan
version: 1.1.0
last_reviewed: '2026-06-01'
type: governance_rule
when: 防孤岛实现规则
stages: ["*"]
---

# 防孤岛实现规则

## 核心原则

新增生产代码不能只证明"文件存在、单测通过"，必须证明它已经进入真实主链路。

## 完成定义

Done = implemented + wired + reachable + observable + verified

## 规则

1. 新增 src/ 代码只被测试导入 → hard_fail
2. enforced 能力无入口链路 → hard_fail
3. 只有 registry/index export 引用不得标记为 integrated
4. 已接入模块必须有集成测试证明真实入口能触发
5. diagnostic_code 必须能由真实路径产出

## 验收标准

- [ ] 新增模块有 production_imports
- [ ] entry_traces 包含完整调用链
- [ ] integration_tests 覆盖真实入口触发
- [ ] observability_refs 包含可观测证据
