@a-company/paradigm 3.44.0 → 5.3.3

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 (168) hide show
  1. package/dist/{accept-orchestration-ZUWQUHSK.js → accept-orchestration-GX2YRWM4.js} +5 -5
  2. package/dist/{add-VSPZ6FM4.js → add-FZRKEGH4.js} +1 -1
  3. package/dist/agent-HYKC2LAK.js +387 -0
  4. package/dist/agent-loader-SJPJJS33.js +36 -0
  5. package/dist/{agents-suggest-65SER5IS.js → agents-suggest-DNSYJ6IA.js} +1 -1
  6. package/dist/{aggregate-SV3VGEIL.js → aggregate-H57K7PNV.js} +1 -1
  7. package/dist/{assess-UHBDYIK7.js → assess-4WVXZLZQ.js} +2 -2
  8. package/dist/{auto-24ICVUH4.js → auto-QFS5NHQU.js} +1 -1
  9. package/dist/{beacon-3SJV4DAP.js → beacon-KXZXYQHX.js} +1 -1
  10. package/dist/{calibration-WWHK73WU.js → calibration-V46G7JTY.js} +2 -2
  11. package/dist/{check-OLI6AUS6.js → check-OWAIWV23.js} +1 -1
  12. package/dist/{chunk-RP6TZYGE.js → chunk-2IO7JAG2.js} +1 -1
  13. package/dist/chunk-2T6BTYBN.js +712 -0
  14. package/dist/{chunk-CDMAMDSG.js → chunk-5VKJBNJL.js} +13 -5
  15. package/dist/{chunk-KB4XJWE3.js → chunk-6N3JTACN.js} +98 -437
  16. package/dist/chunk-7N7GSU6K.js +34 -0
  17. package/dist/chunk-A2L4TSLZ.js +526 -0
  18. package/dist/{chunk-P7XSBJE3.js → chunk-ABVQGRF7.js} +1 -1
  19. package/dist/{chunk-HIKKOCXY.js → chunk-EI32ZBE6.js} +1 -1
  20. package/dist/{chunk-QIOCFXDQ.js → chunk-EKGMAM62.js} +1 -1
  21. package/dist/chunk-EZ3GOCYC.js +132 -0
  22. package/dist/chunk-GGMI6C2L.js +1075 -0
  23. package/dist/{chunk-DS5QY37M.js → chunk-GTR2TBIJ.js} +247 -15
  24. package/dist/{chunk-QDXI2DHR.js → chunk-J2JEQRT3.js} +1 -1
  25. package/dist/{chunk-AKIMFN6I.js → chunk-JASGXLK3.js} +2 -2
  26. package/dist/chunk-KVDYJLTC.js +121 -0
  27. package/dist/{chunk-J4E6K5MG.js → chunk-LSRABQIY.js} +25 -1
  28. package/dist/chunk-MCMOGQMU.js +145 -0
  29. package/dist/{chunk-ZXMDA7VB.js → chunk-PDX44BCA.js} +1 -6
  30. package/dist/{chunk-SOBTKFSP.js → chunk-S2HO5MLR.js} +5 -0
  31. package/dist/{chunk-2SKXFXIT.js → chunk-S3ORKP3V.js} +10 -15
  32. package/dist/{chunk-ZMQA6SCO.js → chunk-S6MZ2IEX.js} +628 -228
  33. package/dist/chunk-TAIJOFOE.js +124 -0
  34. package/dist/{chunk-FS3WTUHY.js → chunk-TXESEO7Y.js} +6 -6
  35. package/dist/{chunk-7COU5S2Z.js → chunk-VL67H5IC.js} +1 -1
  36. package/dist/{chunk-QWA26UNO.js → chunk-WQITYKHM.js} +7 -7
  37. package/dist/{chunk-MW5DMGBB.js → chunk-YMDLDELF.js} +114 -55
  38. package/dist/{claude-63ISJAZK.js → claude-FRRWJSTJ.js} +1 -1
  39. package/dist/{claude-cli-ABML5RHX.js → claude-cli-XJLK2X4L.js} +1 -1
  40. package/dist/{claude-code-JRLMRPTO.js → claude-code-HTBA4XRB.js} +1 -1
  41. package/dist/{claude-code-teams-CAJBEFIZ.js → claude-code-teams-T4SP24MD.js} +1 -1
  42. package/dist/{conductor-HLWYWUVH.js → conductor-PGPDVIVE.js} +1 -1
  43. package/dist/{config-schema-3YNIFJCJ.js → config-schema-EA4XALGG.js} +4 -2
  44. package/dist/{constellation-FAGT45TU.js → constellation-A26CCGQS.js} +1 -1
  45. package/dist/{context-audit-557EO6PK.js → context-audit-RLO3ETRP.js} +8 -5
  46. package/dist/{cost-XEBADYFT.js → cost-BGM32XJU.js} +1 -1
  47. package/dist/{cost-UD3WPEKZ.js → cost-VI46A4XL.js} +1 -1
  48. package/dist/{cursor-cli-QUOOF2N4.js → cursor-cli-JVEZGHWQ.js} +1 -1
  49. package/dist/{cursorrules-3TKZ4E4R.js → cursorrules-HLIKJJZT.js} +1 -1
  50. package/dist/decision-loader-WWCLIQPJ.js +20 -0
  51. package/dist/{delete-RRK4RL6Y.js → delete-KBRPQLPC.js} +2 -2
  52. package/dist/{diff-IP5CIARP.js → diff-RQLLNAFI.js} +5 -5
  53. package/dist/{discipline-5F5OVTXB.js → discipline-FA4OZXIS.js} +1 -1
  54. package/dist/{dist-UXWV4OKX.js → dist-34NA5RS5.js} +1 -1
  55. package/dist/{dist-5QE2BB2B-X6DYVSUL.js → dist-5QE2BB2B-5S3T6Y3T.js} +1 -1
  56. package/dist/{dist-CM3MVWWW.js → dist-77JDTVAY.js} +1 -0
  57. package/dist/{dist-POMVY6WP.js → dist-QK4SQAK7.js} +1 -1
  58. package/dist/{dist-3RVKEJRT.js → dist-TA6LSC2Q.js} +1 -1
  59. package/dist/docs-LVLRPBAW.js +155 -0
  60. package/dist/docs-PBZB7LYP.js +89 -0
  61. package/dist/{doctor-GKZJU7QG.js → doctor-ULBOHEIC.js} +3 -3
  62. package/dist/{drift-YGT4LJ7Q.js → drift-R5NRKFHI.js} +1 -1
  63. package/dist/{echo-A6HD5UP7.js → echo-O2LY7CC2.js} +1 -1
  64. package/dist/{edit-4CLNN5JG.js → edit-R2HNLMOG.js} +2 -2
  65. package/dist/event-25OJKDCE.js +31 -0
  66. package/dist/{export-T7CMMJIB.js → export-IWVL7XLF.js} +1 -1
  67. package/dist/{flow-UFMPVOEM.js → flow-CRRVV3O3.js} +2 -2
  68. package/dist/{global-HHUJSBG5.js → global-3NG5JXUB.js} +1 -1
  69. package/dist/graduate-USAWGBJM.js +160 -0
  70. package/dist/{graph-YYUXI3F7.js → graph-VHUMAAS6.js} +2 -2
  71. package/dist/{graph-server-ZPXRSGCW.js → graph-server-YL22VBBN.js} +1 -1
  72. package/dist/{habits-RG5SVKXP.js → habits-OL5NGPXO.js} +3 -3
  73. package/dist/{history-CETCSUCP.js → history-WOWC573W.js} +1 -1
  74. package/dist/{hooks-TCUHQMPF.js → hooks-HFWSCGPV.js} +2 -2
  75. package/dist/index.js +307 -184
  76. package/dist/{integrity-MK2OP5TA.js → integrity-IHO4FZTS.js} +1 -1
  77. package/dist/{integrity-checker-J7YXRTBT.js → integrity-checker-PSKJA5SB.js} +1 -0
  78. package/dist/journal-loader-5EYSBFFY.js +18 -0
  79. package/dist/{lint-HYWGS3JJ.js → lint-K6CJGGPH.js} +1 -1
  80. package/dist/{list-IUCYPGMK.js → list-4YK7QKFF.js} +1 -1
  81. package/dist/{list-BTLFHSRC.js → list-ENR7Q4CR.js} +2 -2
  82. package/dist/{lore-loader-VTEEZDX3.js → lore-loader-7NO6N6FT.js} +4 -1
  83. package/dist/{lore-server-NOOAHKJX.js → lore-server-UNJY5KC3.js} +1 -1
  84. package/dist/{manual-AFJ2J2V3.js → manual-G6FISID5.js} +1 -1
  85. package/dist/mcp.js +3954 -479
  86. package/dist/{migrate-FQVGQNXZ.js → migrate-LS45DNEV.js} +2 -2
  87. package/dist/{migrate-assessments-JP6Q5KME.js → migrate-assessments-RGH4O6IX.js} +2 -2
  88. package/dist/nomination-engine-Q4XSXFKT.js +40 -0
  89. package/dist/notebook-YWIYGEHV.js +155 -0
  90. package/dist/{orchestrate-A226N6FC.js → orchestrate-XZA33TJC.js} +5 -5
  91. package/dist/peers-DEOUIZM6.js +82 -0
  92. package/dist/persona-UHAHIVST.js +390 -0
  93. package/dist/{pipeline-3G2FRAKM.js → pipeline-L4HCSBGN.js} +1 -1
  94. package/dist/{platform-server-KHL6ZPPN.js → platform-server-PMD57BEG.js} +264 -18
  95. package/dist/{plugin-update-checker-HMRPGY5Z.js → plugin-update-checker-ELOEEQYS.js} +1 -0
  96. package/dist/{portal-check-FF5EKZE5.js → portal-check-NPYGII2D.js} +2 -2
  97. package/dist/{portal-compliance-VU4NIFEN.js → portal-compliance-J7DGAPFX.js} +2 -2
  98. package/dist/{probe-7JK7IDNI.js → probe-MHL5HQZ2.js} +3 -3
  99. package/dist/{promote-XO63XMAN.js → promote-F6ZYZZAL.js} +2 -2
  100. package/dist/{providers-YNFSL6HK.js → providers-GK7PB2OL.js} +2 -2
  101. package/dist/{quiz-I75NU2QQ.js → quiz-M66SC7F7.js} +1 -1
  102. package/dist/{record-46CLR4OG.js → record-RA4WR2BO.js} +2 -2
  103. package/dist/{reindex-WIJMCJ4A.js → reindex-HRA2AUS6.js} +3 -2
  104. package/dist/{remember-4EUZKIIB.js → remember-HBWJ655S.js} +1 -1
  105. package/dist/{retag-KC4JVRLE.js → retag-3OLCVDEQ.js} +2 -2
  106. package/dist/{review-Q7M4CRB5.js → review-27ATYTD2.js} +2 -2
  107. package/dist/review-57QMURZV.js +334 -0
  108. package/dist/{ripple-RI3LOT6R.js → ripple-JPBXP5I3.js} +1 -1
  109. package/dist/{sentinel-UOIGJWHH.js → sentinel-4XIG4STA.js} +2 -2
  110. package/dist/{sentinel-bridge-APDXYAZS.js → sentinel-bridge-MDUXTQRL.js} +2 -2
  111. package/dist/{serve-JVXSRSUB.js → serve-FLTFTM3P.js} +2 -2
  112. package/dist/{serve-22A4XOIG.js → serve-INL7SNBK.js} +2 -2
  113. package/dist/{serve-2YJ6D2Y6.js → serve-KBSE36PL.js} +4 -4
  114. package/dist/{server-JV6UFGWZ.js → server-54SKYFFY.js} +2 -2
  115. package/dist/{server-RDLQ3DK7.js → server-XUOIO7E6.js} +1 -1
  116. package/dist/{setup-YNZJQLW7.js → setup-EDS27WUR.js} +1 -1
  117. package/dist/{setup-M2ZKLKNN.js → setup-KO5AFC4K.js} +2 -2
  118. package/dist/{shift-LNMKFYLR.js → shift-VFG23DLA.js} +16 -16
  119. package/dist/{show-P7GYO43X.js → show-5PV5KFJE.js} +2 -2
  120. package/dist/{show-PKZMYKRN.js → show-NQKYX6WQ.js} +1 -1
  121. package/dist/{snapshot-Y3COXK4T.js → snapshot-BK4RBPCG.js} +1 -1
  122. package/dist/{spawn-SSXZX45U.js → spawn-AW6GDECS.js} +3 -3
  123. package/dist/{status-KLHALGW4.js → status-WGIAQODY.js} +1 -1
  124. package/dist/{summary-5NQNOD3F.js → summary-NIRABMF5.js} +2 -2
  125. package/dist/{sweep-EZU3GU6S.js → sweep-QMHNSIY5.js} +2 -2
  126. package/dist/{switch-WYUMVNA5.js → switch-6EJPZDIA.js} +1 -1
  127. package/dist/{symphony-EYRGGVNE.js → symphony-4OCY36AI.js} +350 -29
  128. package/dist/{symphony-QWOEKZMC.js → symphony-B75X2MME.js} +20 -2
  129. package/dist/symphony-peers-2ZQYLRNI.js +34 -0
  130. package/dist/symphony-peers-OL7F6M5S.js +121 -0
  131. package/dist/symphony-relay-UJYUXN65.js +710 -0
  132. package/dist/{sync-ZM4Q3R4U.js → sync-VEHUH4OA.js} +3 -3
  133. package/dist/{sync-llms-JIPP3XX4.js → sync-llms-YHCFIE6X.js} +2 -2
  134. package/dist/{task-loader-7M2FCBX6.js → task-loader-LDYWQSLM.js} +1 -0
  135. package/dist/{team-HGLJXWQG.js → team-7HG7XK5C.js} +6 -6
  136. package/dist/{test-WTR5Q33E.js → test-566CP5KC.js} +1 -1
  137. package/dist/{thread-3WM7KKID.js → thread-N754I4D5.js} +1 -1
  138. package/dist/{timeline-ANC7LVDL.js → timeline-M3CICQFE.js} +2 -2
  139. package/dist/{triage-IZ4MDYNB.js → triage-HHYGT3HY.js} +1 -1
  140. package/dist/{tutorial-GC6QL4US.js → tutorial-KD22SUNO.js} +1 -1
  141. package/dist/university-content/courses/.purpose +66 -0
  142. package/dist/university-content/courses/para-401.json +146 -0
  143. package/dist/university-content/courses/para-501.json +151 -0
  144. package/dist/university-content/courses/para-601.json +608 -0
  145. package/dist/university-content/plsat/.purpose +6 -0
  146. package/dist/university-content/plsat/v2.0.json +2 -2
  147. package/dist/university-content/plsat/v3.0.json +563 -3
  148. package/dist/university-content/reference.json +91 -0
  149. package/dist/{upgrade-ANX3LVSA.js → upgrade-H5PF32BW.js} +2 -2
  150. package/dist/{validate-GD5XWILV.js → validate-CNKEKO6A.js} +1 -1
  151. package/dist/{validate-ITC5D6QG.js → validate-MB5ULIHS.js} +1 -1
  152. package/dist/{validate-ZVPNN4FL.js → validate-QH3LADM6.js} +1 -1
  153. package/dist/{watch-X64UK7K4.js → watch-2TKP5PVL.js} +3 -3
  154. package/dist/{watch-ERBEJUJW.js → watch-ZF4ML6CD.js} +2 -2
  155. package/dist/{wisdom-L2WC7J62.js → wisdom-AATMGNFA.js} +1 -1
  156. package/dist/work-log-loader-5L45XNYZ.js +14 -0
  157. package/dist/{workspace-UIUTHZTD.js → workspace-6E6OSRNU.js} +4 -4
  158. package/package.json +1 -1
  159. package/platform-ui/dist/assets/DocsSection-ByAgPzWV.js +1 -0
  160. package/platform-ui/dist/assets/DocsSection-CjdO6R-u.css +1 -0
  161. package/platform-ui/dist/assets/{GitSection-BD3Ze06e.js → GitSection-BLovj9yT.js} +1 -1
  162. package/platform-ui/dist/assets/{GraphSection-SglITfSs.js → GraphSection-C5PCPUFl.js} +1 -1
  163. package/platform-ui/dist/assets/{LoreSection-bR5Km4Fd.js → LoreSection-BftejTla.js} +1 -1
  164. package/platform-ui/dist/assets/{SentinelSection-QSpAZArG.js → SentinelSection-CnYcasN7.js} +1 -1
  165. package/platform-ui/dist/assets/{SymphonySection-CobYJgvg.js → SymphonySection-BpmqCHeK.js} +1 -1
  166. package/platform-ui/dist/assets/{index-DbxeSMkV.js → index-G9JnWEs_.js} +10 -10
  167. package/platform-ui/dist/index.html +1 -1
  168. package/dist/dist-PSF5CP4I.js +0 -7294
@@ -0,0 +1,334 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ aggregateFromDirectory,
4
+ buildSymbolIndex,
5
+ createSymbolIndex,
6
+ getSymbolsByType,
7
+ searchSymbols
8
+ } from "./chunk-ZGUAAVMA.js";
9
+ import "./chunk-EDOAWN7J.js";
10
+ import "./chunk-IRKUEJVW.js";
11
+ import {
12
+ log
13
+ } from "./chunk-4NCFWYGG.js";
14
+ import "./chunk-PDX44BCA.js";
15
+
16
+ // src/commands/review/index.ts
17
+ import * as fs from "fs";
18
+ import * as path from "path";
19
+ import chalk from "chalk";
20
+ import { execSync } from "child_process";
21
+ import * as yaml from "js-yaml";
22
+ var SYMBOL_PATTERN = /[@#$%^!?&~][a-zA-Z][a-zA-Z0-9_-]*/g;
23
+ var ROUTE_FILE_PATTERNS = [
24
+ /\.(get|post|put|patch|delete)\s*\(\s*['"`]([^'"`]+)['"`]/gi,
25
+ /export\s+(async\s+)?function\s+(GET|POST|PUT|PATCH|DELETE)/gi
26
+ ];
27
+ async function reviewCommand(options = {}) {
28
+ const cwd = process.cwd();
29
+ const tracker = log.command("review").start("Running review pipeline", { cwd });
30
+ let filesModified = [];
31
+ let symbolsTouched = [];
32
+ try {
33
+ if (options.pr) {
34
+ const prFiles = execSync(`gh pr diff ${options.pr} --name-only`, {
35
+ cwd,
36
+ encoding: "utf8",
37
+ timeout: 15e3
38
+ }).trim();
39
+ filesModified = prFiles.split("\n").filter(Boolean);
40
+ } else {
41
+ const staged = execSync("git diff --cached --name-only", {
42
+ cwd,
43
+ encoding: "utf8",
44
+ timeout: 5e3
45
+ }).trim();
46
+ const unstaged = execSync("git diff --name-only", {
47
+ cwd,
48
+ encoding: "utf8",
49
+ timeout: 5e3
50
+ }).trim();
51
+ filesModified = [.../* @__PURE__ */ new Set([
52
+ ...staged.split("\n").filter(Boolean),
53
+ ...unstaged.split("\n").filter(Boolean)
54
+ ])];
55
+ }
56
+ } catch (e) {
57
+ const errorMsg = e.message;
58
+ if (!options.json) {
59
+ log.command("review").error(`Failed to get changed files: ${errorMsg}`);
60
+ }
61
+ tracker.error("Failed to get changed files");
62
+ if (options.ci) process.exit(1);
63
+ return;
64
+ }
65
+ if (filesModified.length === 0) {
66
+ if (options.json) {
67
+ console.log(JSON.stringify({ findings: [], summary: { total: 0, blocking: 0, improvements: 0, notes: 0 } }));
68
+ } else {
69
+ console.log(chalk.green("\n No modified files to review.\n"));
70
+ }
71
+ tracker.success("No files to review");
72
+ return;
73
+ }
74
+ try {
75
+ for (const file of filesModified) {
76
+ if (file.endsWith(".purpose")) {
77
+ const absPath = path.join(cwd, file);
78
+ if (fs.existsSync(absPath)) {
79
+ const content = fs.readFileSync(absPath, "utf-8");
80
+ const matches = content.match(SYMBOL_PATTERN) || [];
81
+ symbolsTouched.push(...matches);
82
+ }
83
+ }
84
+ }
85
+ symbolsTouched = [...new Set(symbolsTouched)];
86
+ } catch {
87
+ }
88
+ const findings = [];
89
+ let index = createSymbolIndex();
90
+ try {
91
+ const aggregation = await aggregateFromDirectory(cwd);
92
+ index = buildSymbolIndex(aggregation);
93
+ } catch {
94
+ }
95
+ const portalPath = path.join(cwd, "portal.yaml");
96
+ let gateConfig = null;
97
+ if (fs.existsSync(portalPath)) {
98
+ try {
99
+ gateConfig = yaml.load(fs.readFileSync(portalPath, "utf-8"));
100
+ } catch {
101
+ }
102
+ }
103
+ for (const symbol of symbolsTouched) {
104
+ const results = searchSymbols(index, symbol);
105
+ if (results.length === 0) {
106
+ findings.push({
107
+ type: "blocking",
108
+ category: "purpose-coverage",
109
+ message: `Symbol "${symbol}" is not registered in any .purpose file`,
110
+ suggestion: "Add to nearest .purpose file using paradigm_purpose_add_component."
111
+ });
112
+ }
113
+ }
114
+ const declaredRoutes = gateConfig?.routes ? Object.keys(gateConfig.routes) : [];
115
+ for (const file of filesModified) {
116
+ const absPath = path.isAbsolute(file) ? file : path.join(cwd, file);
117
+ if (!fs.existsSync(absPath)) continue;
118
+ let content;
119
+ try {
120
+ content = fs.readFileSync(absPath, "utf-8");
121
+ } catch {
122
+ continue;
123
+ }
124
+ for (const pattern of ROUTE_FILE_PATTERNS) {
125
+ pattern.lastIndex = 0;
126
+ let match;
127
+ while ((match = pattern.exec(content)) !== null) {
128
+ const routePath = match[2] || match[0];
129
+ if (routePath && routePath.startsWith("/")) {
130
+ const isKnown = declaredRoutes.some((r) => {
131
+ const normalized = r.replace(/\s+(GET|POST|PUT|PATCH|DELETE)\s*$/, "").trim();
132
+ return normalized === routePath;
133
+ });
134
+ if (!isKnown) {
135
+ findings.push({
136
+ type: gateConfig ? "blocking" : "improvement",
137
+ category: "route-coverage",
138
+ message: `Route "${routePath}" in ${file} not in portal.yaml`,
139
+ file,
140
+ suggestion: "Add route to portal.yaml with ^gates."
141
+ });
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ const declaredGateNames = gateConfig ? Object.keys(gateConfig.gates || {}).map(
148
+ (g) => g.startsWith("^") ? g.slice(1) : g
149
+ ) : [];
150
+ for (const symbol of symbolsTouched) {
151
+ if (symbol.startsWith("^")) {
152
+ const gateName = symbol.slice(1);
153
+ if (!declaredGateNames.includes(gateName)) {
154
+ findings.push({
155
+ type: "blocking",
156
+ category: "portal-compliance",
157
+ message: `Gate "${symbol}" referenced but not declared in portal.yaml`,
158
+ suggestion: `Add ${symbol} to portal.yaml with description and check expression.`
159
+ });
160
+ }
161
+ }
162
+ }
163
+ try {
164
+ const aspects = getSymbolsByType(index, "aspect");
165
+ for (const aspect of aspects) {
166
+ const appliesTo = aspect.appliesTo || [];
167
+ if (appliesTo.length === 0) continue;
168
+ for (const pattern of appliesTo) {
169
+ for (const symbol of symbolsTouched) {
170
+ const matches = matchPattern(pattern, symbol);
171
+ if (matches) {
172
+ const anchors = aspect.anchors || [];
173
+ if (anchors.length === 0) {
174
+ findings.push({
175
+ type: "improvement",
176
+ category: "aspect-anchors",
177
+ message: `Aspect "${aspect.symbol}" applies to "${symbol}" but has no code anchors`,
178
+ suggestion: `Add anchors to ${aspect.symbol} in .purpose file.`
179
+ });
180
+ } else {
181
+ for (const anchor of anchors) {
182
+ const filePath = path.isAbsolute(anchor.path) ? anchor.path : path.join(cwd, anchor.path);
183
+ if (!fs.existsSync(filePath)) {
184
+ findings.push({
185
+ type: "improvement",
186
+ category: "aspect-anchors",
187
+ message: `Aspect "${aspect.symbol}" anchor "${anchor.raw}" points to missing file`,
188
+ suggestion: `Update anchors for ${aspect.symbol} in .purpose file.`
189
+ });
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ } catch {
198
+ }
199
+ for (const symbol of symbolsTouched) {
200
+ const results = searchSymbols(index, symbol);
201
+ if (results.length === 0) continue;
202
+ const sym = results[0];
203
+ if (sym.parentSymbol) {
204
+ const parentResults = searchSymbols(index, sym.parentSymbol);
205
+ if (parentResults.length === 0) {
206
+ findings.push({
207
+ type: "improvement",
208
+ category: "broken-reference",
209
+ message: `Symbol "${symbol}" references parent "${sym.parentSymbol}" which does not exist`,
210
+ suggestion: `Create the parent symbol or update the parent reference.`
211
+ });
212
+ }
213
+ }
214
+ }
215
+ if (options.deep) {
216
+ for (const file of filesModified) {
217
+ const absPath = path.isAbsolute(file) ? file : path.join(cwd, file);
218
+ if (!fs.existsSync(absPath)) continue;
219
+ const ext = path.extname(file);
220
+ if (![".ts", ".tsx", ".js", ".jsx", ".py", ".rs"].includes(ext)) continue;
221
+ let content;
222
+ try {
223
+ content = fs.readFileSync(absPath, "utf-8");
224
+ } catch {
225
+ continue;
226
+ }
227
+ const lines = content.split("\n");
228
+ for (let i = 0; i < lines.length; i++) {
229
+ const line = lines[i];
230
+ const lineNum = i + 1;
231
+ if (/\beval\s*\(/.test(line) && !line.trimStart().startsWith("//")) {
232
+ findings.push({
233
+ type: "blocking",
234
+ category: "security",
235
+ message: `eval() detected \u2014 potential code injection risk`,
236
+ file,
237
+ line: lineNum,
238
+ suggestion: "Replace eval() with a safer alternative."
239
+ });
240
+ }
241
+ if (/(?:password|secret|api_key|apikey|token)\s*[:=]\s*['"][^'"]{8,}['"]/i.test(line)) {
242
+ if (!line.trimStart().startsWith("//") && !line.trimStart().startsWith("#")) {
243
+ findings.push({
244
+ type: "blocking",
245
+ category: "security",
246
+ message: `Possible hardcoded secret detected`,
247
+ file,
248
+ line: lineNum,
249
+ suggestion: "Move secrets to environment variables or a secrets manager."
250
+ });
251
+ }
252
+ }
253
+ if (/\bconsole\.(log|debug|info|warn)\b/.test(line) && !file.includes("test") && !file.includes("spec")) {
254
+ if (!line.trimStart().startsWith("//")) {
255
+ findings.push({
256
+ type: "note",
257
+ category: "convention",
258
+ message: `console.log detected \u2014 use Paradigm logger instead`,
259
+ file,
260
+ line: lineNum,
261
+ suggestion: "Use log.component(), log.gate(), etc. from the Paradigm logger."
262
+ });
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ const blocking = findings.filter((f) => f.type === "blocking");
269
+ const improvements = findings.filter((f) => f.type === "improvement");
270
+ const notes = findings.filter((f) => f.type === "note");
271
+ if (options.json) {
272
+ console.log(JSON.stringify({
273
+ findings,
274
+ summary: {
275
+ total: findings.length,
276
+ blocking: blocking.length,
277
+ improvements: improvements.length,
278
+ notes: notes.length,
279
+ filesReviewed: filesModified.length,
280
+ symbolsChecked: symbolsTouched.length
281
+ }
282
+ }, null, 2));
283
+ } else {
284
+ console.log(chalk.blue("\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
285
+ console.log(chalk.blue("\u2502") + chalk.white.bold(" paradigm review ") + chalk.blue("\u2502"));
286
+ console.log(chalk.blue("\u2502") + chalk.gray(` ${filesModified.length} files, ${symbolsTouched.length} symbols${options.deep ? ", deep mode" : ""}`.padEnd(50)) + chalk.blue("\u2502"));
287
+ console.log(chalk.blue("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
288
+ if (findings.length === 0) {
289
+ console.log(chalk.green(" All checks passed \u2014 no findings.\n"));
290
+ } else {
291
+ if (blocking.length > 0) {
292
+ console.log(chalk.red.bold(` Blocking (${blocking.length})`));
293
+ for (const f of blocking) {
294
+ console.log(` ${chalk.red("x")} ${f.message}`);
295
+ if (f.file) console.log(` ${chalk.gray(f.file)}${f.line ? `:${f.line}` : ""}`);
296
+ if (f.suggestion) console.log(` ${chalk.yellow("->")} ${f.suggestion}`);
297
+ }
298
+ console.log("");
299
+ }
300
+ if (improvements.length > 0) {
301
+ console.log(chalk.yellow(` Improvements (${improvements.length})`));
302
+ for (const f of improvements) {
303
+ console.log(` ${chalk.yellow("*")} ${f.message}`);
304
+ if (f.file) console.log(` ${chalk.gray(f.file)}${f.line ? `:${f.line}` : ""}`);
305
+ if (f.suggestion) console.log(` ${chalk.yellow("->")} ${f.suggestion}`);
306
+ }
307
+ console.log("");
308
+ }
309
+ if (notes.length > 0) {
310
+ console.log(chalk.gray(` Notes (${notes.length})`));
311
+ for (const f of notes) {
312
+ console.log(` ${chalk.gray("o")} ${f.message}`);
313
+ if (f.file) console.log(` ${chalk.gray(f.file)}${f.line ? `:${f.line}` : ""}`);
314
+ }
315
+ console.log("");
316
+ }
317
+ }
318
+ }
319
+ if (options.ci && blocking.length > 0) {
320
+ tracker.error(`${blocking.length} blocking findings`);
321
+ process.exit(1);
322
+ }
323
+ tracker.success(`Review complete: ${findings.length} findings`);
324
+ }
325
+ function matchPattern(pattern, value) {
326
+ if (!pattern.includes("*")) return pattern === value;
327
+ const regex = new RegExp(
328
+ "^" + pattern.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\*/g, ".*") + "$"
329
+ );
330
+ return regex.test(value);
331
+ }
332
+ export {
333
+ reviewCommand
334
+ };
@@ -13,7 +13,7 @@ import "./chunk-IRKUEJVW.js";
13
13
  import {
14
14
  log
15
15
  } from "./chunk-4NCFWYGG.js";
16
- import "./chunk-ZXMDA7VB.js";
16
+ import "./chunk-PDX44BCA.js";
17
17
 
18
18
  // src/commands/ripple.ts
19
19
  import * as path from "path";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // src/commands/sentinel.ts
5
5
  import chalk from "chalk";
@@ -9,7 +9,7 @@ async function sentinelCommand(path, options) {
9
9
  const shouldOpen = options.open !== false;
10
10
  console.log(chalk.cyan("\nStarting Sentinel...\n"));
11
11
  try {
12
- const { startServer } = await import("./server-JV6UFGWZ.js");
12
+ const { startServer } = await import("./server-54SKYFFY.js");
13
13
  console.log(chalk.gray(`Project: ${projectDir}`));
14
14
  console.log(chalk.gray(`Port: ${port}`));
15
15
  console.log();
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // src/platform-server/sentinel-bridge.ts
5
5
  import { Router } from "express";
@@ -37,7 +37,7 @@ async function createSentinelBridge(projectDir, broadcast) {
37
37
  broadcast({ type: "sentinel:event", event });
38
38
  };
39
39
  var onLogReceived = onLogReceived2, onEventReceived = onEventReceived2;
40
- const sentinel = await import("./server-JV6UFGWZ.js");
40
+ const sentinel = await import("./server-54SKYFFY.js");
41
41
  const {
42
42
  SentinelStorage,
43
43
  loadServerConfig,
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // src/commands/serve.ts
5
5
  import chalk from "chalk";
@@ -10,7 +10,7 @@ async function serveCommand(options) {
10
10
  const sections = options.sections ? options.sections.split(",").map((s) => s.trim()) : void 0;
11
11
  console.log(chalk.cyan("\n Starting Paradigm Platform...\n"));
12
12
  try {
13
- const { startPlatformServer } = await import("./platform-server-KHL6ZPPN.js");
13
+ const { startPlatformServer } = await import("./platform-server-PMD57BEG.js");
14
14
  await startPlatformServer({ port, projectDir, open: shouldOpen, sections });
15
15
  console.log(chalk.green(` Platform running at ${chalk.bold(`http://localhost:${port}`)}`));
16
16
  console.log(chalk.gray(" Press Ctrl+C to stop\n"));
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // src/commands/lore/serve.ts
5
5
  import chalk from "chalk";
@@ -9,7 +9,7 @@ async function loreServeCommand(path, options) {
9
9
  const shouldOpen = options.open !== false;
10
10
  console.log(chalk.cyan("\nStarting Lore Timeline...\n"));
11
11
  try {
12
- const { startLoreServer } = await import("./lore-server-NOOAHKJX.js");
12
+ const { startLoreServer } = await import("./lore-server-UNJY5KC3.js");
13
13
  console.log(chalk.gray(`Project: ${projectDir}`));
14
14
  console.log(chalk.gray(`Port: ${port}`));
15
15
  console.log();
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // src/commands/university/serve.ts
5
5
  import chalk from "chalk";
@@ -12,9 +12,9 @@ async function universityServeCommand(_path, options) {
12
12
  const shouldOpen = options.open !== false;
13
13
  console.log(chalk.cyan("\nOpening the campus gates...\n"));
14
14
  try {
15
- const { startServer } = await import("./server-RDLQ3DK7.js");
16
- const contentDir = path.resolve(__dirname, "../university-content");
17
- const uiDistPath = path.resolve(__dirname, "../university-ui");
15
+ const { startServer } = await import("./server-XUOIO7E6.js");
16
+ const contentDir = path.resolve(__dirname, "university-content");
17
+ const uiDistPath = path.resolve(__dirname, "university-ui");
18
18
  console.log(chalk.gray(`Port: ${port}`));
19
19
  console.log();
20
20
  await startServer({
@@ -5,7 +5,7 @@ import {
5
5
  SentinelStorage,
6
6
  loadServerConfig
7
7
  } from "./chunk-FKJUBQU3.js";
8
- import "./chunk-ZXMDA7VB.js";
8
+ import "./chunk-PDX44BCA.js";
9
9
 
10
10
  // ../sentinel/dist/server/index.js
11
11
  import express from "express";
@@ -120,7 +120,7 @@ async function loadParadigmConfig(projectDir) {
120
120
  }
121
121
  async function loadWithPremiseCore(projectDir) {
122
122
  try {
123
- const { aggregateFromDirectory } = await import("./dist-5QE2BB2B-X6DYVSUL.js");
123
+ const { aggregateFromDirectory } = await import("./dist-5QE2BB2B-5S3T6Y3T.js");
124
124
  log.flow("load-symbols").info("Using premise-core aggregator", { path: projectDir });
125
125
  const result = await aggregateFromDirectory(projectDir);
126
126
  const counts = {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-ZXMDA7VB.js";
2
+ import "./chunk-PDX44BCA.js";
3
3
 
4
4
  // ../university/dist/chunk-CXHK3FVZ.js
5
5
  import express from "express";
@@ -11,7 +11,7 @@ import {
11
11
  writeConfig
12
12
  } from "./chunk-GZDFVP2N.js";
13
13
  import "./chunk-4NCFWYGG.js";
14
- import "./chunk-ZXMDA7VB.js";
14
+ import "./chunk-PDX44BCA.js";
15
15
  export {
16
16
  detectAllClients,
17
17
  generateMCPConfig,
@@ -16,7 +16,7 @@ import {
16
16
  DEFAULT_SYMBOL_SYSTEM,
17
17
  serializeParadigmConfig
18
18
  } from "./chunk-YO6DVTL7.js";
19
- import "./chunk-ZXMDA7VB.js";
19
+ import "./chunk-PDX44BCA.js";
20
20
 
21
21
  // src/commands/setup.ts
22
22
  import * as fs from "fs";
@@ -262,7 +262,7 @@ async function setupCommand(targetPath, options) {
262
262
  }
263
263
  const gatePath = path.join(rootDir, "portal.yaml");
264
264
  if (answers.hasGates === "yes" && !fs.existsSync(gatePath)) {
265
- const { getDefaultGateConfig } = await import("./dist-3RVKEJRT.js");
265
+ const { getDefaultGateConfig } = await import("./dist-TA6LSC2Q.js");
266
266
  fs.writeFileSync(gatePath, getDefaultGateConfig(), "utf8");
267
267
  console.log(chalk.green("\u2705 Created portal.yaml"));
268
268
  }
@@ -1,49 +1,49 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  teamInitCommand
4
- } from "./chunk-HIKKOCXY.js";
5
- import "./chunk-QWA26UNO.js";
6
- import "./chunk-J4E6K5MG.js";
4
+ } from "./chunk-EI32ZBE6.js";
5
+ import "./chunk-WQITYKHM.js";
6
+ import "./chunk-LSRABQIY.js";
7
7
  import "./chunk-PBHIFAL4.js";
8
- import "./chunk-FS3WTUHY.js";
8
+ import "./chunk-TXESEO7Y.js";
9
9
  import "./chunk-6QC3YGB6.js";
10
10
  import {
11
11
  agentsConfigured
12
12
  } from "./chunk-PMXRGPRQ.js";
13
13
  import {
14
14
  hooksInstallCommand
15
- } from "./chunk-DS5QY37M.js";
15
+ } from "./chunk-GTR2TBIJ.js";
16
16
  import {
17
17
  detectProjectRole
18
- } from "./chunk-P7XSBJE3.js";
19
- import "./chunk-MW5DMGBB.js";
18
+ } from "./chunk-ABVQGRF7.js";
20
19
  import {
21
20
  doctorCommand
22
- } from "./chunk-2SKXFXIT.js";
21
+ } from "./chunk-S3ORKP3V.js";
23
22
  import "./chunk-5JGJACDU.js";
24
23
  import {
25
24
  initCommand
26
- } from "./chunk-AKIMFN6I.js";
25
+ } from "./chunk-JASGXLK3.js";
27
26
  import {
28
27
  indexCommand
29
- } from "./chunk-7COU5S2Z.js";
28
+ } from "./chunk-VL67H5IC.js";
30
29
  import "./chunk-36TKPM5Z.js";
31
30
  import "./chunk-ZGUAAVMA.js";
32
31
  import "./chunk-EDOAWN7J.js";
33
32
  import "./chunk-IRKUEJVW.js";
34
- import "./chunk-QDXI2DHR.js";
33
+ import "./chunk-J2JEQRT3.js";
35
34
  import {
36
35
  detectDiscipline
37
36
  } from "./chunk-UPLDI7CN.js";
38
37
  import {
39
38
  syncCommand
40
- } from "./chunk-RP6TZYGE.js";
41
- import "./chunk-KB4XJWE3.js";
39
+ } from "./chunk-2IO7JAG2.js";
40
+ import "./chunk-6N3JTACN.js";
42
41
  import "./chunk-YO6DVTL7.js";
43
42
  import {
44
43
  log
45
44
  } from "./chunk-4NCFWYGG.js";
46
- import "./chunk-ZXMDA7VB.js";
45
+ import "./chunk-YMDLDELF.js";
46
+ import "./chunk-PDX44BCA.js";
47
47
 
48
48
  // src/commands/shift.ts
49
49
  import * as fs from "fs";
@@ -119,7 +119,7 @@ discipline: ${detected}`
119
119
  if (isInitialized) {
120
120
  spinner.start("Step 1b/6: Checking for migrations...");
121
121
  try {
122
- const { migrateCommand } = await import("./migrate-FQVGQNXZ.js");
122
+ const { migrateCommand } = await import("./migrate-LS45DNEV.js");
123
123
  await migrateCommand({ apply: true, quiet: true, noSync: true });
124
124
  spinner.succeed(chalk.green("Migrations applied"));
125
125
  } catch (error) {
@@ -266,7 +266,7 @@ workspace: "${relPath}"
266
266
  if (configForWs.workspace) {
267
267
  spinner.start("Step 3b/6: Reindexing workspace members...");
268
268
  try {
269
- const { workspaceReindexCommand } = await import("./workspace-UIUTHZTD.js");
269
+ const { workspaceReindexCommand } = await import("./workspace-6E6OSRNU.js");
270
270
  await workspaceReindexCommand({ quiet: true });
271
271
  spinner.succeed(chalk.green("Workspace members reindexed"));
272
272
  } catch (e) {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadLoreEntry
4
- } from "./chunk-QIOCFXDQ.js";
5
- import "./chunk-ZXMDA7VB.js";
4
+ } from "./chunk-EKGMAM62.js";
5
+ import "./chunk-PDX44BCA.js";
6
6
 
7
7
  // src/commands/lore/show.ts
8
8
  import chalk from "chalk";
@@ -4,7 +4,7 @@ import {
4
4
  loadPath,
5
5
  loadQuiz
6
6
  } from "./chunk-GT5QGC2H.js";
7
- import "./chunk-ZXMDA7VB.js";
7
+ import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/commands/university/show.ts
10
10
  import chalk from "chalk";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-ZGUAAVMA.js";
7
7
  import "./chunk-EDOAWN7J.js";
8
8
  import "./chunk-IRKUEJVW.js";
9
- import "./chunk-ZXMDA7VB.js";
9
+ import "./chunk-PDX44BCA.js";
10
10
 
11
11
  // src/commands/premise/snapshot.ts
12
12
  import * as fs from "fs";
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  AgentSpawner
4
- } from "./chunk-J4E6K5MG.js";
4
+ } from "./chunk-LSRABQIY.js";
5
5
  import "./chunk-PBHIFAL4.js";
6
6
  import {
7
7
  getBestProvider
8
- } from "./chunk-FS3WTUHY.js";
8
+ } from "./chunk-TXESEO7Y.js";
9
9
  import {
10
10
  loadAgentsManifest
11
11
  } from "./chunk-PMXRGPRQ.js";
12
12
  import {
13
13
  formatTokens
14
14
  } from "./chunk-5JGJACDU.js";
15
- import "./chunk-ZXMDA7VB.js";
15
+ import "./chunk-PDX44BCA.js";
16
16
 
17
17
  // src/commands/team/spawn.ts
18
18
  import * as path from "path";
@@ -3,7 +3,7 @@ import {
3
3
  loadDiplomas,
4
4
  loadUniversityIndex
5
5
  } from "./chunk-GT5QGC2H.js";
6
- import "./chunk-ZXMDA7VB.js";
6
+ import "./chunk-PDX44BCA.js";
7
7
 
8
8
  // src/commands/university/status.ts
9
9
  import chalk from "chalk";
@@ -7,9 +7,9 @@ import "./chunk-IRKUEJVW.js";
7
7
  import {
8
8
  detectIDE,
9
9
  getAdapter
10
- } from "./chunk-KB4XJWE3.js";
10
+ } from "./chunk-6N3JTACN.js";
11
11
  import "./chunk-YO6DVTL7.js";
12
- import "./chunk-ZXMDA7VB.js";
12
+ import "./chunk-PDX44BCA.js";
13
13
 
14
14
  // src/commands/summary.ts
15
15
  import * as fs from "fs";
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  recordLore,
4
4
  resolveAuthor
5
- } from "./chunk-QIOCFXDQ.js";
5
+ } from "./chunk-EKGMAM62.js";
6
6
  import {
7
7
  log
8
8
  } from "./chunk-4NCFWYGG.js";
9
- import "./chunk-ZXMDA7VB.js";
9
+ import "./chunk-PDX44BCA.js";
10
10
 
11
11
  // src/commands/sweep/index.ts
12
12
  import * as fs from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  getServersFromConfig
5
5
  } from "./chunk-GZDFVP2N.js";
6
6
  import "./chunk-4NCFWYGG.js";
7
- import "./chunk-ZXMDA7VB.js";
7
+ import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/commands/mcp/switch.ts
10
10
  import * as fs from "fs";