MV Yanfly Attachable Augments - how to change augment effect based on contents of other slots?

Hi all. I can't figure out how to make this system work:

A weapon has two augment slots, "slot I" and "slot II". The same kinds of items are used for both slots. These items come in six "flavors" associated with six core stats. What I want is a way to give different augment effects based on the relationships between two "flavors". For example, putting a defense booster in both slots to give a buff greater than the sum of its parts -- two +10% defense boosters resulting in a +30% total increase. I also want to add unique effects if the two slots contain different "flavors", so for example if slot I contains an attack boost and slot II contains an agility boost, the weapon also gets a boost to critical hit rate.

I just need to be able to reference what item is in the other augment slot in order to implement this. It doesn't need to be particularly elegant, and the number of unique "flavor" combinations (21) is small enough that I can just manually check each one. I understand that this probably has to be done by writing JS in the <Augment Attach Eval> notetag, and the documentation on the YEP wiki says that I can just use "item" to refer to the weapon being augmented, but how can I check what augmentations have already been applied to "item" in order to make if/then statements? It seems like it would be relatively simple to check "if (this weapon) augment slot I contains (item X), then (item Y) in slot II applies (effect Z)" but I just cannot figure out how to make it work in code.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-attachable-augments-how-to-change-augment-effect-based-on-contents-of-other-slots.158767/