@lucern/pack-host 1.0.0 → 1.0.1

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 (62) hide show
  1. package/dist/domain-pack/authoring.core.d.ts +161 -0
  2. package/dist/domain-pack/authoring.core.js +411 -0
  3. package/dist/domain-pack/authoring.core.js.map +1 -0
  4. package/dist/domain-pack/authoring.d.ts +12 -170
  5. package/dist/domain-pack/authoring.js +1155 -1098
  6. package/dist/domain-pack/authoring.js.map +1 -1
  7. package/dist/domain-pack/authoring.validation.d.ts +28 -0
  8. package/dist/domain-pack/authoring.validation.js +1944 -0
  9. package/dist/domain-pack/authoring.validation.js.map +1 -0
  10. package/dist/domain-pack/index.d.ts +2 -1
  11. package/dist/domain-pack/index.js +1979 -1917
  12. package/dist/domain-pack/index.js.map +1 -1
  13. package/dist/domain-pack/packs/engineering-accelerator-tail.d.ts +256 -0
  14. package/dist/domain-pack/packs/engineering-accelerator-tail.js +716 -0
  15. package/dist/domain-pack/packs/engineering-accelerator-tail.js.map +1 -0
  16. package/dist/domain-pack/packs/engineering-accelerator.js +790 -785
  17. package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -1
  18. package/dist/domain-pack/packs/index.js +790 -785
  19. package/dist/domain-pack/packs/index.js.map +1 -1
  20. package/dist/domain-pack.d.ts +2 -1
  21. package/dist/domain-pack.js +1979 -1917
  22. package/dist/domain-pack.js.map +1 -1
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +1843 -1661
  25. package/dist/index.js.map +1 -1
  26. package/dist/manifests/chat-v1.js +17 -6
  27. package/dist/manifests/chat-v1.js.map +1 -1
  28. package/dist/manifests/deals-v1.js +10 -7
  29. package/dist/manifests/deals-v1.js.map +1 -1
  30. package/dist/manifests/decisions-v1.js +11 -4
  31. package/dist/manifests/decisions-v1.js.map +1 -1
  32. package/dist/manifests/documents-v1.js +12 -12
  33. package/dist/manifests/documents-v1.js.map +1 -1
  34. package/dist/manifests/epistemic-algorithms-v1.js +11 -6
  35. package/dist/manifests/epistemic-algorithms-v1.js.map +1 -1
  36. package/dist/manifests/graph-visualization-v1.js +9 -5
  37. package/dist/manifests/graph-visualization-v1.js.map +1 -1
  38. package/dist/manifests/index.d.ts +1 -0
  39. package/dist/manifests/index.js +230 -110
  40. package/dist/manifests/index.js.map +1 -1
  41. package/dist/manifests/news-v1.js +12 -13
  42. package/dist/manifests/news-v1.js.map +1 -1
  43. package/dist/manifests/philosophy-mode-v1.js +10 -12
  44. package/dist/manifests/philosophy-mode-v1.js.map +1 -1
  45. package/dist/manifests/sprints-v1.d.ts +10 -0
  46. package/dist/manifests/sprints-v1.js +106 -0
  47. package/dist/manifests/sprints-v1.js.map +1 -0
  48. package/dist/manifests/task-management-v1.js +18 -6
  49. package/dist/manifests/task-management-v1.js.map +1 -1
  50. package/dist/manifests/team-analysis-v1.js +12 -9
  51. package/dist/manifests/team-analysis-v1.js.map +1 -1
  52. package/dist/manifests/themes-v1.js +12 -16
  53. package/dist/manifests/themes-v1.js.map +1 -1
  54. package/dist/manifests/user-profiles-v1.js +9 -13
  55. package/dist/manifests/user-profiles-v1.js.map +1 -1
  56. package/dist/manifests.d.ts +1 -0
  57. package/dist/manifests.js +230 -110
  58. package/dist/manifests.js.map +1 -1
  59. package/dist/proof-attestation.json +1 -1
  60. package/dist/registry.js +229 -109
  61. package/dist/registry.js.map +1 -1
  62. package/package.json +1 -1
@@ -1344,578 +1344,8 @@ var DEVELOPER_REASONING_PACK = defineDomainPack({
1344
1344
  methodologyPackId: "developer"
1345
1345
  });
1346
1346
 
1347
- // src/domain-pack/packs/engineering-accelerator.ts
1348
- var ENGINEERING_ACCELERATOR_PACK = defineDomainPack({
1349
- packId: "engineering-accelerator",
1350
- name: "Engineering Accelerator",
1351
- version: "1.0.0",
1352
- ontologyBindings: [
1353
- {
1354
- ontologyId: "software-entities",
1355
- versionConstraint: "^1.0.0",
1356
- required: true,
1357
- provisionMode: "seed",
1358
- seedRef: "packages/pack-host/src/domain-pack/ontology/software-entities-v1.ts",
1359
- requiredEntityTypes: [
1360
- "repository",
1361
- "service",
1362
- "module",
1363
- "workflow",
1364
- "incident",
1365
- "migration",
1366
- "decision_record",
1367
- "agent"
1368
- ],
1369
- requiredEdgeTypes: [
1370
- "depends_on",
1371
- "owns",
1372
- "calls",
1373
- "blocks",
1374
- "reviews",
1375
- "mitigates",
1376
- "supersedes"
1377
- ]
1378
- }
1379
- ],
1380
- topicRoots: [
1381
- {
1382
- slug: "migrations",
1383
- name: "Migrations",
1384
- description: "Schema, API, and runtime migrations with blast-radius, rollback, and parity memory",
1385
- ontologyId: "software-entities"
1386
- },
1387
- {
1388
- slug: "reviews",
1389
- name: "Reviews",
1390
- description: "Pull-request and change-review workflows grounded in prior rationale and regressions",
1391
- ontologyId: "software-entities"
1392
- },
1393
- {
1394
- slug: "incidents",
1395
- name: "Incidents",
1396
- description: "Incident response driven by competing hypotheses, contradictions, and mitigations",
1397
- ontologyId: "software-entities"
1398
- },
1399
- {
1400
- slug: "architecture",
1401
- name: "Architecture",
1402
- description: "Architecture decisions, interface trade-offs, and precedent-aware rationale recall",
1403
- ontologyId: "software-entities"
1404
- },
1405
- {
1406
- slug: "decision-memory",
1407
- name: "Decision Memory",
1408
- description: "Cross-cutting rationale recall, failed attempts, and analog reuse across engineering work",
1409
- ontologyId: "software-entities"
1410
- }
1411
- ],
1412
- workflows: [
1413
- {
1414
- workflowId: "migration-readiness",
1415
- name: "Migration Readiness",
1416
- description: "Recall similar migrations, map blast radius, and define rollback before rollout",
1417
- steps: [
1418
- {
1419
- stepId: "recall-history",
1420
- name: "Recall History",
1421
- description: "Compile analogous migrations, prior rationale, failed attempts, and compatibility constraints",
1422
- requiredRoles: ["context-compiler", "migration-owner"],
1423
- produces: ["memory-brief"],
1424
- gateId: "memory-grounded"
1425
- },
1426
- {
1427
- stepId: "plan-rollout",
1428
- name: "Plan Rollout",
1429
- description: "Define blast radius, sequencing, rollback, and verification checkpoints",
1430
- requiredRoles: ["migration-owner", "critic"],
1431
- produces: ["migration-plan"],
1432
- gateId: "rollback-ready"
1433
- },
1434
- {
1435
- stepId: "verify-rollout",
1436
- name: "Verify Rollout",
1437
- description: "Confirm canary, rollback, and parity checks are explicit before execution",
1438
- requiredRoles: ["reviewer"],
1439
- produces: ["verification-checklist"],
1440
- gateId: "verification-covered"
1441
- }
1442
- ],
1443
- requiredArtifacts: [
1444
- "memory-brief",
1445
- "migration-plan",
1446
- "verification-checklist"
1447
- ],
1448
- gateCheckpoints: [
1449
- "memory-grounded",
1450
- "rollback-ready",
1451
- "verification-covered"
1452
- ]
1453
- },
1454
- {
1455
- workflowId: "pull-request-review",
1456
- name: "Pull Request Review",
1457
- description: "Use prior rationale, regressions, and verification history to review risky changes faster",
1458
- steps: [
1459
- {
1460
- stepId: "recall-review-context",
1461
- name: "Recall Review Context",
1462
- description: "Load earlier decisions, similar diffs, failed attempts, and relevant incidents",
1463
- requiredRoles: ["context-compiler", "reviewer"],
1464
- produces: ["review-context"],
1465
- gateId: "memory-grounded"
1466
- },
1467
- {
1468
- stepId: "inspect-diff",
1469
- name: "Inspect Diff",
1470
- description: "Surface risk areas, stale assumptions, and regressions that should block approval",
1471
- requiredRoles: ["reviewer", "critic"],
1472
- produces: ["review-findings"],
1473
- gateId: "review-risks-surfaced"
1474
- },
1475
- {
1476
- stepId: "verify-changes",
1477
- name: "Verify Changes",
1478
- description: "Tie approval to explicit typecheck, test, and integration evidence",
1479
- requiredRoles: ["reviewer"],
1480
- produces: ["verification-checklist"],
1481
- gateId: "verification-covered"
1482
- }
1483
- ],
1484
- requiredArtifacts: [
1485
- "review-context",
1486
- "review-findings",
1487
- "verification-checklist"
1488
- ],
1489
- gateCheckpoints: [
1490
- "memory-grounded",
1491
- "review-risks-surfaced",
1492
- "verification-covered"
1493
- ]
1494
- },
1495
- {
1496
- workflowId: "incident-response",
1497
- name: "Incident Response",
1498
- description: "Treat incidents as contradiction-heavy reasoning tasks before committing to a root cause",
1499
- steps: [
1500
- {
1501
- stepId: "collect-signal",
1502
- name: "Collect Signal",
1503
- description: "Assemble symptoms, recent changes, precedent incidents, and active hypotheses",
1504
- requiredRoles: ["context-compiler", "incident-commander"],
1505
- produces: ["incident-brief"],
1506
- gateId: "memory-grounded"
1507
- },
1508
- {
1509
- stepId: "surface-contradictions",
1510
- name: "Surface Contradictions",
1511
- description: "Make competing explanations explicit before mitigation narrows the search space",
1512
- requiredRoles: ["incident-commander", "critic"],
1513
- produces: ["contradiction-report"],
1514
- gateId: "contradictions-surfaced"
1515
- },
1516
- {
1517
- stepId: "plan-mitigation",
1518
- name: "Plan Mitigation",
1519
- description: "Choose mitigations with owners, reversibility, and verification paths",
1520
- requiredRoles: ["incident-commander", "reviewer"],
1521
- produces: ["mitigation-plan"],
1522
- gateId: "verification-covered"
1523
- }
1524
- ],
1525
- requiredArtifacts: [
1526
- "incident-brief",
1527
- "contradiction-report",
1528
- "mitigation-plan"
1529
- ],
1530
- gateCheckpoints: [
1531
- "memory-grounded",
1532
- "contradictions-surfaced",
1533
- "verification-covered"
1534
- ]
1535
- },
1536
- {
1537
- workflowId: "architecture-decision",
1538
- name: "Architecture Decision",
1539
- description: "Ground architecture choices in cited precedent, explicit alternatives, and follow-up risk",
1540
- steps: [
1541
- {
1542
- stepId: "recall-precedent",
1543
- name: "Recall Precedent",
1544
- description: "Gather analogous decisions, trade-offs, reversals, and evidence already in the graph",
1545
- requiredRoles: ["context-compiler", "architect"],
1546
- produces: ["decision-brief"],
1547
- gateId: "memory-grounded"
1548
- },
1549
- {
1550
- stepId: "compare-options",
1551
- name: "Compare Options",
1552
- description: "Contrast viable paths, show what changes, and surface objections early",
1553
- requiredRoles: ["architect", "critic"],
1554
- produces: ["decision-brief"],
1555
- gateId: "decision-rationale-citable"
1556
- },
1557
- {
1558
- stepId: "record-decision",
1559
- name: "Record Decision",
1560
- description: "Capture the chosen path, cited rationale, and follow-up risks for later recall",
1561
- requiredRoles: ["architect"],
1562
- produces: ["decision-record"]
1563
- }
1564
- ],
1565
- requiredArtifacts: ["decision-brief", "decision-record"],
1566
- gateCheckpoints: ["memory-grounded", "decision-rationale-citable"]
1567
- }
1568
- ],
1569
- gates: [
1570
- {
1571
- gateId: "memory-grounded",
1572
- name: "Memory Grounded",
1573
- description: "The workflow is anchored in prior rationale, analogs, and failure memory before action",
1574
- criteria: [
1575
- {
1576
- criterionId: "precedent-cited",
1577
- description: "At least one prior change, incident, or decision is cited",
1578
- metric: "precedent_citations",
1579
- threshold: 1,
1580
- operator: "gte"
1581
- },
1582
- {
1583
- criterionId: "failure-log-checked",
1584
- description: "Relevant failed attempts or incident history were checked",
1585
- metric: "failure_log_checked",
1586
- threshold: 1,
1587
- operator: "eq"
1588
- }
1589
- ],
1590
- severity: "blocking"
1591
- },
1592
- {
1593
- gateId: "rollback-ready",
1594
- name: "Rollback Ready",
1595
- description: "Risky migrations cannot proceed without explicit rollback and blast-radius coverage",
1596
- criteria: [
1597
- {
1598
- criterionId: "blast-radius-scoped",
1599
- description: "Blast radius is enumerated for the proposed change",
1600
- metric: "blast_radius_scoped",
1601
- threshold: 1,
1602
- operator: "eq"
1603
- },
1604
- {
1605
- criterionId: "rollback-path-defined",
1606
- description: "Rollback path is explicit and reversible",
1607
- metric: "rollback_path_defined",
1608
- threshold: 1,
1609
- operator: "eq"
1610
- }
1611
- ],
1612
- severity: "blocking"
1613
- },
1614
- {
1615
- gateId: "review-risks-surfaced",
1616
- name: "Review Risks Surfaced",
1617
- description: "Review must explain what could regress and why approval is still justified",
1618
- criteria: [
1619
- {
1620
- criterionId: "risk-areas-documented",
1621
- description: "Risk areas and likely regressions are called out explicitly",
1622
- metric: "risk_areas_documented",
1623
- threshold: 1,
1624
- operator: "gte"
1625
- },
1626
- {
1627
- criterionId: "prior-regressions-checked",
1628
- description: "Reviewer checked analogous regressions or incidents",
1629
- metric: "prior_regressions_checked",
1630
- threshold: 1,
1631
- operator: "eq"
1632
- }
1633
- ],
1634
- severity: "blocking"
1635
- },
1636
- {
1637
- gateId: "contradictions-surfaced",
1638
- name: "Contradictions Surfaced",
1639
- description: "Incidents should preserve competing hypotheses long enough to avoid false certainty",
1640
- criteria: [
1641
- {
1642
- criterionId: "multiple-hypotheses",
1643
- description: "At least two plausible hypotheses remain visible",
1644
- metric: "competing_hypotheses_count",
1645
- threshold: 2,
1646
- operator: "gte"
1647
- },
1648
- {
1649
- criterionId: "contradictions-reviewed",
1650
- description: "Relevant contradictions or tensions were reviewed",
1651
- metric: "contradictions_reviewed",
1652
- threshold: 1,
1653
- operator: "gte"
1654
- }
1655
- ],
1656
- severity: "blocking"
1657
- },
1658
- {
1659
- gateId: "decision-rationale-citable",
1660
- name: "Decision Rationale Citable",
1661
- description: "Architecture choices should cite prior rationale and compare viable alternatives",
1662
- criteria: [
1663
- {
1664
- criterionId: "options-compared",
1665
- description: "At least two options are compared before choosing one",
1666
- metric: "options_compared",
1667
- threshold: 2,
1668
- operator: "gte"
1669
- },
1670
- {
1671
- criterionId: "prior-decisions-cited",
1672
- description: "Decision cites prior beliefs, ADRs, or incidents",
1673
- metric: "prior_decisions_cited",
1674
- threshold: 1,
1675
- operator: "gte"
1676
- }
1677
- ],
1678
- severity: "blocking"
1679
- },
1680
- {
1681
- gateId: "verification-covered",
1682
- name: "Verification Covered",
1683
- description: "Approval, rollout, and mitigation all require named verification paths",
1684
- criteria: [
1685
- {
1686
- criterionId: "checks-defined",
1687
- description: "At least one explicit verification path is named",
1688
- metric: "verification_paths_defined",
1689
- threshold: 1,
1690
- operator: "gte"
1691
- },
1692
- {
1693
- criterionId: "owners-named",
1694
- description: "Owners or on-call responsibility are explicit",
1695
- metric: "owner_count",
1696
- threshold: 1,
1697
- operator: "gte"
1698
- }
1699
- ],
1700
- severity: "blocking"
1701
- }
1702
- ],
1703
- artifacts: [
1704
- {
1705
- artifactId: "memory-brief",
1706
- name: "Memory Brief",
1707
- description: "A reusable brief of analogous changes, prior rationale, failed attempts, and contradictions",
1708
- stage: "recall-history",
1709
- contentSchema: {
1710
- type: "object",
1711
- properties: {
1712
- analogousChanges: { type: "array", items: { type: "string" } },
1713
- priorDecisions: { type: "array", items: { type: "string" } },
1714
- failedAttempts: { type: "array", items: { type: "string" } },
1715
- contradictions: { type: "array", items: { type: "string" } }
1716
- },
1717
- required: ["analogousChanges", "priorDecisions"]
1718
- },
1719
- requiredFields: ["analogousChanges", "priorDecisions"]
1720
- },
1721
- {
1722
- artifactId: "migration-plan",
1723
- name: "Migration Plan",
1724
- description: "Blast radius, rollback path, rollout checkpoints, and verification plan",
1725
- stage: "plan-rollout",
1726
- contentSchema: {
1727
- type: "object",
1728
- properties: {
1729
- blastRadius: { type: "array", items: { type: "string" } },
1730
- rollbackPlan: { type: "string" },
1731
- verificationPath: { type: "array", items: { type: "string" } },
1732
- canarySteps: { type: "array", items: { type: "string" } }
1733
- },
1734
- required: ["blastRadius", "rollbackPlan", "verificationPath"]
1735
- },
1736
- requiredFields: ["blastRadius", "rollbackPlan", "verificationPath"]
1737
- },
1738
- {
1739
- artifactId: "verification-checklist",
1740
- name: "Verification Checklist",
1741
- description: "Named checks, owners, and pass/fail criteria for rollout or approval",
1742
- stage: "verify-rollout",
1743
- contentSchema: {
1744
- type: "object",
1745
- properties: {
1746
- checks: { type: "array", items: { type: "string" } },
1747
- owners: { type: "array", items: { type: "string" } },
1748
- passCriteria: { type: "array", items: { type: "string" } }
1749
- },
1750
- required: ["checks", "owners"]
1751
- },
1752
- requiredFields: ["checks", "owners"]
1753
- },
1754
- {
1755
- artifactId: "review-context",
1756
- name: "Review Context",
1757
- description: "Prior rationale, related diffs, incidents, and failure history relevant to a review",
1758
- stage: "recall-review-context",
1759
- contentSchema: {
1760
- type: "object",
1761
- properties: {
1762
- rationaleLinks: { type: "array", items: { type: "string" } },
1763
- analogousDiffs: { type: "array", items: { type: "string" } },
1764
- relatedIncidents: { type: "array", items: { type: "string" } }
1765
- },
1766
- required: ["rationaleLinks"]
1767
- },
1768
- requiredFields: ["rationaleLinks"]
1769
- },
1770
- {
1771
- artifactId: "review-findings",
1772
- name: "Review Findings",
1773
- description: "What could regress, what evidence was checked, and whether the change should be blocked",
1774
- stage: "inspect-diff",
1775
- contentSchema: {
1776
- type: "object",
1777
- properties: {
1778
- findings: { type: "array", items: { type: "string" } },
1779
- regressionsChecked: { type: "array", items: { type: "string" } },
1780
- blockReason: { type: "string" }
1781
- },
1782
- required: ["findings", "regressionsChecked"]
1783
- },
1784
- requiredFields: ["findings", "regressionsChecked"]
1785
- },
1786
- {
1787
- artifactId: "incident-brief",
1788
- name: "Incident Brief",
1789
- description: "Signals, recent changes, competing hypotheses, and precedent incidents",
1790
- stage: "collect-signal",
1791
- contentSchema: {
1792
- type: "object",
1793
- properties: {
1794
- symptoms: { type: "array", items: { type: "string" } },
1795
- recentChanges: { type: "array", items: { type: "string" } },
1796
- competingHypotheses: { type: "array", items: { type: "string" } },
1797
- precedentIncidents: { type: "array", items: { type: "string" } }
1798
- },
1799
- required: ["symptoms", "competingHypotheses"]
1800
- },
1801
- requiredFields: ["symptoms", "competingHypotheses"]
1802
- },
1803
- {
1804
- artifactId: "contradiction-report",
1805
- name: "Contradiction Report",
1806
- description: "Active contradictions, why they matter, and what evidence could collapse them",
1807
- stage: "surface-contradictions",
1808
- contentSchema: {
1809
- type: "object",
1810
- properties: {
1811
- contradictions: { type: "array", items: { type: "string" } },
1812
- likelyRootCauses: { type: "array", items: { type: "string" } },
1813
- missingEvidence: { type: "array", items: { type: "string" } }
1814
- },
1815
- required: ["contradictions", "likelyRootCauses"]
1816
- },
1817
- requiredFields: ["contradictions", "likelyRootCauses"]
1818
- },
1819
- {
1820
- artifactId: "mitigation-plan",
1821
- name: "Mitigation Plan",
1822
- description: "Chosen mitigation, rollback path, and verification ownership for an incident",
1823
- stage: "plan-mitigation",
1824
- contentSchema: {
1825
- type: "object",
1826
- properties: {
1827
- mitigationSteps: { type: "array", items: { type: "string" } },
1828
- rollbackPlan: { type: "string" },
1829
- owners: { type: "array", items: { type: "string" } }
1830
- },
1831
- required: ["mitigationSteps", "owners"]
1832
- },
1833
- requiredFields: ["mitigationSteps", "owners"]
1834
- },
1835
- {
1836
- artifactId: "decision-brief",
1837
- name: "Decision Brief",
1838
- description: "Options, cited precedent, trade-offs, and objections for an architecture decision",
1839
- stage: "compare-options",
1840
- contentSchema: {
1841
- type: "object",
1842
- properties: {
1843
- options: { type: "array", items: { type: "string" } },
1844
- citedPrecedent: { type: "array", items: { type: "string" } },
1845
- objections: { type: "array", items: { type: "string" } }
1846
- },
1847
- required: ["options", "citedPrecedent"]
1848
- },
1849
- requiredFields: ["options", "citedPrecedent"]
1850
- },
1851
- {
1852
- artifactId: "decision-record",
1853
- name: "Decision Record",
1854
- description: "Chosen path, why it won, what it supersedes, and what follow-up remains open",
1855
- stage: "record-decision",
1856
- contentSchema: {
1857
- type: "object",
1858
- properties: {
1859
- decision: { type: "string" },
1860
- rationale: { type: "array", items: { type: "string" } },
1861
- supersedes: { type: "array", items: { type: "string" } },
1862
- followUps: { type: "array", items: { type: "string" } }
1863
- },
1864
- required: ["decision", "rationale"]
1865
- },
1866
- requiredFields: ["decision", "rationale"]
1867
- }
1868
- ],
1869
- roles: [
1870
- {
1871
- roleId: "context-compiler",
1872
- name: "Context Compiler",
1873
- description: "Compiles prior rationale, analogs, and failure memory into reusable first-hour context",
1874
- perspective: "History-first, evidence-weighted context assembly",
1875
- optimizesFor: "recall quality and anti-repetition coverage",
1876
- mayBlock: false
1877
- },
1878
- {
1879
- roleId: "migration-owner",
1880
- name: "Migration Owner",
1881
- description: "Scopes rollout blast radius, rollback, sequencing, and compatibility risk",
1882
- perspective: "Operational caution with explicit rollback discipline",
1883
- optimizesFor: "safe rollout planning",
1884
- mayBlock: false
1885
- },
1886
- {
1887
- roleId: "reviewer",
1888
- name: "Reviewer",
1889
- description: "Evaluates risky changes against prior regressions, evidence, and missing checks",
1890
- perspective: "Evidence-backed change approval with regression awareness",
1891
- optimizesFor: "defect prevention and clear approval rationale",
1892
- mayBlock: true
1893
- },
1894
- {
1895
- roleId: "incident-commander",
1896
- name: "Incident Commander",
1897
- description: "Maintains multiple plausible explanations while driving mitigation decisions",
1898
- perspective: "Fast, reversible action without collapsing uncertainty too early",
1899
- optimizesFor: "time-to-mitigation with preserved reasoning integrity",
1900
- mayBlock: false
1901
- },
1902
- {
1903
- roleId: "architect",
1904
- name: "Architect",
1905
- description: "Turns competing options into explicit decisions with cited precedent and follow-up risk",
1906
- perspective: "Trade-off clarity and long-term maintainability",
1907
- optimizesFor: "decision quality and rationale reuse",
1908
- mayBlock: false
1909
- },
1910
- {
1911
- roleId: "critic",
1912
- name: "Critic",
1913
- description: "Finds weak assumptions, missing rollback paths, and untested contradictions",
1914
- perspective: "Skeptical, adversarial, and detail-oriented",
1915
- optimizesFor: "early detection of brittle plans",
1916
- mayBlock: true
1917
- }
1918
- ],
1347
+ // src/domain-pack/packs/engineering-accelerator-tail.ts
1348
+ var ENGINEERING_ACCELERATOR_TAIL = {
1919
1349
  inquiryShaping: {
1920
1350
  questionTemplates: [
1921
1351
  {
@@ -2402,229 +1832,804 @@ var ENGINEERING_ACCELERATOR_PACK = defineDomainPack({
2402
1832
  parentSlug: "migrations",
2403
1833
  ontologyId: "software-entities"
2404
1834
  },
2405
- {
2406
- slug: "review-briefs",
2407
- name: "Review Briefs",
2408
- description: "Diff-scoped risk briefs grounded in prior regressions and rationale",
2409
- parentSlug: "reviews",
2410
- ontologyId: "software-entities"
1835
+ {
1836
+ slug: "review-briefs",
1837
+ name: "Review Briefs",
1838
+ description: "Diff-scoped risk briefs grounded in prior regressions and rationale",
1839
+ parentSlug: "reviews",
1840
+ ontologyId: "software-entities"
1841
+ },
1842
+ {
1843
+ slug: "regression-history",
1844
+ name: "Regression History",
1845
+ description: "Past regressions and approval misses that should influence current reviews",
1846
+ parentSlug: "reviews",
1847
+ ontologyId: "software-entities"
1848
+ },
1849
+ {
1850
+ slug: "active-incidents",
1851
+ name: "Active Incidents",
1852
+ description: "Current incidents with competing hypotheses, mitigations, and contradictions",
1853
+ parentSlug: "incidents",
1854
+ ontologyId: "software-entities"
1855
+ },
1856
+ {
1857
+ slug: "incident-postmortems",
1858
+ name: "Incident Postmortems",
1859
+ description: "Resolved incidents with preserved rationale and follow-up learnings",
1860
+ parentSlug: "incidents",
1861
+ ontologyId: "software-entities"
1862
+ },
1863
+ {
1864
+ slug: "adrs",
1865
+ name: "Architecture Decision Records",
1866
+ description: "Citable architecture records with precedent, objections, and supersessions",
1867
+ parentSlug: "architecture",
1868
+ ontologyId: "software-entities"
1869
+ },
1870
+ {
1871
+ slug: "interface-contracts",
1872
+ name: "Interface Contracts",
1873
+ description: "APIs, boundaries, and contract deltas that architecture work depends on",
1874
+ parentSlug: "architecture",
1875
+ ontologyId: "software-entities"
1876
+ },
1877
+ {
1878
+ slug: "failed-attempts",
1879
+ name: "Failed Attempts",
1880
+ description: "Anti-repetition log for engineering decisions and implementation dead ends",
1881
+ parentSlug: "decision-memory",
1882
+ ontologyId: "software-entities"
1883
+ },
1884
+ {
1885
+ slug: "rationale-recall",
1886
+ name: "Rationale Recall",
1887
+ description: "Recalled rationale snippets and analogs worth citing before new work",
1888
+ parentSlug: "decision-memory",
1889
+ ontologyId: "software-entities"
1890
+ }
1891
+ ],
1892
+ installProfiles: [
1893
+ {
1894
+ profileId: "claude-code",
1895
+ name: "Claude Code Engineering Kit",
1896
+ description: "Installs Claude-native hooks, commands, agent catalog, and first-hour engineering prompts on top of Lucern.",
1897
+ runtimeTarget: "claude-code",
1898
+ promptIds: [
1899
+ "claude-quick-reference",
1900
+ "build-command",
1901
+ "architect-command",
1902
+ "pipeline-command",
1903
+ "pr-command",
1904
+ "lucern-generate-questions",
1905
+ "lucern-contradiction-analysis"
1906
+ ],
1907
+ toolIds: [
1908
+ "start-investigation",
1909
+ "record-scope-learning",
1910
+ "record-attempt",
1911
+ "pipeline-snapshot",
1912
+ "session-init",
1913
+ "tool-log",
1914
+ "build-bash-gate",
1915
+ "lucern-cli-init",
1916
+ "kit-install"
1917
+ ],
1918
+ assetIds: [
1919
+ "claude-instructions",
1920
+ "mcp-config",
1921
+ "kit-manifest",
1922
+ "lucern-launcher",
1923
+ "lucern-shell-wrapper",
1924
+ "lucern-cli-script",
1925
+ "claude-settings",
1926
+ "permission-gate-hook",
1927
+ "inbox-check-hook",
1928
+ "prompt-router-hook",
1929
+ "writeback-gate-hook",
1930
+ "build-command-doc",
1931
+ "architect-command-doc",
1932
+ "pipeline-command-doc",
1933
+ "pr-command-doc",
1934
+ "claude-agent-catalog",
1935
+ "claude-skill-catalog",
1936
+ "hooks-doc",
1937
+ "setup-ui"
1938
+ ],
1939
+ defaultTopicSlugs: [
1940
+ "migrations",
1941
+ "reviews",
1942
+ "incidents",
1943
+ "architecture",
1944
+ "decision-memory"
1945
+ ]
1946
+ },
1947
+ {
1948
+ profileId: "codex",
1949
+ name: "Codex Engineering Kit",
1950
+ description: "Installs the Codex bridge, Lucern MCP wiring, and the same pack-level workflows without Claude-specific hooks.",
1951
+ runtimeTarget: "codex",
1952
+ promptIds: [
1953
+ "build-command",
1954
+ "architect-command",
1955
+ "pipeline-command",
1956
+ "pr-command",
1957
+ "lucern-generate-questions",
1958
+ "lucern-contradiction-analysis"
1959
+ ],
1960
+ toolIds: [
1961
+ "start-investigation",
1962
+ "record-scope-learning",
1963
+ "record-attempt",
1964
+ "pipeline-snapshot",
1965
+ "lucern-cli-init",
1966
+ "kit-install"
1967
+ ],
1968
+ assetIds: [
1969
+ "codex-bridge",
1970
+ "mcp-config",
1971
+ "kit-manifest",
1972
+ "lucern-launcher",
1973
+ "lucern-shell-wrapper",
1974
+ "lucern-cli-script",
1975
+ "build-command-doc",
1976
+ "architect-command-doc",
1977
+ "pipeline-command-doc",
1978
+ "pr-command-doc",
1979
+ "claude-skill-catalog",
1980
+ "skills-sync-script",
1981
+ "hooks-doc",
1982
+ "setup-ui"
1983
+ ],
1984
+ defaultTopicSlugs: [
1985
+ "migrations",
1986
+ "reviews",
1987
+ "incidents",
1988
+ "architecture",
1989
+ "decision-memory"
1990
+ ]
1991
+ },
1992
+ {
1993
+ profileId: "hybrid",
1994
+ name: "Hybrid Engineering Kit",
1995
+ description: "Installs both Claude and Codex entry surfaces against one Lucern-native engineering operating system.",
1996
+ runtimeTarget: "hybrid",
1997
+ promptIds: [
1998
+ "claude-quick-reference",
1999
+ "build-command",
2000
+ "architect-command",
2001
+ "pipeline-command",
2002
+ "pr-command",
2003
+ "lucern-generate-questions",
2004
+ "lucern-contradiction-analysis"
2005
+ ],
2006
+ toolIds: [
2007
+ "start-investigation",
2008
+ "record-scope-learning",
2009
+ "record-attempt",
2010
+ "pipeline-snapshot",
2011
+ "session-init",
2012
+ "tool-log",
2013
+ "build-bash-gate",
2014
+ "lucern-cli-init",
2015
+ "kit-install"
2016
+ ],
2017
+ assetIds: [
2018
+ "claude-instructions",
2019
+ "codex-bridge",
2020
+ "mcp-config",
2021
+ "kit-manifest",
2022
+ "lucern-launcher",
2023
+ "lucern-shell-wrapper",
2024
+ "lucern-cli-script",
2025
+ "claude-settings",
2026
+ "permission-gate-hook",
2027
+ "inbox-check-hook",
2028
+ "prompt-router-hook",
2029
+ "writeback-gate-hook",
2030
+ "build-command-doc",
2031
+ "architect-command-doc",
2032
+ "pipeline-command-doc",
2033
+ "pr-command-doc",
2034
+ "claude-agent-catalog",
2035
+ "claude-skill-catalog",
2036
+ "skills-sync-script",
2037
+ "hooks-doc",
2038
+ "setup-ui"
2039
+ ],
2040
+ defaultTopicSlugs: [
2041
+ "migrations",
2042
+ "reviews",
2043
+ "incidents",
2044
+ "architecture",
2045
+ "decision-memory"
2046
+ ]
2047
+ }
2048
+ ]
2049
+ },
2050
+ appPackKeys: [
2051
+ "chat-v1",
2052
+ "documents-v1",
2053
+ "epistemic-algorithms-v1",
2054
+ "graph-visualization-v1",
2055
+ "task-management-v1"
2056
+ ],
2057
+ methodologyPackId: "developer"
2058
+ };
2059
+
2060
+ // src/domain-pack/packs/engineering-accelerator.ts
2061
+ var ENGINEERING_ACCELERATOR_PACK = defineDomainPack({
2062
+ packId: "engineering-accelerator",
2063
+ name: "Engineering Accelerator",
2064
+ version: "1.0.0",
2065
+ ontologyBindings: [
2066
+ {
2067
+ ontologyId: "software-entities",
2068
+ versionConstraint: "^1.0.0",
2069
+ required: true,
2070
+ provisionMode: "seed",
2071
+ seedRef: "packages/pack-host/src/domain-pack/ontology/software-entities-v1.ts",
2072
+ requiredEntityTypes: [
2073
+ "repository",
2074
+ "service",
2075
+ "module",
2076
+ "workflow",
2077
+ "incident",
2078
+ "migration",
2079
+ "decision_record",
2080
+ "agent"
2081
+ ],
2082
+ requiredEdgeTypes: [
2083
+ "depends_on",
2084
+ "owns",
2085
+ "calls",
2086
+ "blocks",
2087
+ "reviews",
2088
+ "mitigates",
2089
+ "supersedes"
2090
+ ]
2091
+ }
2092
+ ],
2093
+ topicRoots: [
2094
+ {
2095
+ slug: "migrations",
2096
+ name: "Migrations",
2097
+ description: "Schema, API, and runtime migrations with blast-radius, rollback, and parity memory",
2098
+ ontologyId: "software-entities"
2099
+ },
2100
+ {
2101
+ slug: "reviews",
2102
+ name: "Reviews",
2103
+ description: "Pull-request and change-review workflows grounded in prior rationale and regressions",
2104
+ ontologyId: "software-entities"
2105
+ },
2106
+ {
2107
+ slug: "incidents",
2108
+ name: "Incidents",
2109
+ description: "Incident response driven by competing hypotheses, contradictions, and mitigations",
2110
+ ontologyId: "software-entities"
2111
+ },
2112
+ {
2113
+ slug: "architecture",
2114
+ name: "Architecture",
2115
+ description: "Architecture decisions, interface trade-offs, and precedent-aware rationale recall",
2116
+ ontologyId: "software-entities"
2117
+ },
2118
+ {
2119
+ slug: "decision-memory",
2120
+ name: "Decision Memory",
2121
+ description: "Cross-cutting rationale recall, failed attempts, and analog reuse across engineering work",
2122
+ ontologyId: "software-entities"
2123
+ }
2124
+ ],
2125
+ workflows: [
2126
+ {
2127
+ workflowId: "migration-readiness",
2128
+ name: "Migration Readiness",
2129
+ description: "Recall similar migrations, map blast radius, and define rollback before rollout",
2130
+ steps: [
2131
+ {
2132
+ stepId: "recall-history",
2133
+ name: "Recall History",
2134
+ description: "Compile analogous migrations, prior rationale, failed attempts, and compatibility constraints",
2135
+ requiredRoles: ["context-compiler", "migration-owner"],
2136
+ produces: ["memory-brief"],
2137
+ gateId: "memory-grounded"
2138
+ },
2139
+ {
2140
+ stepId: "plan-rollout",
2141
+ name: "Plan Rollout",
2142
+ description: "Define blast radius, sequencing, rollback, and verification checkpoints",
2143
+ requiredRoles: ["migration-owner", "critic"],
2144
+ produces: ["migration-plan"],
2145
+ gateId: "rollback-ready"
2146
+ },
2147
+ {
2148
+ stepId: "verify-rollout",
2149
+ name: "Verify Rollout",
2150
+ description: "Confirm canary, rollback, and parity checks are explicit before execution",
2151
+ requiredRoles: ["reviewer"],
2152
+ produces: ["verification-checklist"],
2153
+ gateId: "verification-covered"
2154
+ }
2155
+ ],
2156
+ requiredArtifacts: [
2157
+ "memory-brief",
2158
+ "migration-plan",
2159
+ "verification-checklist"
2160
+ ],
2161
+ gateCheckpoints: [
2162
+ "memory-grounded",
2163
+ "rollback-ready",
2164
+ "verification-covered"
2165
+ ]
2166
+ },
2167
+ {
2168
+ workflowId: "pull-request-review",
2169
+ name: "Pull Request Review",
2170
+ description: "Use prior rationale, regressions, and verification history to review risky changes faster",
2171
+ steps: [
2172
+ {
2173
+ stepId: "recall-review-context",
2174
+ name: "Recall Review Context",
2175
+ description: "Load earlier decisions, similar diffs, failed attempts, and relevant incidents",
2176
+ requiredRoles: ["context-compiler", "reviewer"],
2177
+ produces: ["review-context"],
2178
+ gateId: "memory-grounded"
2179
+ },
2180
+ {
2181
+ stepId: "inspect-diff",
2182
+ name: "Inspect Diff",
2183
+ description: "Surface risk areas, stale assumptions, and regressions that should block approval",
2184
+ requiredRoles: ["reviewer", "critic"],
2185
+ produces: ["review-findings"],
2186
+ gateId: "review-risks-surfaced"
2187
+ },
2188
+ {
2189
+ stepId: "verify-changes",
2190
+ name: "Verify Changes",
2191
+ description: "Tie approval to explicit typecheck, test, and integration evidence",
2192
+ requiredRoles: ["reviewer"],
2193
+ produces: ["verification-checklist"],
2194
+ gateId: "verification-covered"
2195
+ }
2196
+ ],
2197
+ requiredArtifacts: [
2198
+ "review-context",
2199
+ "review-findings",
2200
+ "verification-checklist"
2201
+ ],
2202
+ gateCheckpoints: [
2203
+ "memory-grounded",
2204
+ "review-risks-surfaced",
2205
+ "verification-covered"
2206
+ ]
2207
+ },
2208
+ {
2209
+ workflowId: "incident-response",
2210
+ name: "Incident Response",
2211
+ description: "Treat incidents as contradiction-heavy reasoning tasks before committing to a root cause",
2212
+ steps: [
2213
+ {
2214
+ stepId: "collect-signal",
2215
+ name: "Collect Signal",
2216
+ description: "Assemble symptoms, recent changes, precedent incidents, and active hypotheses",
2217
+ requiredRoles: ["context-compiler", "incident-commander"],
2218
+ produces: ["incident-brief"],
2219
+ gateId: "memory-grounded"
2220
+ },
2221
+ {
2222
+ stepId: "surface-contradictions",
2223
+ name: "Surface Contradictions",
2224
+ description: "Make competing explanations explicit before mitigation narrows the search space",
2225
+ requiredRoles: ["incident-commander", "critic"],
2226
+ produces: ["contradiction-report"],
2227
+ gateId: "contradictions-surfaced"
2228
+ },
2229
+ {
2230
+ stepId: "plan-mitigation",
2231
+ name: "Plan Mitigation",
2232
+ description: "Choose mitigations with owners, reversibility, and verification paths",
2233
+ requiredRoles: ["incident-commander", "reviewer"],
2234
+ produces: ["mitigation-plan"],
2235
+ gateId: "verification-covered"
2236
+ }
2237
+ ],
2238
+ requiredArtifacts: [
2239
+ "incident-brief",
2240
+ "contradiction-report",
2241
+ "mitigation-plan"
2242
+ ],
2243
+ gateCheckpoints: [
2244
+ "memory-grounded",
2245
+ "contradictions-surfaced",
2246
+ "verification-covered"
2247
+ ]
2248
+ },
2249
+ {
2250
+ workflowId: "architecture-decision",
2251
+ name: "Architecture Decision",
2252
+ description: "Ground architecture choices in cited precedent, explicit alternatives, and follow-up risk",
2253
+ steps: [
2254
+ {
2255
+ stepId: "recall-precedent",
2256
+ name: "Recall Precedent",
2257
+ description: "Gather analogous decisions, trade-offs, reversals, and evidence already in the graph",
2258
+ requiredRoles: ["context-compiler", "architect"],
2259
+ produces: ["decision-brief"],
2260
+ gateId: "memory-grounded"
2261
+ },
2262
+ {
2263
+ stepId: "compare-options",
2264
+ name: "Compare Options",
2265
+ description: "Contrast viable paths, show what changes, and surface objections early",
2266
+ requiredRoles: ["architect", "critic"],
2267
+ produces: ["decision-brief"],
2268
+ gateId: "decision-rationale-citable"
2269
+ },
2270
+ {
2271
+ stepId: "record-decision",
2272
+ name: "Record Decision",
2273
+ description: "Capture the chosen path, cited rationale, and follow-up risks for later recall",
2274
+ requiredRoles: ["architect"],
2275
+ produces: ["decision-record"]
2276
+ }
2277
+ ],
2278
+ requiredArtifacts: ["decision-brief", "decision-record"],
2279
+ gateCheckpoints: ["memory-grounded", "decision-rationale-citable"]
2280
+ }
2281
+ ],
2282
+ gates: [
2283
+ {
2284
+ gateId: "memory-grounded",
2285
+ name: "Memory Grounded",
2286
+ description: "The workflow is anchored in prior rationale, analogs, and failure memory before action",
2287
+ criteria: [
2288
+ {
2289
+ criterionId: "precedent-cited",
2290
+ description: "At least one prior change, incident, or decision is cited",
2291
+ metric: "precedent_citations",
2292
+ threshold: 1,
2293
+ operator: "gte"
2294
+ },
2295
+ {
2296
+ criterionId: "failure-log-checked",
2297
+ description: "Relevant failed attempts or incident history were checked",
2298
+ metric: "failure_log_checked",
2299
+ threshold: 1,
2300
+ operator: "eq"
2301
+ }
2302
+ ],
2303
+ severity: "blocking"
2304
+ },
2305
+ {
2306
+ gateId: "rollback-ready",
2307
+ name: "Rollback Ready",
2308
+ description: "Risky migrations cannot proceed without explicit rollback and blast-radius coverage",
2309
+ criteria: [
2310
+ {
2311
+ criterionId: "blast-radius-scoped",
2312
+ description: "Blast radius is enumerated for the proposed change",
2313
+ metric: "blast_radius_scoped",
2314
+ threshold: 1,
2315
+ operator: "eq"
2316
+ },
2317
+ {
2318
+ criterionId: "rollback-path-defined",
2319
+ description: "Rollback path is explicit and reversible",
2320
+ metric: "rollback_path_defined",
2321
+ threshold: 1,
2322
+ operator: "eq"
2323
+ }
2324
+ ],
2325
+ severity: "blocking"
2326
+ },
2327
+ {
2328
+ gateId: "review-risks-surfaced",
2329
+ name: "Review Risks Surfaced",
2330
+ description: "Review must explain what could regress and why approval is still justified",
2331
+ criteria: [
2332
+ {
2333
+ criterionId: "risk-areas-documented",
2334
+ description: "Risk areas and likely regressions are called out explicitly",
2335
+ metric: "risk_areas_documented",
2336
+ threshold: 1,
2337
+ operator: "gte"
2338
+ },
2339
+ {
2340
+ criterionId: "prior-regressions-checked",
2341
+ description: "Reviewer checked analogous regressions or incidents",
2342
+ metric: "prior_regressions_checked",
2343
+ threshold: 1,
2344
+ operator: "eq"
2345
+ }
2346
+ ],
2347
+ severity: "blocking"
2348
+ },
2349
+ {
2350
+ gateId: "contradictions-surfaced",
2351
+ name: "Contradictions Surfaced",
2352
+ description: "Incidents should preserve competing hypotheses long enough to avoid false certainty",
2353
+ criteria: [
2354
+ {
2355
+ criterionId: "multiple-hypotheses",
2356
+ description: "At least two plausible hypotheses remain visible",
2357
+ metric: "competing_hypotheses_count",
2358
+ threshold: 2,
2359
+ operator: "gte"
2360
+ },
2361
+ {
2362
+ criterionId: "contradictions-reviewed",
2363
+ description: "Relevant contradictions or tensions were reviewed",
2364
+ metric: "contradictions_reviewed",
2365
+ threshold: 1,
2366
+ operator: "gte"
2367
+ }
2368
+ ],
2369
+ severity: "blocking"
2370
+ },
2371
+ {
2372
+ gateId: "decision-rationale-citable",
2373
+ name: "Decision Rationale Citable",
2374
+ description: "Architecture choices should cite prior rationale and compare viable alternatives",
2375
+ criteria: [
2376
+ {
2377
+ criterionId: "options-compared",
2378
+ description: "At least two options are compared before choosing one",
2379
+ metric: "options_compared",
2380
+ threshold: 2,
2381
+ operator: "gte"
2382
+ },
2383
+ {
2384
+ criterionId: "prior-decisions-cited",
2385
+ description: "Decision cites prior beliefs, ADRs, or incidents",
2386
+ metric: "prior_decisions_cited",
2387
+ threshold: 1,
2388
+ operator: "gte"
2389
+ }
2390
+ ],
2391
+ severity: "blocking"
2392
+ },
2393
+ {
2394
+ gateId: "verification-covered",
2395
+ name: "Verification Covered",
2396
+ description: "Approval, rollout, and mitigation all require named verification paths",
2397
+ criteria: [
2398
+ {
2399
+ criterionId: "checks-defined",
2400
+ description: "At least one explicit verification path is named",
2401
+ metric: "verification_paths_defined",
2402
+ threshold: 1,
2403
+ operator: "gte"
2404
+ },
2405
+ {
2406
+ criterionId: "owners-named",
2407
+ description: "Owners or on-call responsibility are explicit",
2408
+ metric: "owner_count",
2409
+ threshold: 1,
2410
+ operator: "gte"
2411
+ }
2412
+ ],
2413
+ severity: "blocking"
2414
+ }
2415
+ ],
2416
+ artifacts: [
2417
+ {
2418
+ artifactId: "memory-brief",
2419
+ name: "Memory Brief",
2420
+ description: "A reusable brief of analogous changes, prior rationale, failed attempts, and contradictions",
2421
+ stage: "recall-history",
2422
+ contentSchema: {
2423
+ type: "object",
2424
+ properties: {
2425
+ analogousChanges: { type: "array", items: { type: "string" } },
2426
+ priorDecisions: { type: "array", items: { type: "string" } },
2427
+ failedAttempts: { type: "array", items: { type: "string" } },
2428
+ contradictions: { type: "array", items: { type: "string" } }
2429
+ },
2430
+ required: ["analogousChanges", "priorDecisions"]
2431
+ },
2432
+ requiredFields: ["analogousChanges", "priorDecisions"]
2433
+ },
2434
+ {
2435
+ artifactId: "migration-plan",
2436
+ name: "Migration Plan",
2437
+ description: "Blast radius, rollback path, rollout checkpoints, and verification plan",
2438
+ stage: "plan-rollout",
2439
+ contentSchema: {
2440
+ type: "object",
2441
+ properties: {
2442
+ blastRadius: { type: "array", items: { type: "string" } },
2443
+ rollbackPlan: { type: "string" },
2444
+ verificationPath: { type: "array", items: { type: "string" } },
2445
+ canarySteps: { type: "array", items: { type: "string" } }
2446
+ },
2447
+ required: ["blastRadius", "rollbackPlan", "verificationPath"]
2411
2448
  },
2412
- {
2413
- slug: "regression-history",
2414
- name: "Regression History",
2415
- description: "Past regressions and approval misses that should influence current reviews",
2416
- parentSlug: "reviews",
2417
- ontologyId: "software-entities"
2449
+ requiredFields: ["blastRadius", "rollbackPlan", "verificationPath"]
2450
+ },
2451
+ {
2452
+ artifactId: "verification-checklist",
2453
+ name: "Verification Checklist",
2454
+ description: "Named checks, owners, and pass/fail criteria for rollout or approval",
2455
+ stage: "verify-rollout",
2456
+ contentSchema: {
2457
+ type: "object",
2458
+ properties: {
2459
+ checks: { type: "array", items: { type: "string" } },
2460
+ owners: { type: "array", items: { type: "string" } },
2461
+ passCriteria: { type: "array", items: { type: "string" } }
2462
+ },
2463
+ required: ["checks", "owners"]
2418
2464
  },
2419
- {
2420
- slug: "active-incidents",
2421
- name: "Active Incidents",
2422
- description: "Current incidents with competing hypotheses, mitigations, and contradictions",
2423
- parentSlug: "incidents",
2424
- ontologyId: "software-entities"
2465
+ requiredFields: ["checks", "owners"]
2466
+ },
2467
+ {
2468
+ artifactId: "review-context",
2469
+ name: "Review Context",
2470
+ description: "Prior rationale, related diffs, incidents, and failure history relevant to a review",
2471
+ stage: "recall-review-context",
2472
+ contentSchema: {
2473
+ type: "object",
2474
+ properties: {
2475
+ rationaleLinks: { type: "array", items: { type: "string" } },
2476
+ analogousDiffs: { type: "array", items: { type: "string" } },
2477
+ relatedIncidents: { type: "array", items: { type: "string" } }
2478
+ },
2479
+ required: ["rationaleLinks"]
2425
2480
  },
2426
- {
2427
- slug: "incident-postmortems",
2428
- name: "Incident Postmortems",
2429
- description: "Resolved incidents with preserved rationale and follow-up learnings",
2430
- parentSlug: "incidents",
2431
- ontologyId: "software-entities"
2481
+ requiredFields: ["rationaleLinks"]
2482
+ },
2483
+ {
2484
+ artifactId: "review-findings",
2485
+ name: "Review Findings",
2486
+ description: "What could regress, what evidence was checked, and whether the change should be blocked",
2487
+ stage: "inspect-diff",
2488
+ contentSchema: {
2489
+ type: "object",
2490
+ properties: {
2491
+ findings: { type: "array", items: { type: "string" } },
2492
+ regressionsChecked: { type: "array", items: { type: "string" } },
2493
+ blockReason: { type: "string" }
2494
+ },
2495
+ required: ["findings", "regressionsChecked"]
2432
2496
  },
2433
- {
2434
- slug: "adrs",
2435
- name: "Architecture Decision Records",
2436
- description: "Citable architecture records with precedent, objections, and supersessions",
2437
- parentSlug: "architecture",
2438
- ontologyId: "software-entities"
2497
+ requiredFields: ["findings", "regressionsChecked"]
2498
+ },
2499
+ {
2500
+ artifactId: "incident-brief",
2501
+ name: "Incident Brief",
2502
+ description: "Signals, recent changes, competing hypotheses, and precedent incidents",
2503
+ stage: "collect-signal",
2504
+ contentSchema: {
2505
+ type: "object",
2506
+ properties: {
2507
+ symptoms: { type: "array", items: { type: "string" } },
2508
+ recentChanges: { type: "array", items: { type: "string" } },
2509
+ competingHypotheses: { type: "array", items: { type: "string" } },
2510
+ precedentIncidents: { type: "array", items: { type: "string" } }
2511
+ },
2512
+ required: ["symptoms", "competingHypotheses"]
2439
2513
  },
2440
- {
2441
- slug: "interface-contracts",
2442
- name: "Interface Contracts",
2443
- description: "APIs, boundaries, and contract deltas that architecture work depends on",
2444
- parentSlug: "architecture",
2445
- ontologyId: "software-entities"
2514
+ requiredFields: ["symptoms", "competingHypotheses"]
2515
+ },
2516
+ {
2517
+ artifactId: "contradiction-report",
2518
+ name: "Contradiction Report",
2519
+ description: "Active contradictions, why they matter, and what evidence could collapse them",
2520
+ stage: "surface-contradictions",
2521
+ contentSchema: {
2522
+ type: "object",
2523
+ properties: {
2524
+ contradictions: { type: "array", items: { type: "string" } },
2525
+ likelyRootCauses: { type: "array", items: { type: "string" } },
2526
+ missingEvidence: { type: "array", items: { type: "string" } }
2527
+ },
2528
+ required: ["contradictions", "likelyRootCauses"]
2446
2529
  },
2447
- {
2448
- slug: "failed-attempts",
2449
- name: "Failed Attempts",
2450
- description: "Anti-repetition log for engineering decisions and implementation dead ends",
2451
- parentSlug: "decision-memory",
2452
- ontologyId: "software-entities"
2530
+ requiredFields: ["contradictions", "likelyRootCauses"]
2531
+ },
2532
+ {
2533
+ artifactId: "mitigation-plan",
2534
+ name: "Mitigation Plan",
2535
+ description: "Chosen mitigation, rollback path, and verification ownership for an incident",
2536
+ stage: "plan-mitigation",
2537
+ contentSchema: {
2538
+ type: "object",
2539
+ properties: {
2540
+ mitigationSteps: { type: "array", items: { type: "string" } },
2541
+ rollbackPlan: { type: "string" },
2542
+ owners: { type: "array", items: { type: "string" } }
2543
+ },
2544
+ required: ["mitigationSteps", "owners"]
2453
2545
  },
2454
- {
2455
- slug: "rationale-recall",
2456
- name: "Rationale Recall",
2457
- description: "Recalled rationale snippets and analogs worth citing before new work",
2458
- parentSlug: "decision-memory",
2459
- ontologyId: "software-entities"
2460
- }
2461
- ],
2462
- installProfiles: [
2463
- {
2464
- profileId: "claude-code",
2465
- name: "Claude Code Engineering Kit",
2466
- description: "Installs Claude-native hooks, commands, agent catalog, and first-hour engineering prompts on top of Lucern.",
2467
- runtimeTarget: "claude-code",
2468
- promptIds: [
2469
- "claude-quick-reference",
2470
- "build-command",
2471
- "architect-command",
2472
- "pipeline-command",
2473
- "pr-command",
2474
- "lucern-generate-questions",
2475
- "lucern-contradiction-analysis"
2476
- ],
2477
- toolIds: [
2478
- "start-investigation",
2479
- "record-scope-learning",
2480
- "record-attempt",
2481
- "pipeline-snapshot",
2482
- "session-init",
2483
- "tool-log",
2484
- "build-bash-gate",
2485
- "lucern-cli-init",
2486
- "kit-install"
2487
- ],
2488
- assetIds: [
2489
- "claude-instructions",
2490
- "mcp-config",
2491
- "kit-manifest",
2492
- "lucern-launcher",
2493
- "lucern-shell-wrapper",
2494
- "lucern-cli-script",
2495
- "claude-settings",
2496
- "permission-gate-hook",
2497
- "inbox-check-hook",
2498
- "prompt-router-hook",
2499
- "writeback-gate-hook",
2500
- "build-command-doc",
2501
- "architect-command-doc",
2502
- "pipeline-command-doc",
2503
- "pr-command-doc",
2504
- "claude-agent-catalog",
2505
- "claude-skill-catalog",
2506
- "hooks-doc",
2507
- "setup-ui"
2508
- ],
2509
- defaultTopicSlugs: [
2510
- "migrations",
2511
- "reviews",
2512
- "incidents",
2513
- "architecture",
2514
- "decision-memory"
2515
- ]
2546
+ requiredFields: ["mitigationSteps", "owners"]
2547
+ },
2548
+ {
2549
+ artifactId: "decision-brief",
2550
+ name: "Decision Brief",
2551
+ description: "Options, cited precedent, trade-offs, and objections for an architecture decision",
2552
+ stage: "compare-options",
2553
+ contentSchema: {
2554
+ type: "object",
2555
+ properties: {
2556
+ options: { type: "array", items: { type: "string" } },
2557
+ citedPrecedent: { type: "array", items: { type: "string" } },
2558
+ objections: { type: "array", items: { type: "string" } }
2559
+ },
2560
+ required: ["options", "citedPrecedent"]
2516
2561
  },
2517
- {
2518
- profileId: "codex",
2519
- name: "Codex Engineering Kit",
2520
- description: "Installs the Codex bridge, Lucern MCP wiring, and the same pack-level workflows without Claude-specific hooks.",
2521
- runtimeTarget: "codex",
2522
- promptIds: [
2523
- "build-command",
2524
- "architect-command",
2525
- "pipeline-command",
2526
- "pr-command",
2527
- "lucern-generate-questions",
2528
- "lucern-contradiction-analysis"
2529
- ],
2530
- toolIds: [
2531
- "start-investigation",
2532
- "record-scope-learning",
2533
- "record-attempt",
2534
- "pipeline-snapshot",
2535
- "lucern-cli-init",
2536
- "kit-install"
2537
- ],
2538
- assetIds: [
2539
- "codex-bridge",
2540
- "mcp-config",
2541
- "kit-manifest",
2542
- "lucern-launcher",
2543
- "lucern-shell-wrapper",
2544
- "lucern-cli-script",
2545
- "build-command-doc",
2546
- "architect-command-doc",
2547
- "pipeline-command-doc",
2548
- "pr-command-doc",
2549
- "claude-skill-catalog",
2550
- "skills-sync-script",
2551
- "hooks-doc",
2552
- "setup-ui"
2553
- ],
2554
- defaultTopicSlugs: [
2555
- "migrations",
2556
- "reviews",
2557
- "incidents",
2558
- "architecture",
2559
- "decision-memory"
2560
- ]
2562
+ requiredFields: ["options", "citedPrecedent"]
2563
+ },
2564
+ {
2565
+ artifactId: "decision-record",
2566
+ name: "Decision Record",
2567
+ description: "Chosen path, why it won, what it supersedes, and what follow-up remains open",
2568
+ stage: "record-decision",
2569
+ contentSchema: {
2570
+ type: "object",
2571
+ properties: {
2572
+ decision: { type: "string" },
2573
+ rationale: { type: "array", items: { type: "string" } },
2574
+ supersedes: { type: "array", items: { type: "string" } },
2575
+ followUps: { type: "array", items: { type: "string" } }
2576
+ },
2577
+ required: ["decision", "rationale"]
2561
2578
  },
2562
- {
2563
- profileId: "hybrid",
2564
- name: "Hybrid Engineering Kit",
2565
- description: "Installs both Claude and Codex entry surfaces against one Lucern-native engineering operating system.",
2566
- runtimeTarget: "hybrid",
2567
- promptIds: [
2568
- "claude-quick-reference",
2569
- "build-command",
2570
- "architect-command",
2571
- "pipeline-command",
2572
- "pr-command",
2573
- "lucern-generate-questions",
2574
- "lucern-contradiction-analysis"
2575
- ],
2576
- toolIds: [
2577
- "start-investigation",
2578
- "record-scope-learning",
2579
- "record-attempt",
2580
- "pipeline-snapshot",
2581
- "session-init",
2582
- "tool-log",
2583
- "build-bash-gate",
2584
- "lucern-cli-init",
2585
- "kit-install"
2586
- ],
2587
- assetIds: [
2588
- "claude-instructions",
2589
- "codex-bridge",
2590
- "mcp-config",
2591
- "kit-manifest",
2592
- "lucern-launcher",
2593
- "lucern-shell-wrapper",
2594
- "lucern-cli-script",
2595
- "claude-settings",
2596
- "permission-gate-hook",
2597
- "inbox-check-hook",
2598
- "prompt-router-hook",
2599
- "writeback-gate-hook",
2600
- "build-command-doc",
2601
- "architect-command-doc",
2602
- "pipeline-command-doc",
2603
- "pr-command-doc",
2604
- "claude-agent-catalog",
2605
- "claude-skill-catalog",
2606
- "skills-sync-script",
2607
- "hooks-doc",
2608
- "setup-ui"
2609
- ],
2610
- defaultTopicSlugs: [
2611
- "migrations",
2612
- "reviews",
2613
- "incidents",
2614
- "architecture",
2615
- "decision-memory"
2616
- ]
2617
- }
2618
- ]
2619
- },
2620
- appPackKeys: [
2621
- "chat-v1",
2622
- "documents-v1",
2623
- "epistemic-algorithms-v1",
2624
- "graph-visualization-v1",
2625
- "task-management-v1"
2579
+ requiredFields: ["decision", "rationale"]
2580
+ }
2626
2581
  ],
2627
- methodologyPackId: "developer"
2582
+ roles: [
2583
+ {
2584
+ roleId: "context-compiler",
2585
+ name: "Context Compiler",
2586
+ description: "Compiles prior rationale, analogs, and failure memory into reusable first-hour context",
2587
+ perspective: "History-first, evidence-weighted context assembly",
2588
+ optimizesFor: "recall quality and anti-repetition coverage",
2589
+ mayBlock: false
2590
+ },
2591
+ {
2592
+ roleId: "migration-owner",
2593
+ name: "Migration Owner",
2594
+ description: "Scopes rollout blast radius, rollback, sequencing, and compatibility risk",
2595
+ perspective: "Operational caution with explicit rollback discipline",
2596
+ optimizesFor: "safe rollout planning",
2597
+ mayBlock: false
2598
+ },
2599
+ {
2600
+ roleId: "reviewer",
2601
+ name: "Reviewer",
2602
+ description: "Evaluates risky changes against prior regressions, evidence, and missing checks",
2603
+ perspective: "Evidence-backed change approval with regression awareness",
2604
+ optimizesFor: "defect prevention and clear approval rationale",
2605
+ mayBlock: true
2606
+ },
2607
+ {
2608
+ roleId: "incident-commander",
2609
+ name: "Incident Commander",
2610
+ description: "Maintains multiple plausible explanations while driving mitigation decisions",
2611
+ perspective: "Fast, reversible action without collapsing uncertainty too early",
2612
+ optimizesFor: "time-to-mitigation with preserved reasoning integrity",
2613
+ mayBlock: false
2614
+ },
2615
+ {
2616
+ roleId: "architect",
2617
+ name: "Architect",
2618
+ description: "Turns competing options into explicit decisions with cited precedent and follow-up risk",
2619
+ perspective: "Trade-off clarity and long-term maintainability",
2620
+ optimizesFor: "decision quality and rationale reuse",
2621
+ mayBlock: false
2622
+ },
2623
+ {
2624
+ roleId: "critic",
2625
+ name: "Critic",
2626
+ description: "Finds weak assumptions, missing rollback paths, and untested contradictions",
2627
+ perspective: "Skeptical, adversarial, and detail-oriented",
2628
+ optimizesFor: "early detection of brittle plans",
2629
+ mayBlock: true
2630
+ }
2631
+ ],
2632
+ ...ENGINEERING_ACCELERATOR_TAIL
2628
2633
  });
2629
2634
 
2630
2635
  // src/domain-pack/packs/index.ts