Element Identity Specification

Element ID vs Identifier

The system maintains two distinct concepts for element identification:

Element ID

An Element ID is a stable unique identifier for element identity:

GitHub Fragment Normalization Rules:

  1. Convert all letters to lowercase
  2. Replace spaces with hyphens (-)
  3. Remove all punctuation characters (except hyphens and underscores)
  4. Remove all other whitespace characters (tabs, newlines, etc.)
  5. Trim leading and trailing whitespace before processing
  6. Keep alphanumeric characters, hyphens, and underscores only

Example transformations:

Element Identifier

An Element Identifier is a location-based reference for addressing:

Relationship Between ID and Identifier

Implicit Containment Model

Element location is tracked separately from element identity:

Change Detection Using Element IDs

When comparing model versions:

  1. Elements are matched by Element ID (not identifier)
  2. Change types detected:
    • Content change: Same ID, different content hash
    • Addition: ID exists only in new version
    • Removal: ID exists only in old version
    • Relocation: Same ID, different file_path (without content change)
  3. Pure relocations do not trigger impact propagation
  4. Relocations with content changes propagate based on content change only

Examples

Example 1: Element with ID and Identifier

Markdown in specifications/requirements.md:

### User Authentication

The system shall provide secure user authentication.

#### Relations
  * derivedFrom: [Security Requirements](security.html#Security-Requirements)

Example 2: Element Relocation

Before - in specifications/requirements.md:

### User Authentication
Content here.

After - moved to specifications/security/auth.md:

### User Authentication
Content here.

Example 3: Writing Relations

User writes in markdown:

#### Relations
  * derivedFrom: [Parent Req](../parent.html#Parent-Req)
  * verifiedBy: [Test Case](#Test-Case)

System processing:

  1. Parse identifier: ../parent.md#Parent-Req
  2. Resolve to absolute: specifications/parent.md#parent-req
  3. Resolve to Element ID: parent-req
  4. Store relation using Element ID internally
  5. Change detection compares using Element ID