Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

business-compliance业务合规性

Agent Skill

business-compliance 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

198

周安装

8

GitHub Stars

3

下载量

62
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:business-compliance(业务合规性)
来源仓库:https://github.com/dedalus-erp-pas/foundation-skills
仓库路径:skills/business-compliance
安装命令:
npx skills add https://github.com/dedalus-erp-pas/foundation-skills --skill business-compliance
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dedalus-erp-pas/foundation-skills --skill business-compliance

简介

对 Hexagone Web 应用进行领域规则合规性审计的报告型技能。

  • 自动提取文档中的业务规则并与界面实体匹配检测违规项。
  • 仅生成审计报告不自动修复问题,确保语义安全边界。
  • 激活时需提供目标页面或组件路径及对应领域文档。
  • 所有结论必须附带原始规则条文作为引用依据。business-compliance 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Business Compliance

Run a fully autonomous domain compliance audit on a page or component of the Hexagone Web application. The skill discovers documented business rules in docs/domain/, extracts the entities and bounded context of the target screen, matches applicable rules, detects violations of domain invariants, and prints a structured report with mandatory citations — without modifying any files. This is a report-only skill. It never auto-fixes business rule violations because the semantic and patient-safety impact is too high for machine judgment.

When to Use This Skill

Activate when the user:

  • Says "business-compliance" followed by a URL, component name, or page name
  • Asks to audit domain rules, business rules, or invariants on a screen
  • Says "check the business logic", "audit the domain rules", "business review"
  • Wants to verify that a screen enforces the documented invariants from docs/domain/

Relation to design-compliance

design-compliance and business-compliance are complementary but separate skills:

design-compliancebusiness-compliance
AuditsVisual / presentation layerDomain / business logic layer
Source of truthhexagone-preset.js, CLAUDE.md, design rulesdocs/domain/ (DDD structured Markdown)
ModeAuto-fix all violationsReport only, never fix
Risk profileLow (cosmetic)High (patient safety, regulatory)
ReviewerFrontend devsDomain experts, clinical PO, compliance

Do not merge them. Run both separately when needed. A unified screen-compliance aggregator is out of scope for v1.

Core Principles

1. Full Autonomy

  • The entire pipeline runs without asking questions during execution
  • If no argument is provided, ask the user what to review — then run autonomously
  • No files are modified. The report is printed to the terminal only

2. Report-Only — No Auto-Fix

Auto-fixing a business rule violation is categorically unsafe in healthcare software. A machine "fix" could:

  • Turn a warning into a block (halting legitimate care)
  • Turn a block into a warning (industrializing the shortcut anti-pattern)
  • Silently change clinical semantics without human review

The skill surfaces, documents, and cites — a human (developer + domain expert) decides the fix.

3. Schema-First

The skill requires docs/domain/ to follow a structured rule schema (see reference/rule-schema.md). If the schema is not respected, the skill refuses to audit and emits a migration checklist. Garbage in → hallucinated findings out. This is non-negotiable.

4. Deterministic Matching Pipeline

Matching a rule to a screen is done in a deterministic pipeline before any LLM reasoning:

  1. Screen extraction (deterministic) — route, Pinia stores, API endpoints, TypeScript types
  2. Bounded context pre-filter (deterministic) — via api_prefixes in rule frontmatter
  3. Entity lookup (deterministic) — match extracted types against rule entities: lists
  4. Rule reasoning (LLM) — confined to the shortlisted rules

LLM is used only in step 4. Steps 1-3 are mechanical.

5. Sensitivity Over Specificity

In healthcare, false negatives are catastrophic, false positives are annoying. The skill tunes for sensitivity: when uncertain, it reports with status NEEDS_CLINICAL_REVIEW rather than dropping the rule silently.

6. Citation-Mandatory

Every finding MUST cite:

  • The exact rule file + line (or heading anchor) in docs/domain/
  • The exact code file + line for the violation
  • The stable rule_id (e.g., ADM-001, PRESC-014)

A finding without all three citations is rejected from the report. No citation = no finding.

Source of Truth (Priority Order)

  1. Rule files in docs/domain/ — the only source of authoritative business rules
  2. Rule schemareference/rule-schema.md (this skill's contract for rule structure)
  3. Ubiquitous languageUBIQUITOUS_LANGUAGE.md if present, used to reconcile entity naming

The skill does NOT invent rules. If a rule is not documented in docs/domain/, it does not exist for this skill.

Input Modes

Same three input modes as design-compliance:

URL Mode

/business-compliance http://localhost:5173/hexagone-etab/vue/prescriptions/123
  1. Use the URL to resolve the route in the router config
  2. Find the component file for that route
  3. Recursively resolve the component tree

Component Name Mode

/business-compliance PrescriptionEditor
  1. Glob for matching files: **/PrescriptionEditor.vue, **/prescription-editor.vue
  2. Resolve the route (if any) for bounded-context inference
  3. Recursively resolve the component tree

Page Name Mode

/business-compliance Prescriptions
  1. Search router config for route name or path match
  2. Find the assigned component
  3. Recursively resolve the component tree

No Argument

/business-compliance

Ask the user what to audit. Do not assume.

Workflow

Step 1: Validate Rule Schema

Before doing anything else, validate that docs/domain/ follows the required schema:

  1. Locate docs/domain/ in the project. If it does not exist, abort with: "No docs/domain/ directory found. business-compliance requires documented domain rules. See reference/rule-schema.md for the required format."
  2. Parse each .md file in docs/domain/ and verify the frontmatter:

- Required fields: bounded_context, entities, api_prefixes (can be empty list), rule_id OR a list of rules with rule_id each, severity, layer - Acceptable values for severity: P1, P2, P3, P4 - Acceptable values for layer: client, server, both

  1. If any file fails validation, abort the audit and emit a migration checklist: docs/domain/ schema violations — audit aborted | File | Missing fields | Action | |------|----------------|--------| | docs/domain/prescriptions.md | severity, layer | Add frontmatter fields | |... |... |... | Fix the rule files before re-running. See skills/business-compliance/reference/rule-schema.md.
  2. If all files validate, build the normalized in-memory rule index:

- Keyed by (bounded_context, entity, rule_id) - Each entry holds: rule text, severity, layer, api_prefixes, source file + line

Step 2: Resolve Target Files

Same resolution strategy as design-compliance:

  1. Parse the user's input to determine the mode (URL, component name, page name)
  2. Find the entry-point file(s):

- URL → parse path, search router files (**/router/**/*.{js,ts}, **/router.{js,ts}) for matching route, get component - Component name → glob for **/<name>.vue, **/<name-kebab>.vue, **/<Name>/** - Page name → search router config for route name or path match

  1. Recursively resolve the component tree:

- Read each .vue file - Extract all local imports (skip primevue/*, vue, vue-router, pinia, node_modules, @hexagone/shared) - Follow each import, repeat until no new local components

  1. Report the discovered tree to the user

Step 3: Extract Screen Artifacts

For each file in the component tree, extract the artifacts needed for rule matching:

  1. Route information:

- Route path (e.g., /prescriptions/:id) - API prefix derived from the route (e.g., /api/prescriptions)

  1. Pinia stores:

- import {usePrescriptionStore} from '...' - Store names are strong hints for bounded context

  1. API endpoints:

- Grep for axios.*, fetch('...'), useFetch(...), $api.* - Capture full URLs and HTTP methods - Capture error handling: catch (err) blocks, 4xx/5xx handlers

  1. TypeScript types:

- Types imported from @/types/, @hexagone/shared/types, or local types.ts - Focus on entity-like types: Prescription, Admission, Patient, Order, etc.

  1. Form fields and bindings:

- v-model bindings - Form validation rules (required, rules, schema, Zod/Yup/Valibot schemas) - :disabled, v-if, v-show on action buttons (state machine signals)

  1. Action handlers:

- Click handlers on buttons whose label matches a state transition (save, validate, discharge, sign, cancel) - Capture what state change they trigger via the API

Output a per-file extraction summary:

PrescriptionEditor.vue:
  route: /prescriptions/:id
  api_prefixes: [/api/prescriptions, /api/allergies]
  stores: [usePrescriptionStore, usePatientStore]
  types: [Prescription, AllergyCheck, Patient]
  actions: [save, validate, sign]

Step 4: Match Rules to Screen

For each file's extracted artifacts, match applicable rules:

  1. Bounded context filter: for each api_prefix in the screen, collect rules whose api_prefixes frontmatter overlaps
  2. Entity filter: intersect with rules whose entities list contains any extracted TS type name
  3. Ubiquitous language reconciliation: if UBIQUITOUS_LANGUAGE.md exists, use it to map code-level names to domain-level names before matching (e.g., RxPrescription)

Output the rule shortlist per file:

PrescriptionEditor.vue: 7 applicable rules
  - PRESC-001 (P1) — Allergy check required before validation
  - PRESC-002 (P1) — Electronic signature required on save
  - PRESC-014 (P2) — Signature requires audit log entry
  - ADM-008 (P3) — Patient must have active admission
  - ...

Step 5: Static Analysis — Detect Violations

For each (file, applicable rule) pair, check the 5 violation categories:

Category 1: Missing Precondition Check

  • Rule states a precondition that must hold before an action (X requires Y verified)
  • Check: does the UI guard the action (via :disabled, v-if, form validation, or API precondition)?
  • Evidence required: code location of the action + absence of the guard
  • Severity inherits from the rule

Category 2: Forbidden Transition Exposed

  • Rule states a state transition is forbidden (Discharged cannot return to Active)
  • Check: does the UI expose a button/action that can trigger the forbidden transition?
  • Evidence: button handler + API call that would cause the forbidden state change

Category 3: Required Field Absent

  • Rule mandates a field must be collected/displayed (e.g., "INS mandatory for clinical action")
  • Check: is the field present in the form template + bound via v-model + enforced by validation?
  • Evidence: template search + validation schema inspection

Category 4: Cross-Entity Invariant Unenforced

  • Rule spans entities (e.g., "Prescription must reference active AllergyCheck")
  • Check: does the screen load/reference both entities, and does it gate the action on the cross-entity condition?
  • Evidence: both stores/types present + conditional on the cross-entity relationship

Category 5: Workflow Gap

  • Rule defines a workflow step (e.g., "Verbal order requires countersignature within 24h")
  • Check: is the step surfaced in the UI, even as a reminder or follow-up action?
  • Evidence: presence or absence of the UI artifact mapped to the workflow step

Server-Side Rule Handling

When a rule has layer: server or layer: both:

  • The UI is NOT expected to fully enforce the rule
  • The UI IS expected to handle the server rejection gracefully (catch 409/422, show user-visible error)
  • Check: does the API call site include a proper error handler?
  • A missing error handler on a server-enforced rule is itself a violation (Category 1 — missing precondition handling)

Step 6: Handle Uncertainty

When the skill cannot confidently determine if a rule applies or is violated:

  1. Do not drop the rule silently
  2. Emit a finding with status NEEDS_CLINICAL_REVIEW
  3. Include a structured question for the reviewer: NEEDS_CLINICAL_REVIEW — PRESC-007 Rule: Prescriptions require electronic signature. Screen: PrescriptionEditor.vue uses usePrescriptionStore.save() but signature step not clearly detected. Please confirm: (a) Rule applies, step missing → fix required (b) Rule applies, step present but undetected → add code annotation or test anchor (c) Rule does not apply → document why in commit message or rule exclusion

Step 7: Track Non-Evaluable Rules

After analysis, list any rule that was in the shortlist but could NOT be evaluated (e.g., code too complex, dynamic dispatch, external library call). This prevents "no violations found" from being confused with "not audited":

Non-evaluable rules (5):
  - PRESC-022 — dynamic dispatch on action name, cannot trace
  - ADM-014 — relies on backend orchestration not visible in screen code
  - ...

Step 8: Generate Report

Print a structured report to the terminal:

## Business Compliance Report

**Target:** [component/page name or URL]
**Files analyzed:** [count]
**Rules indexed:** [count from docs/domain/]
**Rules applicable to target:** [count]
**Violations detected:** [count]
**Uncertain findings (NEEDS_CLINICAL_REVIEW):** [count]
**Non-evaluable rules:** [count]

### Rule Index Summary
| Bounded Context | Rules | Files |
|-----------------|-------|-------|
| prescriptions   | 14    | docs/domain/prescriptions.md |
| admissions      | 8     | docs/domain/admissions.md |
| ...             | ...   | ... |

### Files in Component Tree
| # | File | Applicable Rules | Violations |
|---|------|------------------|------------|
| 1 | `frontend/gap-mf/src/views/PrescriptionEditor.vue` | 7 | 2 |
| 2 | `frontend/gap-mf/src/components/AllergyBanner.vue` | 2 | 0 |
| ... | ... | ... | ... |

### Violations by Severity

#### P1 — Patient Safety ([count])
- **PRESC-001** — Allergy check required before validation
  - Rule source: `docs/domain/prescriptions.md:42`
  - Code location: `frontend/gap-mf/src/views/PrescriptionEditor.vue:118`
  - Category: Missing precondition check
  - Evidence: `validate()` handler calls `prescriptionStore.validate()` without prior check on `allergyCheckStore.verified`.
  - Suggested action (NOT applied): add `:disabled="!allergyChecked"` to the Validate button, or guard inside the handler.

#### P2 — Regulatory / Compliance ([count])
...

#### P3 — Clinical Workflow Integrity ([count])
...

#### P4 — Data Quality / Interoperability ([count])
...

### NEEDS_CLINICAL_REVIEW ([count])
- **PRESC-007** — [structured question as in Step 6]

### Non-Evaluable Rules ([count])
- **PRESC-022** — dynamic dispatch on action name, static trace impossible

### Drift Signals
- Rule files unchanged in > 6 months while referenced entities evolved: [list]
- Rules with no applicable screen in this audit: [list]

### Summary
- **Total violations:** [count] (P1: [n], P2: [n], P3: [n], P4: [n])
- **Waivable by developer alone:** [count] (P3 + P4)
- **Require clinical / compliance sign-off:** [count] (P1 + P2)
- **No files modified.** Review the report, discuss with domain experts, apply fixes manually.

Violation Reference

5 Violation Categories

#CategoryTypical Rule PhrasingEvidence Required
1Missing precondition check"X requires Y verified"Action handler + absence of guard
2Forbidden transition exposed"Cannot transition from A to B"Action handler + forbidden state change
3Required field absent"Field F is mandatory"Template + validation schema
4Cross-entity invariant unenforced"X must reference Y"Both entities present + conditional
5Workflow gap"Step S must occur within T"UI artifact for step S

Severity Classification

SeverityMeaningEscalation
P1Patient safety — direct harm pathway (allergy, dose, wrong-patient, signature bypass)Blocks merge. Clinical PO sign-off required.
P2Regulatory / compliance — HDS, MDR, CNIL, audit log, traceabilityBlocks merge. Compliance officer sign-off required.
P3Clinical workflow integrity — state machine, orphan entities, workflow gapsBlocks merge. Waivable by clinical PO with written justification.
P4Data quality / interoperability — optional fields, code systems, labelsWarns. Does not block. Dev may waive.

P1 and P2 cannot be waived by a developer alone. The skill must require a named clinical or compliance reviewer in the waiver metadata when such a waiver is requested.

Healthcare Rule Examples (Hexagone Context)

See reference/rule-schema.md for concrete examples. Common rule categories in Hexagone:

  • Safety interlocks: allergy / contraindication / dose range / drug-drug interaction
  • Identity: INS (Identité Nationale de Santé) verification before clinical action
  • Prescription integrity: electronic signature, modification audit trail, verbal order countersignature
  • State machines: admission/discharge flow, order/result flow, care pathway steps
  • Interoperability: HL7/FHIR/PAM message completeness, segment ordering (Hexaflux domain)
  • Regulatory: audit log on writes, break-glass justification, data retention
  • Billing cascades: act codes blocking discharge, GHS requiring main diagnosis

Edge Cases

docs/domain/ Does Not Exist

Abort audit. Emit:

"No docs/domain/ directory found. This skill requires documented domain rules following the schema in reference/rule-schema.md. Create the directory and add rule files before running."

docs/domain/ Exists but Schema Fails

Abort audit. Emit a migration checklist of schema violations per file (see Step 1.3). Do not attempt partial audit — partial data leads to false confidence.

Rule References an Unknown Entity

If a rule's entities: list contains a name not found anywhere in the codebase:

  • Keep the rule in the index
  • Flag in the drift signals section of the report: "Rule X references entity Y, but no usage found in codebase"
  • This indicates either stale docs or a server-only entity

Screen Matches No Rules

Report "0 applicable rules" — explicitly state that this is not the same as "compliant". The screen may operate on an undocumented bounded context (which is itself a drift signal to report).

Conflicting Rules

If two rules in the index share the same rule_id or make contradictory claims about the same entity:

  • Report the conflict in the Drift Signals section
  • Do not attempt to resolve it — this is a domain expert decision

Dev Server Not Running

This skill does NOT require a dev server. It is a static analysis + doc-parsing skill. Visual inspection is out of scope — business rules are about code behavior, not rendering.

Large Component Tree (20+ files)

Process all files. Organize report by file for readability. Use parallel sub-agents only if the tree exceeds 10 files AND the rule index exceeds 30 rules, to keep LLM reasoning context manageable.

Mixed Micro-Frontends

Apply the same rule index to all files regardless of MF. Note MF membership per file in the report.

Waiver Requested

The skill does NOT manage waivers. If a finding must be waived, the developer does so in the PR description or a dedicated waiver log outside this skill's scope. The skill always re-reports the finding on next run — it's not the skill's job to remember waivers (memory of waivers is a human-process concern).

Important Notes

  • This skill does NOT modify files. It is strictly report-only. If the user says "fix them", explain that business rule violations are not mechanically fixable — the report provides suggested actions that a human must apply.
  • Every finding cites rule_id + doc:line + code:line. A finding without all three is a bug in the skill — do not emit it.
  • P1 / P2 violations require named sign-off from a clinical or compliance reviewer. The skill calls this out in the report.
  • Tune for sensitivity, not specificity. Better to raise 10 possible findings and let the team dismiss 9 than to miss 1 P1.
  • Uncertain findings → NEEDS_CLINICAL_REVIEW. Never silently drop a rule.
  • Drift signals are first-class. Rules that haven't been touched while their entities have changed → surface in the report. Rules referencing unknown entities → surface.
  • Non-evaluable rules are first-class. "No violations found" must not be confused with "not audited". Always list non-evaluable rules explicitly.
  • No auto-fix. Ever. No v2 auto-fix. If requested, push back: healthcare semantic changes require human judgment.
  • Pilot first. In a fresh rollout, start with ONE bounded context (suggest: prescriptions — highest stakes, clearest invariants) before expanding. Validate signal-to-noise on that pilot before adding domains.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.38%
按下载量换算22

Claude

29.28%
按下载量换算18

Cursor

18.88%
按下载量换算12

Gemini CLI

8.53%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dedalus-erp-pas/foundation-skills --skill business-compliance 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills