@@ -18,8 +18,11 @@ interface Section {
1818 children : Section [ ] ;
1919}
2020
21+ /** Result of parsing a Spec-Kit file — extracted nodes and relationships. */
2122export interface ParseResult {
23+ /** Nodes extracted from the parsed content. */
2224 nodes : Node [ ] ;
25+ /** Relationships extracted from the parsed content. */
2326 relationships : Relationship [ ] ;
2427}
2528
@@ -187,6 +190,7 @@ function extractValue(body: string, key: string): string | undefined {
187190// constitution.md parser
188191// ---------------------------------------------------------------------------
189192
193+ /** Parse a Spec-Kit constitution file into SysProM nodes (principles and invariants) and relationships. */
190194export function parseConstitution (
191195 content : string ,
192196 idPrefix : string ,
@@ -296,6 +300,7 @@ export function parseConstitution(
296300// spec.md parser
297301// ---------------------------------------------------------------------------
298302
303+ /** Parse a Spec-Kit specification file into SysProM nodes (user stories, functional requirements, acceptance criteria). */
299304export function parseSpec ( content : string , idPrefix : string ) : ParseResult {
300305 const sections = parseSections ( content ) ;
301306 const allSections = flattenSections ( sections ) ;
@@ -508,6 +513,7 @@ export function parseSpec(content: string, idPrefix: string): ParseResult {
508513// plan.md parser
509514// ---------------------------------------------------------------------------
510515
516+ /** Parse a Spec-Kit plan file into SysProM nodes (phases, milestones) and relationships. */
511517export function parsePlan ( content : string , idPrefix : string ) : ParseResult {
512518 const sections = parseSections ( content ) ;
513519 const allSections = flattenSections ( sections ) ;
@@ -613,6 +619,7 @@ export function parsePlan(content: string, idPrefix: string): ParseResult {
613619// tasks.md parser
614620// ---------------------------------------------------------------------------
615621
622+ /** Parse a Spec-Kit tasks file into SysProM change nodes with task plans. */
616623export function parseTasks ( content : string , idPrefix : string ) : ParseResult {
617624 const sections = parseSections ( content ) ;
618625 const allSections = flattenSections ( sections ) ;
@@ -739,6 +746,7 @@ export function parseTasks(content: string, idPrefix: string): ParseResult {
739746// checklist.md parser
740747// ---------------------------------------------------------------------------
741748
749+ /** Parse a Spec-Kit checklist file into SysProM gate nodes with task plans. */
742750export function parseChecklist ( content : string , idPrefix : string ) : ParseResult {
743751 const sections = parseSections ( content ) ;
744752 const allSections = flattenSections ( sections ) ;
@@ -799,6 +807,7 @@ export function parseChecklist(content: string, idPrefix: string): ParseResult {
799807// Full feature directory parser
800808// ---------------------------------------------------------------------------
801809
810+ /** Parse an entire Spec-Kit feature directory into a SysProM document, combining constitution, spec, plan, tasks, and checklist. */
802811export function parseSpecKitFeature (
803812 featureDir : string ,
804813 idPrefix : string ,
0 commit comments