Fission-AI/OpenSpec · error

- delta Purpose ignored; already has one. Edit directly to…

Error message

${specName} - delta Purpose ignored; ${specName} already has one. Edit ${update.target} directly to change it.

What it means

Warning from buildUpdatedSpec: the change's delta spec declares a Purpose, but the target spec already exists and carries a different Purpose section. A delta Purpose only seeds new specs, so it is ignored rather than overwriting; the author is pointed at the spec file to edit directly.

Solutions

  1. Edit the target spec's Purpose section at the path shown in the message
  2. Remove the Purpose from the delta file to silence the warning
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/core/specs-apply.ts:317 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/bdd19bf6c67901ef. Report an issue: GitHub.

Appendix: source

Thrown at src/core/specs-apply.ts:317

  }

  // Load or create base target content
  const deltaPurpose = extractPurposeSection(changeContent);
  let targetContent: string;
  let isNewSpec = false;
  assertTrustedSpecPath(update.targetRoot, update.target);
  try {
    targetContent = await fs.readFile(update.target, 'utf-8');
    // A delta Purpose only seeds a spec that does not exist yet. Say so rather
    // than dropping it silently - the specs instruction tells authors to write
    // one for new capabilities, and the delta file looks identical either way.
    // Only when the spec really does have a different Purpose: claiming it
    // "already has one" would be false when it has none, and saying anything at
    // all is noise when the two bodies match.
    if (deltaPurpose) {
      const existingPurpose = extractPurposeSection(targetContent);
      if (existingPurpose && existingPurpose !== deltaPurpose) {
        warn(
          `${specName} - delta Purpose ignored; ${specName} already has one. ` +
            `Edit ${update.target} directly to change it.`
        );
      }
    }
  } catch {
    // Target spec does not exist; MODIFIED and RENAMED are not allowed for new specs
    // REMOVED will be ignored with a warning since there's nothing to remove
    if (plan.modified.length > 0 || plan.renamed.length > 0) {
      throw new Error(
        `${specName}: target spec does not exist; only ADDED requirements are allowed for new specs. MODIFIED and RENAMED operations require an existing spec.`
      );
    }
    // Warn about REMOVED requirements being ignored for new specs
    if (plan.removed.length > 0) {
      warn(
        `${specName} - ${plan.removed.length} REMOVED requirement(s) ignored for new spec (nothing to remove).`
      );

View on GitHub (pinned to 6926ccb18a)