Home / ccdawn / codex-skills · skills/engineering/briefbound-code-structure-guard/SKILL.md · GitHub

briefbound-code-structure-guard skillA

briefbound-code-structure-guard is agent-read markdown (skill) from ccdawn/codex-skills: Use when active development or explicit refactoring has concrete code-structure risk: a source file is accumulating independently changing responsibilities, a class/component/function is hard to navigate or test, repeated changes touch distant sections, or the user asks to split a giant file; do not use for line count alone, generated/vendor/migration/schema/fixture files, or cohesive modules that remain easier to maintain together..

Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.

What the file says

# Briefbound 代码结构守卫

## 目标

防止本轮开发继续制造多职责巨型文件。只提取稳定职责,不为压低行数制造薄包装、转发层或碎片目录。

## Briefbound task contract

- Context Boundary: 已对齐结果、当前开发 owner、目标文件、相邻模块、调用方、测试和允许写入范围。
- Output Contract: `STAY / CHECK / SPLIT` 判断;必要时完成最小职责拆分,并保持公共行为和验证证据。
- Allowed Action: 读取目标、调用方和测试;在授权 scope 内提取代码并验证;不重写模块、改变公共行为或全仓扫描。
- Success Evidence: 目标行为保持,提取单元具有可说明的职责和依赖边界,相关测试/类型/构建检查通过,且没有新增无价值抽象。
- Stop Condition: 行数是唯一信号、文件仍保持单一内聚职责、拆分会扩大用户范围、缺少行为保护,或需要公共 API/架构取舍。
- Route Out: 当前开发 owner、`briefbound-planning`、`briefbound-pr-review`、`briefbound-simplification-audit`、`briefbound-development-cleanup`、`briefbound-router` 或 BLOCKED。

## 统一调用契约

- 只处理 Briefbound task contract 范围;不匹配时回 `briefbound-router` 或当前 owner,不接管功能、Bug、性能或普通审查。
- 用户可见内容默认中文,只报结构决策、修改、证据和风险;保留代码、命令、路径、API、skill 名和枚举;Route Out 仅以 Briefbound task contract 为准;有自然闸门时末行 `下一步建议: <一个具体动作>`,否则声明继续已授权工作。

## 三档结构闸门

- `STAY`:职责内聚且修改位于同一行为边界。继续开发,不输出结构报告。
- `CHECK`:接近项目阈值、修改跨远距离区段或可能形成第二职责。检查 imports/exports、状态所有权、调用方和测试;证据不足即 `STAY`。
- `SPLIT`:至少存在两个独立信号,例如多个领域/层/生命周期混在一起、不同部分独立变化或复用、测试与所有权边界可分、反复修改造成导航或合并冲突。由本 skill 完成最小拆分。

优先使用项目规则;没有规则时,`函数约 75 行、类/组件约 300 行、源文件约 500 行` 只能触发 `CHECK`,不能单独触发 `SPLIT`。手写源文件超过约 800 行时优先检查,仍按职责判断。
…

Read the whole file at its exact version.

How to install

Latest version
mdr add ccdawn/codex-skills/briefbound-code-structure-guard@git:20260916.292b0ac
Exact content
mdr add ccdawn/codex-skills/briefbound-code-structure-guard@sha256:34df835913c2960f

Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_jd25hilwseakm2tw.svg)](https://markdownregistry.com/a/art_jd25hilwseakm2tw)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260916.292b0ac latest2026-09-16 292b0ac 3,933 BA view · diff
git:20260813.dec1d142026-08-13 dec1d14 3,883 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3933 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

ccdawn/codex-skills · 6 stars · license MIT · pushed 2026-09-22 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_jd25hilwseakm2tw
GET https://markdownregistry.com/api/v1/resolve?ref=ccdawn/codex-skills/briefbound-code-structure-guard
GET https://markdownregistry.com/api/v1/blob/34df835913c2960f95b40e012d28bcfdb824dca1f664e7f6baf4a18d7fe9e3b9

Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

More from ccdawn/codex-skills

AGENTS.md agents
ccdawn/codex-skills · AGENTS.md
git:20260813.dec1d14 · audit A · 6 stars
CLAUDE.md claude
ccdawn/codex-skills · CLAUDE.md
git:20260813.dec1d14 · audit A · 6 stars
briefbound-huawei-nslb-score-loop skill
ccdawn/codex-skills · skills/competition/briefbound-huawei-nslb-score-loop/SKILL.md · Use when a Huawei Algorithm Challenge 37 NSLB workspace needs live status, adaptive solver search, comparable…
git:20260916.292b0ac · audit A · 6 stars
briefbound-score-loop skill
ccdawn/codex-skills · skills/competition/briefbound-score-loop/SKILL.md · Use when repeated work is governed by an explicit metric, active baseline, candidate search, promotion rule…
git:20260916.292b0ac · audit A · 6 stars
briefbound-creative-toolbox skill
ccdawn/codex-skills · skills/creative/briefbound-creative-toolbox/SKILL.md · Use when the user wants non-obvious but useful ideas, concept invention, naming, reframing, variation, selection…
git:20260916.292b0ac · audit A · 6 stars
briefbound-diagram-design skill
ccdawn/codex-skills · skills/creative/briefbound-diagram-design/SKILL.md · Use when creating or redrawing structured diagrams such as architecture, flowcharts, sequences, ER/UML, timelines or…
git:20260916.ed1d50d · audit A · 6 stars
briefbound-api-contract skill
ccdawn/codex-skills · skills/engineering/briefbound-api-contract/SKILL.md · Use when a change touches an external contract surface - REST/GraphQL endpoints, request/response schemas, DB schema…
git:20260920.280b6d2 · audit A · 6 stars
briefbound-autonomous-collaboration-loop skill
ccdawn/codex-skills · skills/engineering/briefbound-autonomous-collaboration-loop/SKILL.md · Use when the user explicitly enables an automated same-project multi-thread development loop that keeps peer Codex…
git:20260919.ae05288 · audit A · 6 stars
briefbound-bdd-tdd-development skill
ccdawn/codex-skills · skills/engineering/briefbound-bdd-tdd-development/SKILL.md · Use when an already-defined new behavior or high-risk implementation contract needs a failing test before…
git:20260916.292b0ac · audit A · 6 stars
briefbound-bug-review skill
ccdawn/codex-skills · skills/engineering/briefbound-bug-review/SKILL.md · Use when an observed bug, correctness regression, failing test, build failure, abnormal behavior, or unresolved root…
git:20260916.292b0ac · audit A · 6 stars
briefbound-design-system skill
ccdawn/codex-skills · skills/engineering/briefbound-design-system/SKILL.md · Use when a frontend task primarily concerns cross-component design tokens, semantic theming, component APIs, variants…
git:20260916.292b0ac · audit A · 6 stars
briefbound-development-cleanup skill
ccdawn/codex-skills · skills/engineering/briefbound-development-cleanup/SKILL.md · Use when a verified or integrated software change has concrete temporary artifacts, generated noise, task-owned…
git:20260919.ae05288 · audit A · 6 stars

Every file in ccdawn/codex-skills

Browse by kind, by grade A, or by owner.