Fission-AI/OpenSpec · error
${specName} ADDED failed for header "### Requirement: ${add.
Error message
${specName} ADDED failed for header "### Requirement: ${add.name}" - already exists What it means
Error "${specName} ADDED failed for header "### Requirement: ${add.name}" - already exists" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/specs-apply.ts:491
if (normalizeBlockRaw(currentBlock.raw) !== normalizeBlockRaw(mod.raw)) {
modifiedApplied++;
}
nameToBlock.set(key, mod);
}
// ADDED
let addedApplied = 0;
for (const add of plan.added) {
const key = normalizeRequirementName(add.name);
const existing = nameToBlock.get(key);
if (existing) {
// Identical content means the requirement was already synced to the
// baseline (early-sync pattern) — re-applying it is a no-op, not a
// conflict. Only differing content is a genuine collision.
if (normalizeBlockRaw(existing.raw) === normalizeBlockRaw(add.raw)) {
continue;
}
throw new Error(`${specName} ADDED failed for header "### Requirement: ${add.name}" - already exists`);
}
nameToBlock.set(key, add);
addedApplied++;
}
// Duplicates within resulting map are implicitly prevented by key uniqueness.
// Recompose requirements section preserving original ordering where possible
const keptOrder: RequirementBlock[] = [];
const seen = new Set<string>();
for (const block of parts.bodyBlocks) {
const key = normalizeRequirementName(block.name);
const replacement = nameToBlock.get(key);
if (replacement) {
keptOrder.push(replacement);
seen.add(key);
}
// A block's raw runs to the next header the parser RECOGNISES, so a noteView on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/specs-apply.ts:491 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/de56ebf1cb0d0d85.
Report an issue: GitHub.