okstra 0.143.0 → 0.145.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +4 -1
  2. package/docs/architecture.md +18 -2
  3. package/docs/cli.md +39 -2
  4. package/docs/project-structure-overview.md +19 -6
  5. package/package.json +1 -1
  6. package/runtime/BUILD.json +2 -2
  7. package/runtime/prompts/coding-preflight/overview.md +1 -1
  8. package/runtime/prompts/lead/convergence.md +11 -3
  9. package/runtime/prompts/lead/okstra-lead-contract.md +7 -1
  10. package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
  11. package/runtime/prompts/profiles/_common-contract.md +1 -1
  12. package/runtime/prompts/profiles/_implementation-verifier.md +48 -2
  13. package/runtime/prompts/profiles/change-impact-analysis.md +24 -0
  14. package/runtime/prompts/profiles/feature-analysis.md +24 -0
  15. package/runtime/prompts/profiles/forbidden-actions.json +18 -0
  16. package/runtime/prompts/profiles/project-analysis.md +24 -0
  17. package/runtime/prompts/wizard/prompts.ko.json +44 -1
  18. package/runtime/python/okstra_ctl/analysis_inputs.py +369 -0
  19. package/runtime/python/okstra_ctl/clarification_items.py +74 -1
  20. package/runtime/python/okstra_ctl/mutation_probe.py +1263 -0
  21. package/runtime/python/okstra_ctl/render.py +77 -4
  22. package/runtime/python/okstra_ctl/render_final_report.py +13 -4
  23. package/runtime/python/okstra_ctl/report_views.py +134 -3
  24. package/runtime/python/okstra_ctl/run.py +118 -0
  25. package/runtime/python/okstra_ctl/run_context.py +34 -2
  26. package/runtime/python/okstra_ctl/schema_excerpt.py +12 -4
  27. package/runtime/python/okstra_ctl/self_mock_signals.py +183 -0
  28. package/runtime/python/okstra_ctl/user_response.py +309 -3
  29. package/runtime/python/okstra_ctl/wizard.py +545 -32
  30. package/runtime/python/okstra_ctl/worker_prompt_policy.py +3 -0
  31. package/runtime/python/okstra_ctl/workflow.py +22 -0
  32. package/runtime/schemas/final-report-v1.0.schema.json +849 -3
  33. package/runtime/skills/okstra-run/SKILL.md +13 -1
  34. package/runtime/templates/reports/change-impact-analysis-input.template.md +58 -0
  35. package/runtime/templates/reports/feature-analysis-input.template.md +59 -0
  36. package/runtime/templates/reports/final-report.template.md +220 -0
  37. package/runtime/templates/reports/i18n/en.json +8 -0
  38. package/runtime/templates/reports/i18n/ko.json +8 -0
  39. package/runtime/templates/reports/project-analysis-input.template.md +58 -0
  40. package/runtime/templates/reports/report.js +84 -5
  41. package/runtime/templates/reports/user-response.template.md +19 -1
  42. package/runtime/validators/detect_self_mock.py +220 -0
  43. package/runtime/validators/validate-report-views.py +61 -7
  44. package/runtime/validators/validate-run.py +518 -0
  45. package/runtime/validators/validate_analysis_report.py +864 -0
  46. package/src/commands/execute/render-bundle.mjs +3 -0
@@ -386,6 +386,22 @@
386
386
 
387
387
  "errorAnalysis": { "$ref": "#/$defs/ErrorAnalysis" },
388
388
 
389
+ "analysisCommon": {
390
+ "$ref": "#/$defs/AnalysisCommon"
391
+ },
392
+
393
+ "projectAnalysis": {
394
+ "$ref": "#/$defs/ProjectAnalysis"
395
+ },
396
+
397
+ "featureAnalysis": {
398
+ "$ref": "#/$defs/FeatureAnalysis"
399
+ },
400
+
401
+ "changeImpactAnalysis": {
402
+ "$ref": "#/$defs/ChangeImpactAnalysis"
403
+ },
404
+
389
405
  "implementationPlanning": {
390
406
  "type": "object",
391
407
  "description": "RENDER_IF taskType == implementation-planning. §5.5 deliverables.",
@@ -826,6 +842,48 @@
826
842
  "required": ["errorAnalysis"]
827
843
  }
828
844
  },
845
+ {
846
+ "description": "project-analysis requires analysisCommon and only projectAnalysis.",
847
+ "if": {
848
+ "properties": { "header": { "properties": { "taskType": { "const": "project-analysis" } } } },
849
+ "required": ["header"]
850
+ },
851
+ "then": {
852
+ "required": ["analysisCommon", "projectAnalysis"],
853
+ "allOf": [
854
+ { "not": { "required": ["featureAnalysis"] } },
855
+ { "not": { "required": ["changeImpactAnalysis"] } }
856
+ ]
857
+ }
858
+ },
859
+ {
860
+ "description": "feature-analysis requires analysisCommon and only featureAnalysis.",
861
+ "if": {
862
+ "properties": { "header": { "properties": { "taskType": { "const": "feature-analysis" } } } },
863
+ "required": ["header"]
864
+ },
865
+ "then": {
866
+ "required": ["analysisCommon", "featureAnalysis"],
867
+ "allOf": [
868
+ { "not": { "required": ["projectAnalysis"] } },
869
+ { "not": { "required": ["changeImpactAnalysis"] } }
870
+ ]
871
+ }
872
+ },
873
+ {
874
+ "description": "change-impact-analysis requires analysisCommon and only changeImpactAnalysis.",
875
+ "if": {
876
+ "properties": { "header": { "properties": { "taskType": { "const": "change-impact-analysis" } } } },
877
+ "required": ["header"]
878
+ },
879
+ "then": {
880
+ "required": ["analysisCommon", "changeImpactAnalysis"],
881
+ "allOf": [
882
+ { "not": { "required": ["projectAnalysis"] } },
883
+ { "not": { "required": ["featureAnalysis"] } }
884
+ ]
885
+ }
886
+ },
829
887
  {
830
888
  "description": "implementation-planning task-type requires §5.5 block.",
831
889
  "if": {
@@ -875,6 +933,9 @@
875
933
  "taskType": {
876
934
  "enum": [
877
935
  "requirements-discovery",
936
+ "project-analysis",
937
+ "feature-analysis",
938
+ "change-impact-analysis",
878
939
  "implementation-planning",
879
940
  "error-analysis",
880
941
  "implementation",
@@ -902,6 +963,44 @@
902
963
  }
903
964
  }
904
965
  },
966
+ {
967
+ "description": "Analysis verdict tokens describe analysis completeness, not user acceptance.",
968
+ "if": {
969
+ "properties": {
970
+ "header": {
971
+ "properties": {
972
+ "taskType": {
973
+ "enum": [
974
+ "project-analysis",
975
+ "feature-analysis",
976
+ "change-impact-analysis"
977
+ ]
978
+ }
979
+ }
980
+ }
981
+ },
982
+ "required": ["header"]
983
+ },
984
+ "then": {
985
+ "properties": {
986
+ "verdictCard": {
987
+ "properties": {
988
+ "verdictToken": {
989
+ "enum": ["analysis-complete", "analysis-partial", "blocked"]
990
+ }
991
+ }
992
+ },
993
+ "finalVerdict": {
994
+ "not": { "required": ["conditionalAcceptanceConditions"] },
995
+ "properties": {
996
+ "verdictToken": {
997
+ "enum": ["analysis-complete", "analysis-partial", "blocked"]
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+ },
905
1004
  {
906
1005
  "description": "final-verification verdict token must be one of accepted / conditional-accept / blocked and must explicitly list conditional acceptance conditions.",
907
1006
  "if": {
@@ -920,12 +1019,21 @@
920
1019
  }
921
1020
  },
922
1021
  {
923
- "description": "Non-final-verification verdict token must be `not-applicable`.",
1022
+ "description": "Non-analysis, non-final-verification verdict token must be `not-applicable`.",
924
1023
  "if": {
925
1024
  "properties": {
926
1025
  "header": {
927
1026
  "properties": {
928
- "taskType": { "not": { "const": "final-verification" } }
1027
+ "taskType": {
1028
+ "enum": [
1029
+ "requirements-discovery",
1030
+ "error-analysis",
1031
+ "implementation-planning",
1032
+ "implementation",
1033
+ "release-handoff",
1034
+ "quick"
1035
+ ]
1036
+ }
929
1037
  }
930
1038
  }
931
1039
  },
@@ -949,6 +1057,9 @@
949
1057
  "enum": [
950
1058
  "requirements-discovery",
951
1059
  "error-analysis",
1060
+ "project-analysis",
1061
+ "feature-analysis",
1062
+ "change-impact-analysis",
952
1063
  "implementation-planning",
953
1064
  "implementation",
954
1065
  "final-verification",
@@ -958,7 +1069,14 @@
958
1069
  },
959
1070
 
960
1071
  "VerdictToken": {
961
- "enum": ["accepted", "conditional-accept", "blocked", "not-applicable"]
1072
+ "enum": [
1073
+ "accepted",
1074
+ "conditional-accept",
1075
+ "analysis-complete",
1076
+ "analysis-partial",
1077
+ "blocked",
1078
+ "not-applicable"
1079
+ ]
962
1080
  },
963
1081
 
964
1082
  "Direction": {
@@ -1095,6 +1213,734 @@
1095
1213
  "enum": ["completed", "error", "timeout", "not-run", "synthesis-only"]
1096
1214
  },
1097
1215
 
1216
+ "CurrentCodeEvidence": {
1217
+ "type": "object",
1218
+ "required": ["path", "line", "claim"],
1219
+ "additionalProperties": false,
1220
+ "properties": {
1221
+ "path": { "type": "string", "minLength": 1 },
1222
+ "line": { "type": "integer", "minimum": 1 },
1223
+ "claim": { "type": "string", "minLength": 1 }
1224
+ }
1225
+ },
1226
+
1227
+ "AnalysisEvidenceInput": {
1228
+ "type": "object",
1229
+ "required": [
1230
+ "taskKey",
1231
+ "taskType",
1232
+ "reportPath",
1233
+ "runSeq",
1234
+ "sourceCommit",
1235
+ "relation",
1236
+ "freshness",
1237
+ "reviewStatus"
1238
+ ],
1239
+ "additionalProperties": false,
1240
+ "properties": {
1241
+ "taskKey": { "type": "string", "minLength": 1 },
1242
+ "taskType": { "enum": ["project-analysis", "feature-analysis"] },
1243
+ "reportPath": { "type": "string", "minLength": 1 },
1244
+ "runSeq": { "type": "string", "pattern": "^[0-9]{3}$" },
1245
+ "sourceCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
1246
+ "relation": { "enum": ["project-context", "feature-baseline"] },
1247
+ "freshness": { "enum": ["exact", "stale"] },
1248
+ "reviewStatus": { "enum": ["accepted", "user-unverified"] }
1249
+ }
1250
+ },
1251
+
1252
+ "AnalysisRepresentativeEntryPoint": {
1253
+ "type": "object",
1254
+ "required": ["path", "symbol"],
1255
+ "additionalProperties": false,
1256
+ "properties": {
1257
+ "path": { "type": "string", "minLength": 1 },
1258
+ "symbol": { "type": "string", "minLength": 1 }
1259
+ }
1260
+ },
1261
+
1262
+ "AnalysisFeatureIndexRow": {
1263
+ "type": "object",
1264
+ "required": [
1265
+ "id",
1266
+ "name",
1267
+ "description",
1268
+ "representativeEntryPoint",
1269
+ "componentIds",
1270
+ "currentCodeEvidence"
1271
+ ],
1272
+ "additionalProperties": false,
1273
+ "properties": {
1274
+ "id": { "type": "string", "pattern": "^PF-[0-9]{3}$" },
1275
+ "name": { "type": "string", "minLength": 1 },
1276
+ "description": { "type": "string", "minLength": 1 },
1277
+ "representativeEntryPoint": {
1278
+ "$ref": "#/$defs/AnalysisRepresentativeEntryPoint"
1279
+ },
1280
+ "componentIds": {
1281
+ "type": "array",
1282
+ "items": { "type": "string", "pattern": "^PC-[0-9]{3}$" }
1283
+ },
1284
+ "currentCodeEvidence": {
1285
+ "type": "array",
1286
+ "minItems": 1,
1287
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1288
+ }
1289
+ }
1290
+ },
1291
+
1292
+ "AnalysisResolvedTarget": {
1293
+ "type": "object",
1294
+ "additionalProperties": false,
1295
+ "properties": {
1296
+ "inputMode": { "enum": ["feature-index", "free-text"] },
1297
+ "requestedValue": { "type": "string", "minLength": 1 },
1298
+ "feature": { "$ref": "#/$defs/AnalysisFeatureIndexRow" }
1299
+ },
1300
+ "allOf": [
1301
+ {
1302
+ "if": { "required": ["inputMode"] },
1303
+ "then": {
1304
+ "required": ["requestedValue"],
1305
+ "allOf": [
1306
+ {
1307
+ "if": {
1308
+ "properties": { "inputMode": { "const": "feature-index" } },
1309
+ "required": ["inputMode"]
1310
+ },
1311
+ "then": { "required": ["feature"] },
1312
+ "else": { "not": { "required": ["feature"] } }
1313
+ }
1314
+ ]
1315
+ },
1316
+ "else": {
1317
+ "allOf": [
1318
+ { "not": { "required": ["requestedValue"] } },
1319
+ { "not": { "required": ["feature"] } }
1320
+ ]
1321
+ }
1322
+ }
1323
+ ]
1324
+ },
1325
+
1326
+ "AnalysisScope": {
1327
+ "type": "object",
1328
+ "required": [
1329
+ "includedPaths",
1330
+ "excludedPaths",
1331
+ "unscannedPaths",
1332
+ "resolvedTarget"
1333
+ ],
1334
+ "additionalProperties": false,
1335
+ "properties": {
1336
+ "includedPaths": {
1337
+ "type": "array",
1338
+ "minItems": 1,
1339
+ "items": { "type": "string", "minLength": 1 }
1340
+ },
1341
+ "excludedPaths": {
1342
+ "type": "array",
1343
+ "items": { "type": "string", "minLength": 1 }
1344
+ },
1345
+ "unscannedPaths": {
1346
+ "type": "array",
1347
+ "items": { "type": "string", "minLength": 1 }
1348
+ },
1349
+ "resolvedTarget": { "$ref": "#/$defs/AnalysisResolvedTarget" }
1350
+ }
1351
+ },
1352
+
1353
+ "AnalysisReviewResolution": {
1354
+ "type": "object",
1355
+ "required": ["affectedId", "outcome", "resolution", "evidence"],
1356
+ "additionalProperties": false,
1357
+ "properties": {
1358
+ "affectedId": { "type": "string", "pattern": "^[A-Z]{2}-[0-9]{3}$" },
1359
+ "outcome": {
1360
+ "enum": [
1361
+ "revised",
1362
+ "retained-with-evidence",
1363
+ "removed",
1364
+ "still-unresolved"
1365
+ ]
1366
+ },
1367
+ "resolution": { "type": "string", "minLength": 1 },
1368
+ "evidence": {
1369
+ "type": "array",
1370
+ "minItems": 1,
1371
+ "items": { "type": "string", "minLength": 1 }
1372
+ }
1373
+ }
1374
+ },
1375
+
1376
+ "AnalysisConfirmedFact": {
1377
+ "type": "object",
1378
+ "required": ["id", "statement", "currentCodeEvidence"],
1379
+ "additionalProperties": false,
1380
+ "properties": {
1381
+ "id": { "type": "string", "pattern": "^AF-[0-9]{3}$" },
1382
+ "statement": { "type": "string", "minLength": 1 },
1383
+ "currentCodeEvidence": {
1384
+ "type": "array",
1385
+ "minItems": 1,
1386
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1387
+ },
1388
+ "sourceReportRefs": {
1389
+ "type": "array",
1390
+ "items": { "type": "string", "minLength": 1 }
1391
+ }
1392
+ }
1393
+ },
1394
+
1395
+ "AnalysisInference": {
1396
+ "type": "object",
1397
+ "required": ["id", "statement", "evidenceIds", "confidence"],
1398
+ "additionalProperties": false,
1399
+ "properties": {
1400
+ "id": { "type": "string", "pattern": "^AI-[0-9]{3}$" },
1401
+ "statement": { "type": "string", "minLength": 1 },
1402
+ "evidenceIds": {
1403
+ "type": "array",
1404
+ "minItems": 1,
1405
+ "items": { "type": "string", "minLength": 1 }
1406
+ },
1407
+ "confidence": { "enum": ["high", "medium", "low"] }
1408
+ }
1409
+ },
1410
+
1411
+ "AnalysisUnknown": {
1412
+ "type": "object",
1413
+ "required": ["id", "question", "reason", "affectsVerdict"],
1414
+ "additionalProperties": false,
1415
+ "properties": {
1416
+ "id": { "type": "string", "pattern": "^AU-[0-9]{3}$" },
1417
+ "question": { "type": "string", "minLength": 1 },
1418
+ "reason": { "type": "string", "minLength": 1 },
1419
+ "affectsVerdict": { "type": "boolean" }
1420
+ }
1421
+ },
1422
+
1423
+ "AnalysisCommon": {
1424
+ "type": "object",
1425
+ "required": [
1426
+ "runSeq",
1427
+ "sourceCommit",
1428
+ "scope",
1429
+ "evidenceInputs",
1430
+ "confirmedFacts",
1431
+ "inferences",
1432
+ "unknowns",
1433
+ "analysisReviewResolution"
1434
+ ],
1435
+ "additionalProperties": false,
1436
+ "properties": {
1437
+ "runSeq": { "type": "string", "pattern": "^[0-9]{3}$" },
1438
+ "sourceCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
1439
+ "scope": { "$ref": "#/$defs/AnalysisScope" },
1440
+ "evidenceInputs": {
1441
+ "type": "array",
1442
+ "items": { "$ref": "#/$defs/AnalysisEvidenceInput" }
1443
+ },
1444
+ "confirmedFacts": {
1445
+ "type": "array",
1446
+ "items": { "$ref": "#/$defs/AnalysisConfirmedFact" }
1447
+ },
1448
+ "inferences": {
1449
+ "type": "array",
1450
+ "items": { "$ref": "#/$defs/AnalysisInference" }
1451
+ },
1452
+ "unknowns": {
1453
+ "type": "array",
1454
+ "items": { "$ref": "#/$defs/AnalysisUnknown" }
1455
+ },
1456
+ "analysisReviewResolution": {
1457
+ "type": "array",
1458
+ "items": { "$ref": "#/$defs/AnalysisReviewResolution" }
1459
+ }
1460
+ }
1461
+ },
1462
+
1463
+ "ProjectComponent": {
1464
+ "type": "object",
1465
+ "required": ["id", "name", "responsibility", "paths", "currentCodeEvidence"],
1466
+ "additionalProperties": false,
1467
+ "properties": {
1468
+ "id": { "type": "string", "pattern": "^PC-[0-9]{3}$" },
1469
+ "name": { "type": "string", "minLength": 1 },
1470
+ "responsibility": { "type": "string", "minLength": 1 },
1471
+ "paths": {
1472
+ "type": "array",
1473
+ "minItems": 1,
1474
+ "items": { "type": "string", "minLength": 1 }
1475
+ },
1476
+ "currentCodeEvidence": {
1477
+ "type": "array",
1478
+ "minItems": 1,
1479
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1480
+ }
1481
+ }
1482
+ },
1483
+
1484
+ "ProjectDependency": {
1485
+ "type": "object",
1486
+ "required": ["fromComponentId", "toComponentId", "direction", "currentCodeEvidence"],
1487
+ "additionalProperties": false,
1488
+ "properties": {
1489
+ "fromComponentId": { "type": "string", "pattern": "^PC-[0-9]{3}$" },
1490
+ "toComponentId": { "type": "string", "pattern": "^PC-[0-9]{3}$" },
1491
+ "direction": { "type": "string", "minLength": 1 },
1492
+ "currentCodeEvidence": {
1493
+ "type": "array",
1494
+ "minItems": 1,
1495
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1496
+ }
1497
+ }
1498
+ },
1499
+
1500
+ "ProjectEntryPoint": {
1501
+ "type": "object",
1502
+ "required": ["kind", "path", "symbol", "role", "currentCodeEvidence"],
1503
+ "additionalProperties": false,
1504
+ "properties": {
1505
+ "kind": { "type": "string", "minLength": 1 },
1506
+ "path": { "type": "string", "minLength": 1 },
1507
+ "symbol": { "type": "string", "minLength": 1 },
1508
+ "role": { "type": "string", "minLength": 1 },
1509
+ "currentCodeEvidence": {
1510
+ "type": "array",
1511
+ "minItems": 1,
1512
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1513
+ }
1514
+ }
1515
+ },
1516
+
1517
+ "ProjectDataStore": {
1518
+ "type": "object",
1519
+ "required": ["name", "ownerComponentId", "readBoundary", "writeBoundary", "currentCodeEvidence"],
1520
+ "additionalProperties": false,
1521
+ "properties": {
1522
+ "name": { "type": "string", "minLength": 1 },
1523
+ "ownerComponentId": { "type": "string", "pattern": "^PC-[0-9]{3}$" },
1524
+ "readBoundary": { "type": "string", "minLength": 1 },
1525
+ "writeBoundary": { "type": "string", "minLength": 1 },
1526
+ "currentCodeEvidence": {
1527
+ "type": "array",
1528
+ "minItems": 1,
1529
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1530
+ }
1531
+ }
1532
+ },
1533
+
1534
+ "ProjectExternalSystem": {
1535
+ "type": "object",
1536
+ "required": ["name", "adapter", "direction", "currentCodeEvidence"],
1537
+ "additionalProperties": false,
1538
+ "properties": {
1539
+ "name": { "type": "string", "minLength": 1 },
1540
+ "adapter": { "type": "string", "minLength": 1 },
1541
+ "direction": { "type": "string", "minLength": 1 },
1542
+ "currentCodeEvidence": {
1543
+ "type": "array",
1544
+ "minItems": 1,
1545
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1546
+ }
1547
+ }
1548
+ },
1549
+
1550
+ "ProjectScanCoverage": {
1551
+ "type": "object",
1552
+ "required": ["scannedPathCount", "unscannedPathCount", "reason"],
1553
+ "additionalProperties": false,
1554
+ "properties": {
1555
+ "scannedPathCount": { "type": "integer", "minimum": 0 },
1556
+ "unscannedPathCount": { "type": "integer", "minimum": 0 },
1557
+ "reason": { "type": "string", "minLength": 1 }
1558
+ }
1559
+ },
1560
+
1561
+ "ProjectAnalysis": {
1562
+ "type": "object",
1563
+ "required": [
1564
+ "components",
1565
+ "dependencies",
1566
+ "entryPoints",
1567
+ "dataStores",
1568
+ "externalSystems",
1569
+ "featureIndex",
1570
+ "scanCoverage"
1571
+ ],
1572
+ "additionalProperties": false,
1573
+ "properties": {
1574
+ "components": {
1575
+ "type": "array",
1576
+ "items": { "$ref": "#/$defs/ProjectComponent" }
1577
+ },
1578
+ "dependencies": {
1579
+ "type": "array",
1580
+ "items": { "$ref": "#/$defs/ProjectDependency" }
1581
+ },
1582
+ "entryPoints": {
1583
+ "type": "array",
1584
+ "items": { "$ref": "#/$defs/ProjectEntryPoint" }
1585
+ },
1586
+ "dataStores": {
1587
+ "type": "array",
1588
+ "items": { "$ref": "#/$defs/ProjectDataStore" }
1589
+ },
1590
+ "externalSystems": {
1591
+ "type": "array",
1592
+ "items": { "$ref": "#/$defs/ProjectExternalSystem" }
1593
+ },
1594
+ "featureIndex": {
1595
+ "type": "array",
1596
+ "items": { "$ref": "#/$defs/AnalysisFeatureIndexRow" }
1597
+ },
1598
+ "scanCoverage": { "$ref": "#/$defs/ProjectScanCoverage" }
1599
+ }
1600
+ },
1601
+
1602
+ "FeatureTarget": {
1603
+ "type": "object",
1604
+ "required": ["inputMode", "requestedValue", "entryPoints"],
1605
+ "additionalProperties": false,
1606
+ "properties": {
1607
+ "inputMode": { "enum": ["feature-index", "free-text"] },
1608
+ "requestedValue": { "type": "string", "minLength": 1 },
1609
+ "featureId": { "type": "string", "pattern": "^PF-[0-9]{3}$" },
1610
+ "entryPoints": {
1611
+ "type": "array",
1612
+ "minItems": 1,
1613
+ "items": { "$ref": "#/$defs/AnalysisRepresentativeEntryPoint" }
1614
+ }
1615
+ },
1616
+ "allOf": [
1617
+ {
1618
+ "if": {
1619
+ "properties": { "inputMode": { "const": "feature-index" } },
1620
+ "required": ["inputMode"]
1621
+ },
1622
+ "then": { "required": ["featureId"] },
1623
+ "else": { "not": { "required": ["featureId"] } }
1624
+ }
1625
+ ]
1626
+ },
1627
+
1628
+ "FeatureFlowStep": {
1629
+ "type": "object",
1630
+ "required": ["sequence", "action"],
1631
+ "additionalProperties": false,
1632
+ "properties": {
1633
+ "sequence": { "type": "integer", "minimum": 1 },
1634
+ "action": { "type": "string", "minLength": 1 }
1635
+ }
1636
+ },
1637
+
1638
+ "FeatureFlow": {
1639
+ "type": "object",
1640
+ "required": ["id", "kind", "steps", "currentCodeEvidence"],
1641
+ "additionalProperties": false,
1642
+ "properties": {
1643
+ "id": { "type": "string", "pattern": "^FF-[0-9]{3}$" },
1644
+ "kind": { "enum": ["normal", "alternative", "failure"] },
1645
+ "steps": {
1646
+ "type": "array",
1647
+ "minItems": 1,
1648
+ "items": { "$ref": "#/$defs/FeatureFlowStep" }
1649
+ },
1650
+ "currentCodeEvidence": {
1651
+ "type": "array",
1652
+ "minItems": 1,
1653
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1654
+ },
1655
+ "sourceReportRefs": {
1656
+ "type": "array",
1657
+ "items": { "type": "string", "minLength": 1 }
1658
+ }
1659
+ }
1660
+ },
1661
+
1662
+ "FeatureDomainRule": {
1663
+ "type": "object",
1664
+ "required": ["id", "condition", "outcome", "currentCodeEvidence"],
1665
+ "additionalProperties": false,
1666
+ "properties": {
1667
+ "id": { "type": "string", "pattern": "^FR-[0-9]{3}$" },
1668
+ "condition": { "type": "string", "minLength": 1 },
1669
+ "outcome": { "type": "string", "minLength": 1 },
1670
+ "currentCodeEvidence": {
1671
+ "type": "array",
1672
+ "minItems": 1,
1673
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1674
+ },
1675
+ "sourceReportRefs": {
1676
+ "type": "array",
1677
+ "items": { "type": "string", "minLength": 1 }
1678
+ }
1679
+ }
1680
+ },
1681
+
1682
+ "FeatureStateChange": {
1683
+ "type": "object",
1684
+ "required": [
1685
+ "id",
1686
+ "dataStore",
1687
+ "field",
1688
+ "change",
1689
+ "sideEffects",
1690
+ "currentCodeEvidence"
1691
+ ],
1692
+ "additionalProperties": false,
1693
+ "properties": {
1694
+ "id": { "type": "string", "pattern": "^FS-[0-9]{3}$" },
1695
+ "dataStore": { "type": "string", "minLength": 1 },
1696
+ "field": { "type": "string", "minLength": 1 },
1697
+ "change": { "type": "string", "minLength": 1 },
1698
+ "sideEffects": {
1699
+ "type": "array",
1700
+ "items": { "type": "string", "minLength": 1 }
1701
+ },
1702
+ "currentCodeEvidence": {
1703
+ "type": "array",
1704
+ "minItems": 1,
1705
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1706
+ },
1707
+ "sourceReportRefs": {
1708
+ "type": "array",
1709
+ "items": { "type": "string", "minLength": 1 }
1710
+ }
1711
+ }
1712
+ },
1713
+
1714
+ "FeatureExternalInteraction": {
1715
+ "type": "object",
1716
+ "required": ["target", "input", "output", "failureHandling", "currentCodeEvidence"],
1717
+ "additionalProperties": false,
1718
+ "properties": {
1719
+ "target": { "type": "string", "minLength": 1 },
1720
+ "input": { "type": "string", "minLength": 1 },
1721
+ "output": { "type": "string", "minLength": 1 },
1722
+ "failureHandling": { "type": "string", "minLength": 1 },
1723
+ "currentCodeEvidence": {
1724
+ "type": "array",
1725
+ "minItems": 1,
1726
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1727
+ }
1728
+ }
1729
+ },
1730
+
1731
+ "FeatureTestCoverage": {
1732
+ "type": "object",
1733
+ "required": ["id", "targetIds", "testPaths", "gaps"],
1734
+ "additionalProperties": false,
1735
+ "properties": {
1736
+ "id": { "type": "string", "pattern": "^FT-[0-9]{3}$" },
1737
+ "targetIds": {
1738
+ "type": "array",
1739
+ "minItems": 1,
1740
+ "items": { "type": "string", "pattern": "^F[FRS]-[0-9]{3}$" }
1741
+ },
1742
+ "testPaths": {
1743
+ "type": "array",
1744
+ "items": { "type": "string", "minLength": 1 }
1745
+ },
1746
+ "gaps": {
1747
+ "type": "array",
1748
+ "items": { "type": "string", "minLength": 1 }
1749
+ }
1750
+ }
1751
+ },
1752
+
1753
+ "FeatureAnalysis": {
1754
+ "type": "object",
1755
+ "required": [
1756
+ "target",
1757
+ "flows",
1758
+ "domainRules",
1759
+ "stateChanges",
1760
+ "externalInteractions",
1761
+ "testCoverage"
1762
+ ],
1763
+ "additionalProperties": false,
1764
+ "properties": {
1765
+ "target": { "$ref": "#/$defs/FeatureTarget" },
1766
+ "flows": {
1767
+ "type": "array",
1768
+ "items": { "$ref": "#/$defs/FeatureFlow" }
1769
+ },
1770
+ "domainRules": {
1771
+ "type": "array",
1772
+ "items": { "$ref": "#/$defs/FeatureDomainRule" }
1773
+ },
1774
+ "stateChanges": {
1775
+ "type": "array",
1776
+ "items": { "$ref": "#/$defs/FeatureStateChange" }
1777
+ },
1778
+ "externalInteractions": {
1779
+ "type": "array",
1780
+ "items": { "$ref": "#/$defs/FeatureExternalInteraction" }
1781
+ },
1782
+ "testCoverage": {
1783
+ "type": "array",
1784
+ "items": { "$ref": "#/$defs/FeatureTestCoverage" }
1785
+ }
1786
+ }
1787
+ },
1788
+
1789
+ "ChangeRequest": {
1790
+ "type": "object",
1791
+ "required": ["summary", "briefEvidence"],
1792
+ "additionalProperties": false,
1793
+ "properties": {
1794
+ "summary": { "type": "string", "minLength": 1 },
1795
+ "briefEvidence": { "type": "string", "minLength": 1 }
1796
+ }
1797
+ },
1798
+
1799
+ "PreservedBehavior": {
1800
+ "type": "object",
1801
+ "required": ["statement", "currentCodeEvidence"],
1802
+ "additionalProperties": false,
1803
+ "properties": {
1804
+ "statement": { "type": "string", "minLength": 1 },
1805
+ "currentCodeEvidence": {
1806
+ "type": "array",
1807
+ "minItems": 1,
1808
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1809
+ }
1810
+ }
1811
+ },
1812
+
1813
+ "ChangeImpactItem": {
1814
+ "type": "object",
1815
+ "required": [
1816
+ "id",
1817
+ "target",
1818
+ "impactKind",
1819
+ "level",
1820
+ "confidence",
1821
+ "sourceReportRefs",
1822
+ "currentCodeEvidence"
1823
+ ],
1824
+ "additionalProperties": false,
1825
+ "properties": {
1826
+ "id": { "type": "string", "pattern": "^CI-[0-9]{3}$" },
1827
+ "target": { "type": "string", "minLength": 1 },
1828
+ "impactKind": { "type": "string", "minLength": 1 },
1829
+ "level": { "enum": ["high", "medium", "low"] },
1830
+ "confidence": { "enum": ["high", "medium", "low"] },
1831
+ "sourceReportRefs": {
1832
+ "type": "array",
1833
+ "items": { "type": "string", "minLength": 1 }
1834
+ },
1835
+ "currentCodeEvidence": {
1836
+ "type": "array",
1837
+ "minItems": 1,
1838
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1839
+ }
1840
+ }
1841
+ },
1842
+
1843
+ "DependencyBlastRadius": {
1844
+ "type": "object",
1845
+ "required": ["sourceImpactId", "affectedTarget", "direction", "currentCodeEvidence"],
1846
+ "additionalProperties": false,
1847
+ "properties": {
1848
+ "sourceImpactId": { "type": "string", "pattern": "^CI-[0-9]{3}$" },
1849
+ "affectedTarget": { "type": "string", "minLength": 1 },
1850
+ "direction": { "type": "string", "minLength": 1 },
1851
+ "currentCodeEvidence": {
1852
+ "type": "array",
1853
+ "minItems": 1,
1854
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1855
+ }
1856
+ }
1857
+ },
1858
+
1859
+ "ChangeTestImpact": {
1860
+ "type": "object",
1861
+ "required": ["scope", "action", "testPaths", "currentCodeEvidence"],
1862
+ "additionalProperties": false,
1863
+ "properties": {
1864
+ "scope": { "type": "string", "minLength": 1 },
1865
+ "action": { "enum": ["preserve", "modify", "add"] },
1866
+ "testPaths": {
1867
+ "type": "array",
1868
+ "items": { "type": "string", "minLength": 1 }
1869
+ },
1870
+ "currentCodeEvidence": {
1871
+ "type": "array",
1872
+ "minItems": 1,
1873
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1874
+ }
1875
+ }
1876
+ },
1877
+
1878
+ "OperationalImpact": {
1879
+ "type": "object",
1880
+ "required": ["area", "impact", "currentCodeEvidence"],
1881
+ "additionalProperties": false,
1882
+ "properties": {
1883
+ "area": { "type": "string", "minLength": 1 },
1884
+ "impact": { "type": "string", "minLength": 1 },
1885
+ "currentCodeEvidence": {
1886
+ "type": "array",
1887
+ "minItems": 1,
1888
+ "items": { "$ref": "#/$defs/CurrentCodeEvidence" }
1889
+ }
1890
+ }
1891
+ },
1892
+
1893
+ "AnalysisPlanningInput": {
1894
+ "type": "object",
1895
+ "required": ["constraint", "unknown"],
1896
+ "additionalProperties": false,
1897
+ "properties": {
1898
+ "constraint": { "type": "string", "minLength": 1 },
1899
+ "unknown": { "type": "boolean" }
1900
+ }
1901
+ },
1902
+
1903
+ "ChangeImpactAnalysis": {
1904
+ "type": "object",
1905
+ "required": [
1906
+ "changeRequest",
1907
+ "preservedBehaviors",
1908
+ "impactItems",
1909
+ "dependencyBlastRadius",
1910
+ "testImpact",
1911
+ "operationalImpact",
1912
+ "planningInputs"
1913
+ ],
1914
+ "additionalProperties": false,
1915
+ "properties": {
1916
+ "changeRequest": { "$ref": "#/$defs/ChangeRequest" },
1917
+ "preservedBehaviors": {
1918
+ "type": "array",
1919
+ "items": { "$ref": "#/$defs/PreservedBehavior" }
1920
+ },
1921
+ "impactItems": {
1922
+ "type": "array",
1923
+ "items": { "$ref": "#/$defs/ChangeImpactItem" }
1924
+ },
1925
+ "dependencyBlastRadius": {
1926
+ "type": "array",
1927
+ "items": { "$ref": "#/$defs/DependencyBlastRadius" }
1928
+ },
1929
+ "testImpact": {
1930
+ "type": "array",
1931
+ "items": { "$ref": "#/$defs/ChangeTestImpact" }
1932
+ },
1933
+ "operationalImpact": {
1934
+ "type": "array",
1935
+ "items": { "$ref": "#/$defs/OperationalImpact" }
1936
+ },
1937
+ "planningInputs": {
1938
+ "type": "array",
1939
+ "items": { "$ref": "#/$defs/AnalysisPlanningInput" }
1940
+ }
1941
+ }
1942
+ },
1943
+
1098
1944
  "SourceItem": {
1099
1945
  "type": "string",
1100
1946
  "pattern": "^[a-z][a-z-]*:[A-Za-z0-9._-]+$",