okstra 0.122.0 → 0.124.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 (108) hide show
  1. package/README.md +5 -2
  2. package/docs/architecture/storage-model.md +15 -1
  3. package/docs/architecture.md +45 -7
  4. package/docs/cli.md +47 -5
  5. package/docs/for-ai/README.md +42 -36
  6. package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
  7. package/docs/for-ai/skills/okstra-container-build.md +61 -61
  8. package/docs/for-ai/skills/okstra-graphify.md +64 -0
  9. package/docs/for-ai/skills/okstra-inspect.md +86 -86
  10. package/docs/for-ai/skills/okstra-manager.md +32 -32
  11. package/docs/for-ai/skills/okstra-memory.md +49 -50
  12. package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
  13. package/docs/for-ai/skills/okstra-rollup.md +58 -58
  14. package/docs/for-ai/skills/okstra-run.md +95 -95
  15. package/docs/for-ai/skills/okstra-schedule-gen.md +320 -0
  16. package/docs/for-ai/skills/okstra-setup.md +63 -64
  17. package/docs/for-ai/skills/okstra-user-response.md +48 -0
  18. package/docs/performance-improvement-plan-v2.md +4 -4
  19. package/docs/pr-template-usage.md +34 -34
  20. package/docs/project-structure-overview.md +92 -70
  21. package/docs/task-process/README.md +33 -33
  22. package/docs/task-process/common-flow.md +26 -26
  23. package/docs/task-process/error-analysis.md +20 -21
  24. package/docs/task-process/final-verification.md +41 -41
  25. package/docs/task-process/implementation-planning.md +52 -28
  26. package/docs/task-process/implementation.md +51 -32
  27. package/docs/task-process/release-handoff.md +46 -46
  28. package/docs/task-process/requirements-discovery.md +22 -23
  29. package/package.json +1 -1
  30. package/runtime/BUILD.json +2 -2
  31. package/runtime/agents/workers/antigravity-worker.md +4 -4
  32. package/runtime/agents/workers/claude-worker.md +2 -2
  33. package/runtime/agents/workers/codex-worker.md +4 -4
  34. package/runtime/agents/workers/report-writer-worker.md +4 -4
  35. package/runtime/bin/lib/okstra/usage.sh +3 -3
  36. package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
  37. package/runtime/prompts/launch.template.md +6 -3
  38. package/runtime/prompts/lead/convergence.md +11 -21
  39. package/runtime/prompts/lead/okstra-lead-contract.md +16 -18
  40. package/runtime/prompts/lead/plan-body-verification.md +47 -18
  41. package/runtime/prompts/lead/report-writer.md +50 -45
  42. package/runtime/prompts/lead/team-contract.md +11 -122
  43. package/runtime/prompts/profiles/_common-contract.md +15 -22
  44. package/runtime/prompts/profiles/_implementation-deliverable.md +4 -2
  45. package/runtime/prompts/profiles/_implementation-executor.md +6 -1
  46. package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
  47. package/runtime/prompts/profiles/error-analysis.md +2 -2
  48. package/runtime/prompts/profiles/final-verification.md +3 -1
  49. package/runtime/prompts/profiles/implementation-planning.md +24 -14
  50. package/runtime/prompts/profiles/implementation.md +1 -1
  51. package/runtime/prompts/profiles/improvement-discovery.md +1 -1
  52. package/runtime/prompts/profiles/release-handoff.md +3 -3
  53. package/runtime/prompts/profiles/requirements-discovery.md +18 -18
  54. package/runtime/prompts/wizard/prompts.ko.json +44 -0
  55. package/runtime/python/okstra_ctl/codex_dispatch.py +23 -1
  56. package/runtime/python/okstra_ctl/design_prep.py +1462 -0
  57. package/runtime/python/okstra_ctl/design_surfaces.py +243 -0
  58. package/runtime/python/okstra_ctl/final_report_schema.py +33 -1
  59. package/runtime/python/okstra_ctl/implementation_stage.py +35 -0
  60. package/runtime/python/okstra_ctl/incremental_carry.py +294 -21
  61. package/runtime/python/okstra_ctl/incremental_scope.py +51 -5
  62. package/runtime/python/okstra_ctl/material.py +1 -1
  63. package/runtime/python/okstra_ctl/model_discovery.py +98 -0
  64. package/runtime/python/okstra_ctl/models.py +8 -3
  65. package/runtime/python/okstra_ctl/render.py +5 -0
  66. package/runtime/python/okstra_ctl/run.py +53 -5
  67. package/runtime/python/okstra_ctl/user_response.py +67 -2
  68. package/runtime/python/okstra_ctl/wizard.py +283 -3
  69. package/runtime/python/okstra_token_usage/report.py +11 -0
  70. package/runtime/schemas/final-report-v1.0.schema.json +336 -0
  71. package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
  72. package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
  73. package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
  74. package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
  75. package/runtime/skills/okstra-container-build/SKILL.md +24 -14
  76. package/runtime/skills/okstra-graphify/SKILL.md +12 -4
  77. package/runtime/skills/okstra-inspect/SKILL.md +105 -99
  78. package/runtime/skills/okstra-manager/SKILL.md +1 -1
  79. package/runtime/skills/okstra-memory/SKILL.md +3 -3
  80. package/runtime/skills/okstra-rollup/SKILL.md +12 -6
  81. package/runtime/skills/okstra-run/SKILL.md +49 -88
  82. package/runtime/skills/{okstra-schedule → okstra-schedule-gen}/SKILL.md +38 -32
  83. package/runtime/skills/okstra-setup/SKILL.md +1 -1
  84. package/runtime/skills/okstra-setup/references/project-config.md +17 -16
  85. package/runtime/skills/okstra-usage/SKILL.md +5 -2
  86. package/runtime/skills/okstra-user-response/SKILL.md +23 -9
  87. package/runtime/templates/prd/brief.template.md +92 -92
  88. package/runtime/templates/reports/error-analysis-input.template.md +1 -1
  89. package/runtime/templates/reports/fan-out-unit.template.md +6 -6
  90. package/runtime/templates/reports/final-report.template.md +67 -0
  91. package/runtime/templates/reports/final-verification-input.template.md +6 -6
  92. package/runtime/templates/reports/i18n/en.json +31 -0
  93. package/runtime/templates/reports/i18n/ko.json +31 -0
  94. package/runtime/templates/reports/implementation-input.template.md +1 -1
  95. package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
  96. package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
  97. package/runtime/templates/reports/quick-input.template.md +1 -1
  98. package/runtime/templates/reports/release-handoff-input.template.md +1 -1
  99. package/runtime/templates/reports/schedule.template.md +22 -22
  100. package/runtime/templates/reports/task-brief.template.md +3 -3
  101. package/runtime/templates/reports/user-response.template.md +20 -20
  102. package/runtime/templates/worker-prompt-preamble.md +111 -13
  103. package/runtime/validators/validate-run.py +426 -5
  104. package/runtime/validators/validate-schedule.py +5 -5
  105. package/src/cli-registry.mjs +7 -0
  106. package/src/commands/inspect/design-prep.mjs +23 -0
  107. package/src/lib/skill-catalog.mjs +2 -1
  108. package/docs/for-ai/skills/okstra-schedule.md +0 -320
@@ -408,6 +408,7 @@
408
408
  "minItems": 1,
409
409
  "items": { "$ref": "#/$defs/ImplementationPlanStage" }
410
410
  },
411
+ "designPreparation": { "$ref": "#/$defs/DesignPreparation" },
411
412
  "stepwiseExecution": {
412
413
  "description": "Legacy flat summary kept for compatibility only. New reports use stageMap/stages.",
413
414
  "type": "array",
@@ -1296,6 +1297,337 @@
1296
1297
  }
1297
1298
  },
1298
1299
 
1300
+ "DesignPreparation": {
1301
+ "type": "object",
1302
+ "required": ["mode", "reason", "items"],
1303
+ "additionalProperties": false,
1304
+ "properties": {
1305
+ "mode": { "enum": ["assessed", "no-design-inputs"] },
1306
+ "reason": { "type": "string", "minLength": 1 },
1307
+ "items": {
1308
+ "type": "array",
1309
+ "items": { "$ref": "#/$defs/DesignPrepItem" }
1310
+ }
1311
+ },
1312
+ "allOf": [
1313
+ {
1314
+ "if": {
1315
+ "properties": { "mode": { "const": "no-design-inputs" } }
1316
+ },
1317
+ "then": { "properties": { "items": { "maxItems": 0 } } }
1318
+ }
1319
+ ]
1320
+ },
1321
+
1322
+ "DesignPrepKnownFact": {
1323
+ "type": "object",
1324
+ "required": ["statement", "evidence"],
1325
+ "additionalProperties": false,
1326
+ "properties": {
1327
+ "statement": { "type": "string", "minLength": 1 },
1328
+ "evidence": { "type": "string", "minLength": 1 }
1329
+ }
1330
+ },
1331
+
1332
+ "DesignPrepProposal": {
1333
+ "type": "object",
1334
+ "required": ["summary", "details", "assumptions", "evidence", "confidence"],
1335
+ "additionalProperties": false,
1336
+ "properties": {
1337
+ "summary": { "type": "string", "minLength": 1 },
1338
+ "details": {
1339
+ "type": "array",
1340
+ "items": { "type": "string", "minLength": 1 }
1341
+ },
1342
+ "assumptions": {
1343
+ "type": "array",
1344
+ "items": { "type": "string", "minLength": 1 }
1345
+ },
1346
+ "evidence": {
1347
+ "type": "array",
1348
+ "items": { "type": "string", "minLength": 1 }
1349
+ },
1350
+ "confidence": { "enum": ["low", "medium", "high"] }
1351
+ }
1352
+ },
1353
+
1354
+ "DesignPrepHumanConfirmation": {
1355
+ "type": "object",
1356
+ "required": ["required", "reason", "suggestedAction"],
1357
+ "additionalProperties": false,
1358
+ "properties": {
1359
+ "required": { "type": "boolean" },
1360
+ "reason": { "type": "string", "minLength": 1 },
1361
+ "suggestedAction": { "type": "string", "minLength": 1 }
1362
+ }
1363
+ },
1364
+
1365
+ "DesignPrepReviewPoint": {
1366
+ "type": "object",
1367
+ "required": ["phase"],
1368
+ "additionalProperties": false,
1369
+ "properties": {
1370
+ "phase": { "enum": ["implementation", "final-verification"] },
1371
+ "stage": { "type": "integer", "minimum": 1 }
1372
+ },
1373
+ "allOf": [
1374
+ {
1375
+ "if": { "properties": { "phase": { "const": "implementation" } } },
1376
+ "then": { "required": ["stage"] }
1377
+ }
1378
+ ]
1379
+ },
1380
+
1381
+ "DesignPrepItem": {
1382
+ "type": "object",
1383
+ "required": [
1384
+ "id",
1385
+ "kind",
1386
+ "title",
1387
+ "stageRefs",
1388
+ "status",
1389
+ "need",
1390
+ "knownFacts",
1391
+ "openQuestions",
1392
+ "aiProposal",
1393
+ "humanConfirmation"
1394
+ ],
1395
+ "additionalProperties": false,
1396
+ "properties": {
1397
+ "id": { "type": "string", "pattern": "^PREP-[0-9]{3}$" },
1398
+ "kind": {
1399
+ "enum": [
1400
+ "domain-contract",
1401
+ "persistence-schema",
1402
+ "external-interface",
1403
+ "transaction-consistency",
1404
+ "transformation-mapping",
1405
+ "lifecycle-state-machine",
1406
+ "rollout-observability",
1407
+ "manual-user-test",
1408
+ "other"
1409
+ ]
1410
+ },
1411
+ "title": { "type": "string", "minLength": 1 },
1412
+ "stageRefs": {
1413
+ "type": "array",
1414
+ "minItems": 1,
1415
+ "uniqueItems": true,
1416
+ "items": { "type": "integer", "minimum": 1 }
1417
+ },
1418
+ "status": {
1419
+ "enum": ["ready", "provisional", "blocked", "not-applicable"]
1420
+ },
1421
+ "need": { "type": "string", "minLength": 1 },
1422
+ "knownFacts": {
1423
+ "type": "array",
1424
+ "items": { "$ref": "#/$defs/DesignPrepKnownFact" }
1425
+ },
1426
+ "openQuestions": {
1427
+ "type": "array",
1428
+ "items": { "type": "string", "minLength": 1 }
1429
+ },
1430
+ "aiProposal": { "$ref": "#/$defs/DesignPrepProposal" },
1431
+ "humanConfirmation": {
1432
+ "$ref": "#/$defs/DesignPrepHumanConfirmation"
1433
+ },
1434
+ "workingAssumption": { "type": "string", "minLength": 1 },
1435
+ "guardrails": {
1436
+ "type": "array",
1437
+ "minItems": 1,
1438
+ "items": { "type": "string", "minLength": 1 }
1439
+ },
1440
+ "reviewAt": { "$ref": "#/$defs/DesignPrepReviewPoint" },
1441
+ "ifStillOpen": { "enum": ["block", "follow-up"] },
1442
+ "requestPath": {
1443
+ "type": "string",
1444
+ "pattern": "^design-prep-requests/design-prep-request-[0-9]+-PREP-[0-9]{3}\\.md$"
1445
+ },
1446
+ "blockReason": { "type": "string", "minLength": 1 },
1447
+ "requiredDecision": { "type": "string", "minLength": 1 },
1448
+ "notApplicableReason": { "type": "string", "minLength": 1 },
1449
+ "replanTriggerFields": {
1450
+ "type": "array",
1451
+ "uniqueItems": true,
1452
+ "items": {
1453
+ "type": "string",
1454
+ "pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
1455
+ }
1456
+ }
1457
+ },
1458
+ "oneOf": [
1459
+ {
1460
+ "properties": { "status": { "const": "ready" } },
1461
+ "allOf": [
1462
+ { "not": { "required": ["workingAssumption"] } },
1463
+ { "not": { "required": ["blockReason"] } },
1464
+ { "not": { "required": ["requiredDecision"] } },
1465
+ { "not": { "required": ["notApplicableReason"] } },
1466
+ { "not": { "required": ["requestPath"] } }
1467
+ ]
1468
+ },
1469
+ {
1470
+ "properties": { "status": { "const": "provisional" } },
1471
+ "required": [
1472
+ "workingAssumption",
1473
+ "guardrails",
1474
+ "reviewAt",
1475
+ "ifStillOpen",
1476
+ "requestPath"
1477
+ ],
1478
+ "allOf": [
1479
+ { "not": { "required": ["blockReason"] } },
1480
+ { "not": { "required": ["requiredDecision"] } },
1481
+ { "not": { "required": ["notApplicableReason"] } }
1482
+ ]
1483
+ },
1484
+ {
1485
+ "properties": {
1486
+ "status": { "const": "blocked" },
1487
+ "humanConfirmation": {
1488
+ "properties": { "required": { "const": true } }
1489
+ }
1490
+ },
1491
+ "required": [
1492
+ "blockReason",
1493
+ "requiredDecision",
1494
+ "reviewAt",
1495
+ "ifStillOpen",
1496
+ "requestPath"
1497
+ ],
1498
+ "allOf": [
1499
+ { "not": { "required": ["workingAssumption"] } },
1500
+ { "not": { "required": ["guardrails"] } },
1501
+ { "not": { "required": ["notApplicableReason"] } }
1502
+ ]
1503
+ },
1504
+ {
1505
+ "properties": { "status": { "const": "not-applicable" } },
1506
+ "required": ["notApplicableReason"],
1507
+ "allOf": [
1508
+ { "not": { "required": ["workingAssumption"] } },
1509
+ { "not": { "required": ["guardrails"] } },
1510
+ { "not": { "required": ["reviewAt"] } },
1511
+ { "not": { "required": ["ifStillOpen"] } },
1512
+ { "not": { "required": ["blockReason"] } },
1513
+ { "not": { "required": ["requiredDecision"] } },
1514
+ { "not": { "required": ["requestPath"] } }
1515
+ ]
1516
+ }
1517
+ ]
1518
+ },
1519
+
1520
+ "TriggerEvidence": {
1521
+ "type": "object",
1522
+ "required": ["step", "field", "match"],
1523
+ "additionalProperties": false,
1524
+ "properties": {
1525
+ "step": {
1526
+ "type": ["integer", "null"],
1527
+ "minimum": 1
1528
+ },
1529
+ "field": { "enum": ["files", "action"] },
1530
+ "match": { "type": "string", "minLength": 1 }
1531
+ }
1532
+ },
1533
+
1534
+ "InlineDesignContract": {
1535
+ "type": "object",
1536
+ "required": ["summary", "details", "evidence"],
1537
+ "additionalProperties": false,
1538
+ "properties": {
1539
+ "summary": { "type": "string", "minLength": 1 },
1540
+ "details": {
1541
+ "type": "array",
1542
+ "minItems": 1,
1543
+ "items": { "type": "string", "minLength": 1 }
1544
+ },
1545
+ "evidence": {
1546
+ "type": "array",
1547
+ "minItems": 1,
1548
+ "items": { "type": "string", "minLength": 1 }
1549
+ }
1550
+ }
1551
+ },
1552
+
1553
+ "DesignSurfaceCoverage": {
1554
+ "type": "object",
1555
+ "required": ["kind", "triggerEvidence", "disposition"],
1556
+ "additionalProperties": false,
1557
+ "properties": {
1558
+ "kind": {
1559
+ "enum": [
1560
+ "domain-contract",
1561
+ "persistence-schema",
1562
+ "external-interface",
1563
+ "transaction-consistency",
1564
+ "transformation-mapping",
1565
+ "lifecycle-state-machine",
1566
+ "rollout-observability",
1567
+ "manual-user-test",
1568
+ "other"
1569
+ ]
1570
+ },
1571
+ "triggerEvidence": {
1572
+ "type": "array",
1573
+ "minItems": 1,
1574
+ "items": { "$ref": "#/$defs/TriggerEvidence" }
1575
+ },
1576
+ "disposition": {
1577
+ "enum": ["inline-contract", "prep-item", "not-applicable"]
1578
+ },
1579
+ "inlineContract": { "$ref": "#/$defs/InlineDesignContract" },
1580
+ "prepItemId": {
1581
+ "type": "string",
1582
+ "pattern": "^PREP-[0-9]{3}$"
1583
+ },
1584
+ "prepItemIds": {
1585
+ "type": "array",
1586
+ "minItems": 1,
1587
+ "uniqueItems": true,
1588
+ "items": { "type": "string", "pattern": "^PREP-[0-9]{3}$" }
1589
+ },
1590
+ "rationale": { "type": "string", "minLength": 1 }
1591
+ },
1592
+ "oneOf": [
1593
+ {
1594
+ "properties": { "disposition": { "const": "inline-contract" } },
1595
+ "required": ["inlineContract"],
1596
+ "allOf": [
1597
+ { "not": { "required": ["prepItemId"] } },
1598
+ { "not": { "required": ["prepItemIds"] } },
1599
+ { "not": { "required": ["rationale"] } }
1600
+ ]
1601
+ },
1602
+ {
1603
+ "properties": { "disposition": { "const": "prep-item" } },
1604
+ "allOf": [
1605
+ { "not": { "required": ["inlineContract"] } },
1606
+ { "not": { "required": ["rationale"] } }
1607
+ ],
1608
+ "oneOf": [
1609
+ {
1610
+ "required": ["prepItemId"],
1611
+ "not": { "required": ["prepItemIds"] }
1612
+ },
1613
+ {
1614
+ "required": ["prepItemIds"],
1615
+ "not": { "required": ["prepItemId"] }
1616
+ }
1617
+ ]
1618
+ },
1619
+ {
1620
+ "properties": { "disposition": { "const": "not-applicable" } },
1621
+ "required": ["rationale"],
1622
+ "allOf": [
1623
+ { "not": { "required": ["inlineContract"] } },
1624
+ { "not": { "required": ["prepItemId"] } },
1625
+ { "not": { "required": ["prepItemIds"] } }
1626
+ ]
1627
+ }
1628
+ ]
1629
+ },
1630
+
1299
1631
  "ImplementationPlanStage": {
1300
1632
  "type": "object",
1301
1633
  "required": [
@@ -1364,6 +1696,10 @@
1364
1696
  "maxItems": 6,
1365
1697
  "items": { "$ref": "#/$defs/StageStepRow" }
1366
1698
  },
1699
+ "designSurfaceCoverage": {
1700
+ "type": "array",
1701
+ "items": { "$ref": "#/$defs/DesignSurfaceCoverage" }
1702
+ },
1367
1703
  "exitContract": { "type": "string", "minLength": 1 },
1368
1704
  "stageValidation": { "type": "string", "minLength": 1 }
1369
1705
  }
@@ -0,0 +1 @@
1
+ Run one Bash tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — a non-literal leading token defeats the `Bash(okstra:*)` permission match):
@@ -0,0 +1 @@
1
+ If the call fails with `unknown command: preflight`, the `okstra` binary on PATH predates this skill — tell the user to update it (`npm i -g okstra@latest`), then stop (`/okstra-setup` does not update the binary).
@@ -0,0 +1 @@
1
+ Every subsequent `okstra <subcmd>` call self-bootstraps its Python path, so this skill never needs `okstra paths --shell` / `export PYTHONPATH=...`.