AgentSkillsCN

c4-specification-editing

在工程平台数据模型中,指导用户编辑LikeC4规范(元素种类、关系种类、标签)。当用户被要求在工程平台数据模型中新增元素类型、关系类型,或添加标签时,可使用此方法。

SKILL.md
--- frontmatter
name: c4-specification-editing
description: Guide for editing the LikeC4 specification (element kinds, relationship kinds, tags). Use when asked to add new element types, relationship types, or tags in the Engineering Platform Data Model.

C4 Specification Editing

Critical Requirements

  • ALWAYS read likec4/specification.c4 before modifying the specification
  • Changes to specification affect the ENTIRE model
  • ALWAYS validate with npm run validate after changes

Overview

The specification.c4 file defines the vocabulary of the entire C4 model:

  • Element kinds: Types of elements (actor, system, capability, blueprint, integration, externalSystem)
  • Relationship kinds: Types of connections (syncs, dataSource, owns, governs, etc.)
  • Tags: Labels for categorization and filtering

Current Element Kinds

KindShapeColorUsage
actorpersonamberPersonas
systembrowserindigoThe IDP system
externalSystemrectangleslateSaaS/Cloud providers
capabilitybucketskyStars (blueprint groups)
blueprintdocumentgreenData entities
integrationstoragegrayConnectors

Current Relationship Kinds

KindColor/StylePurpose
syncsblue, solidData synchronization
dataSourceblue, dashedData source declaration
producesgreen, solidGenerates/creates
ownsamber, solidOwnership
governsred, solidGovernance/controls
dependsOnslate, solidDependencies
includessky, solidContainment
triggersamber, dashedInitiates action
deploysgreen, solidDeployment
authenticatesviolet, solidAuthentication

Current Tags

Element tags: #core, #oci, #azure, #github, #security, #metrics, #selfservice Relationship tags: #sync, #ownership, #dataFlow, #governance

Adding Elements

New Element Kind

c4
specification {
  element myNewKind {
    style {
      shape rectangle
      color violet
      icon bootstrap:lightning
    }
  }
}

New Relationship Kind

c4
specification {
  relationship monitors {
    color violet
    line dashed
    head diamond
    tail none
  }
}

New Tag

c4
specification {
  tag myNewTag
}

Impact Analysis

ChangeRisk
Add element kindLow
Rename element kindHIGH — breaks all elements
Remove element kindHIGH — breaks all elements
Add relationship kindLow
Rename relationship kindHIGH — breaks all relations
Add tagNone
Remove tagMedium — warnings

Workflow

  1. Read likec4/specification.c4
  2. Verify the change is necessary
  3. Add/edit the specification
  4. Validate with npm run validate