File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 "lint:fix" : " eslint . --fix" ,
1212 "format" : " prettier . --write" ,
1313 "format:check" : " prettier . --check" ,
14- "aahp:check" : " node -e \" console.log('AAHP check: PASS (stub)') \" " ,
14+ "aahp:check" : " node scripts/aahp- check.mjs " ,
1515 "verify:quick" : " npm test && npm run build" ,
1616 "release:gate" : " npm run aahp:check && npm test && npm run typecheck" ,
1717 "dev:control" : " tsx src/control-plane.ts" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ import fs from "node:fs" ;
3+ import path from "node:path" ;
4+
5+ const root = process . cwd ( ) ;
6+
7+ const requiredFiles = [
8+ "README.md" ,
9+ "docs/ARCHITECTURE.md" ,
10+ "docs/API.md" ,
11+ "docs/EXTENDING.md" ,
12+ "docs/TROUBLESHOOTING.md" ,
13+ "docs/PHASE2_ROADMAP.md" ,
14+ "src/control-plane.ts" ,
15+ "src/security.ts" ,
16+ "src/test.ts" ,
17+ "src/phase2b.test.ts" ,
18+ "src/phase2d.test.ts"
19+ ] ;
20+
21+ const missing = requiredFiles . filter ( ( rel ) => ! fs . existsSync ( path . join ( root , rel ) ) ) ;
22+
23+ if ( missing . length > 0 ) {
24+ console . error ( "AAHP check: FAIL" ) ;
25+ for ( const f of missing ) console . error ( `- missing: ${ f } ` ) ;
26+ process . exit ( 1 ) ;
27+ }
28+
29+ const roadmap = fs . readFileSync ( path . join ( root , "docs/PHASE2_ROADMAP.md" ) , "utf8" ) ;
30+ const mustContain = [
31+ "mandatory security" ,
32+ "release gate" ,
33+ "observability" ,
34+ "failure drills"
35+ ] ;
36+
37+ const missingPhrases = mustContain . filter ( ( p ) => ! roadmap . toLowerCase ( ) . includes ( p ) ) ;
38+ if ( missingPhrases . length > 0 ) {
39+ console . error ( "AAHP check: FAIL" ) ;
40+ for ( const p of missingPhrases ) console . error ( `- roadmap missing phrase: ${ p } ` ) ;
41+ process . exit ( 1 ) ;
42+ }
43+
44+ console . log ( "AAHP check: PASS" ) ;
You can’t perform that action at this time.
0 commit comments