Skip to main content

Function: extractSpecSummary()

extractSpecSummary(content): string | null

Defined in: packages/core/src/domain/services/spec-summary.ts:14

Extracts a short summary from the content of a spec.md file.

Resolution order (first match wins):

  1. First non-empty paragraph immediately after the # H1 heading.
  2. First paragraph of the first ## Overview, ## Summary, or ## Purpose section.

Returns null when no summary can be extracted.

Parameters

content

string

Raw markdown content of a spec file

Returns

string | null

A single-line summary string, or null if none found