Once you've determined the need for a new component, the following steps are required to integrate it into the framework. For this example, we'll add a new component called componentNewComponent to the "Application" category.
First, derive the new component ID from the component title (component + camelCase descriptor — e.g., "Feature Store" → componentFeatureStore) and declare it in the schema. This makes the system aware of the new component and allows for validation. (The issue-template flow derives this ID automatically; when authoring YAML/schema directly via PR, apply the same convention by hand.)
- File to edit:
schemas/components.schema.json - Action: Find the
enumlist underdefinitions.component.properties.idand add your new component's ID alphabetically.
// In schemas/components.schema.json
"id": {
"type": "string",
"enum": [
...
"componentAgentPlugin",
"componentNewComponent" // Add your new component ID here
]
},Next, define the properties of your new component in the main data file. This includes its ID, title, a detailed description, and its category.
Title convention: Component titles must be short concrete nouns (1-4 words) that name the architectural element. See the Component Titles Style Guide for rules and examples.
- File to edit:
components.yaml - Action: Add a new entry to the
componentslist.
# In yaml/components.yaml
- id: componentNewComponent
title: New Component
description:
- >
A detailed description of what this new component represents in the
AI development lifecycle and why it is important for understanding risk.
category: componentsApplication # Must match an id from the components.schema.json#/definitions/category/properties/id
edges:
to: []
from: []Now, define the connections for your new component within its own edges block. The to list specifies where your component sends data (outgoing), and the from list specifies where it receives data from (incoming).
- File to edit:
components.yaml - Action: Update the
edgesblock forcomponentNewComponent. For our example, let's say it receives data fromcomponentInputHandlingand sends data tocomponentApplication.
# In yaml/components.yaml, under your new component's definition
edges:
to:
- componentApplication # Outgoing connection
from:
- componentInputHandling # Incoming connectionTo make the connections bidirectional, you must now update the corresponding edges on the components you just referenced. This step is critical - the pre-commit hook will prevent commits if edges are not bidirectionally consistent.
- File to edit:
components.yaml - Action:
- Find the
componentInputHandlingdefinition and addcomponentNewComponentto itsedges.tolist. - Find the
componentApplicationdefinition and addcomponentNewComponentto itsedges.fromlist.
- Find the
# In the componentInputHandling definition:
- id: componentInputHandling
# other properties
edges:
to:
- componentTheModel
- componentNewComponent # Add outgoing edge to your new component
from:
- componentApplication
# In the componentApplication definition:
- id: componentApplication
# other properties
edges:
to:
- componentInputHandling
- componentAgentPlugin
from:
- componentOutputHandling
- componentNewComponent # Add incoming edge from your new componentBefore committing, validate that your changes are consistent:
# Manual validation (recommended during development)
python scripts/hooks/validate_riskmap.py --force
# Optional: Generate component graph to visualize your changes
python scripts/hooks/validate_riskmap.py --to-graph ./preview-graph.md --force
# Optional: Generate control-to-component graph to visualize control relationships
python scripts/hooks/validate_riskmap.py --to-controls-graph ./preview-controls.md --force
# Optional: Generate controls-to-risk graph to visualize risk relationships
python scripts/hooks/validate_riskmap.py --to-risk-graph ./preview-risks.md --force
# Format YAML files (auto-runs in pre-commit but useful for preview)
npx prettier --write risk-map/yaml/components.yaml
# The pre-commit hook will also run all validations automatically when you commit
git add risk-map/yaml/components.yaml
git commit -m "Add componentNewComponent with proper edge relationships"The validation will check:
- ✅ All outgoing edges (
to) have corresponding incoming edges (from) in target components - ✅ All incoming edges (
from) have corresponding outgoing edges (to) in source components - ✅ No components are isolated (unless intentionally designed)
- ✅ All referenced components exist in the YAML file
Note: When you commit changes to components.yaml, the pre-commit hook automatically generates:
- Updated component graph at
./risk-map/diagrams/risk-map-graph.md - Component tables at
./risk-map/tables/components-full.mdandcomponents-summary.md - Regenerated cross-reference at
./risk-map/tables/controls-xref-components.md
All files are automatically staged for your commit.
After successful validation, follow the General Content Contribution Workflow to create your pull request.
Related:
- Component Titles Style Guide - Title naming convention and reviewer checklist
- Validation Tools - Detailed validation commands
- Troubleshooting - Help with edge validation errors
- Best Practices - Development workflow tips