# Function parseSpec

- parseSpec(
  markdown: string,
  ): Result<
  {
  title: string;
  overview: string;
  requirements: string[];
  acceptanceCriteria: string[];
  constraints: string[];
  issueReferences: { number: number; raw: string }[];
  fileReferences: { path: string; line?: number }[];
  missingSections: string[];
  rawMarkdown: string;
  techStack?: {
  language?: string;
  framework?: string;
  packageManager?: string;
  };
  },
  SpecParseError,
  >

  Parses a markdown specification into a typed ParsedSpec structure.

  Extracts title, overview, requirements, acceptance criteria, constraints, and references from a well-structured markdown document.

  #### Parameters

  - markdown: string

  #### Returns Result<
  {
  title: string;
  overview: string;
  requirements: string[];
  acceptanceCriteria: string[];
  constraints: string[];
  issueReferences: { number: number; raw: string }[];
  fileReferences: { path: string; line?: number }[];
  missingSections: string[];
  rawMarkdown: string;
  techStack?: {
  language?: string;
  framework?: string;
  packageManager?: string;
  };
  },
  SpecParseError,
  >

  - Defined in packages/nexus-agents/src/orchestration/spec-parser.ts:36