adr-to-guardrail
Turn a new or changed ADR into implemented behavior, routing docs, tests, and guardrails rather than leaving it as standalone prose.
- License 许可
- MIT
- 所属仓库
- clawic/Clawix
- 最近更新
- 2026-06-06
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- adr-to-guardrail
- keywords
- [ "adr", "guardrail", "decision-map", "docs", "tests", "architecture" ]
- description
- Turn a new or changed ADR into implemented behavior, routing docs, tests, and guardrails rather than leaving it as standalone prose.
03 SKILL.md 正文
adr-to-guardrail
Make an ADR operational.
Procedure
- Reserve the ADR number with
scripts/adr-reserve.mjsbefore drafting a new ADR. Read the ADR template and the closest accepted ADRs before changing an existing decision. - State the decision in implementation-neutral terms and fill Decision Tensions for durable architecture, governance, data, security, agent, interface, route, storage, public-surface, or validation-policy changes.
- Fill surface parity: human surface, programmatic surface, persistence, gaps, and validation.
- Update
docs/decision-map.mdor the equivalent project router with the new decision and its guardrail. - Register durable meta-code in
docs/discoverability.registry.jsonperdocs/adr/0017-discoverability-and-meta-code-routing.md; do not add hidden ADRs, guardrails, harnesses, docs routers, or skills. - For every accepted ADR, satisfy
scripts/adr-operational-coverage-check.mjs: decision-map row, discoverability entry, guard/test route, human surface, programmatic surface, persistence, CLI search, and CLI inspect. A doc-only decision needs a scoped expiring public exception indocs/adr-operational-coverage-exceptions.json. - Update affected docs, registries, manifests, CLI inspection/search output, and tests so agents can discover and enforce the decision.
- Refactor implementation only as far as needed to make the ADR true for the intended batch.
- Apply the Problem-to-Guardrail loop for any defect found while drafting or
implementing: record the puntual problem, general class, existing rule, and
close with
guard/test añadido,ADR/regla añadida, ordeuda explícita con expiry. - Enforce the anti-loop rule: if the work adds
2 ciclos seguidosof ADRs, ledgers, manifests, guards, or baselinessin reducir blockers reales, stop and classify the closure asblocker directo,deuda lateral, orpendiente externo; no más gobernanza para arreglar exceso de gobernanza. - Before closure, run
node scripts/discoverability-check.mjs closure --changed-file <path> --jsonfor the changed ADR, decision map, registry, or skill. The closing report must cite the realclaw search ... --jsonandclaw inspect ... --jsonevidence and the discovered artifact, or mark the workPARTIAL/BLOCKED. - Record pending guardrails or migrations explicitly when full enforcement cannot land now.
Constraints
- An ADR is incomplete if it is not linked from the relevant routing surface.
- Do not invent ADR numbers manually;
docs/adr/reservations/NNNN.jsonis the durable reservation record. - Do not accept "doc only" for a decision that changes stable behavior.
- Do not mark an ADR accepted while
scripts/adr-operational-coverage-check.mjsfails. - Do not close a canon-changing ADR as complete when
claw searchorclaw inspectcannot discover the changed artifact. - Do not close a detected problem with only "fixed"; leave a guard/test, ADR/rule, or expiring debt.
- Do not add governance to fix excess governance after
2 ciclos seguidossin reducir blockers reales; stop asblocker directo,deuda lateral, orpendiente externo. - Do not preserve accidental pre-public legacy unless an ADR explicitly grants a bounded exception.
04 同仓库更多 Skills
visual-regression
Run and interpret Clawix UI geometry, screenshot, protected-surface, and debt-baseline checks without authorizing visual repair.
ui-performance-budget
Capture and compare Clawix UI performance budgets for critical flows before optimizing visible or runtime UI behavior.
ui-implementation
Implement functional Clawix UI wiring while respecting visual mutation boundaries, pattern contracts, protected surfaces, and debt baselines.
ui-canon-review
Review whether a Clawix UI pattern, visual decision, copy change, or component extraction belongs in canon, debt, exception, or protected-surface scope.
theme-factory
Produce variants of an existing Style by shifting tone (light/dark), density (compact/relaxed), or accent (palette rotation) while preserving the brand identity. Use when the user wants alternate themes derived from one brand.
template-render
Render a Template + data + Style into a final artifact in one of HTML, PDF, PNG, SVG or PPTX. Use whenever the user asks for a concrete deliverable like "make me a poster", "render a card", "give me a one-pager".