Skip to main content

Naming conventions

Contract C2 — canonical identifiers and filenames for A2C artifacts.

Repository: a2c-workflow Enforced in: a2c_core.contracts.id_format, a2c_core.services.validation

Planning artifact IDs

Core invariants (always enforced)

RuleBehavior
id requiredNon-empty string in front matter
id uniqueUnique across all Epics, Tasks, and Sprints in the repo
type requiredMust match directory: epic / task / sprint
FilenameShould match id; mismatch emits warning A2C_NAME_004

A2C does not force a specific ID style unless id_format.enabled: true in .a2c/config.yaml.

When ids are omitted at apply time, a2c_core allocates the next id for the artifact kind:

ModeExample idsConfig
Jira-like (default)TASK-1, EPIC-2id_format.pattern default or task_prefix / epic_prefix / sprint_prefix
GitLab numeric1, 2, 3id_format.enabled: true and pattern: '^[0-9]+$'

When teams have no existing convention, prefer:

  • Pattern: PREFIX-NUMBER (uppercase prefix, hyphen, positive integer)
  • Examples: EPIC-1, EPIC-0001, TASK-101, SPRINT-3, PROJ-1234
  • Loose regex: ^[A-Z][A-Z0-9]+-[0-9]+$

When strict mode is off, IDs outside this shape (slug IDs, pure numbers, legacy keys) still work. A2C may emit non-fatal warning A2C_ID_003 suggesting the recommended shape.

Configurable strict validation

# .a2c/config.yaml
id_format:
enabled: false # default: permissive
pattern: '^[A-Z][A-Z0-9]{1,9}-[0-9]+$'
task_prefix: TASK # allocated ids: TASK-1, TASK-2, …
epic_prefix: EPIC # allocated ids: EPIC-1, EPIC-2, …
sprint_prefix: SPRINT # allocated ids: SPRINT-1, SPRINT-2, …

Set task_prefix, epic_prefix, or sprint_prefix to override the default string segment (for example A2CA2C-1). Prefixes apply to allocation when ids are omitted; they are ignored when pattern is GitLab numeric (^[0-9]+$).

enabledBehavior
falseOnly core invariants; no regex on id
trueid must match pattern; failure code A2C_ID_001

Example patterns:

Team stylepattern
Jira-like (default)^[A-Z][A-Z0-9]{1,9}-[0-9]+$
GitLab numeric^[0-9]+$
Strict house style`^(EPIC

Other identifiers

KindPatternExample
Workflow ID^[a-z][a-z0-9_]*$a2c, superbuild

Filenames and paths

ArtifactPathFilename rule
Config.a2c/config.yamlFixed name
Workflow manifestdocs/workflow-manifest.yamlFixed name
Epicplanning/epics/<id>.md<id> should match epic ID in front matter
Taskplanning/tasks/<id>.md<id> should match task ID in front matter
Sprintplanning/sprints/<id>.md<id> should match sprint ID in front matter
ADRdocs/adr/NNNN-kebab-title.md

Error codes

CodeMeaning
A2C_ID_001id does not match configured id_format.pattern
A2C_ID_002Duplicate planning artifact id
A2C_ID_003Recommended ID shape suggestion (warning)
A2C_NAME_001Invalid or empty artifact id
A2C_NAME_002Invalid ADR filename
A2C_NAME_003Invalid workflow ID
A2C_NAME_004Filename does not match id (warning)
A2C_SCHEMA_004type does not match planning directory
A2C_FORMAT_001Legacy pure-YAML planning artifact
A2C_FORMAT_002Deprecated .a2c/planning/ location