@@ -10,6 +10,7 @@ const linesJson = readJson("src/data/method/lines.json");
1010const resourcesJson = readJson ( "src/data/method/resources.json" ) ;
1111const criteriaJson = readJson ( "src/data/method/criteria.json" ) ;
1212const stakeholdersJson = readJson ( "src/data/method/stakeholders.json" ) ;
13+ const stationCriteriaJson = readJson ( "src/data/method/station-criteria.json" ) ;
1314const canvasDataJson = readJson ( "src/data/canvas/canvasData.json" ) ;
1415const localizedCanvasDataJson = readJson ( "src/data/canvas/localizedData.json" ) ;
1516const knownResourceIds = new Set ( ( resourcesJson . resources || [ ] ) . map ( ( resource ) => resource . id ) ) ;
@@ -23,6 +24,7 @@ const localeDirs = readdirSync("src/data/method", { withFileTypes: true })
2324 . filter ( ( entry ) => entry . isDirectory ( ) )
2425 . map ( ( entry ) => entry . name ) ;
2526const findings = [ ] ;
27+ const lifecycleStages = new Set ( [ "strategy" , "architecture" , "design" , "delivery" , "publishing" , "improving" ] ) ;
2628
2729function collectMatchingStringValues ( node , pattern , results = new Set ( ) ) {
2830 if ( typeof node === "string" ) {
@@ -104,6 +106,22 @@ for (const station of stationGroups) {
104106 ) ;
105107 }
106108 }
109+
110+ if ( station . group === "core-stations" ) {
111+ if ( ! lifecycleStages . has ( station . lifecycleStage ) ) {
112+ findings . push ( `Core station ${ station . id } is missing a valid lifecycleStage.` ) ;
113+ }
114+
115+ const expectedCriteria = stationCriteriaJson [ station . id ] || [ ] ;
116+ const actualCriteria = station . stationCriteria || [ ] ;
117+ if ( JSON . stringify ( actualCriteria ) !== JSON . stringify ( expectedCriteria ) ) {
118+ findings . push ( `Core station ${ station . id } stationCriteria does not match station-criteria.json.` ) ;
119+ }
120+
121+ if ( ! Array . isArray ( station . expectedEvidenceTags ) || station . expectedEvidenceTags . length === 0 ) {
122+ findings . push ( `Core station ${ station . id } must define expectedEvidenceTags.` ) ;
123+ }
124+ }
107125}
108126
109127for ( const line of linesJson . lines ?. items || [ ] ) {
0 commit comments