The WiX-specific information is documented but learning just enough XSL is a bit of a challenge. This should get you started. You might have to adapt to your names, heat arguments, etc.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns:str="http://xsltsl.org/string"
exclude-result-prefixes="wix str"
>
<xsl:output
encoding="utf-8"
method="xml"
version="1.0"
indent="yes"
/>
<xsl:template match='wix:Component[contains(wix:File/@Source, "SourceDir\Prog.exe")]'>
<!-- assumes there is only one Prog.exe -->
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<xsl:comment> added shortcut under Component with File that has Source with Prog.exe </xsl:comment>
<!-- Elsewhere, have an Icon element like: <Icon Id="Prog.exe" SourceFile="$(var.BUILDCACHE)Bin/Prog.exe" /> -->
<Shortcut
Id="ProgExeShortcut"
Name="Prog Application"
Icon="Prog.exe"
Directory="ProgramMenuFolder_ProgVendor"
Advertise="yes">
<xsl:attribute name="WorkingDirectory"><xsl:value-of select="@Directory"/></xsl:attribute>
</Shortcut>
<RemoveFolder
Id="ProgExeShortcut_ProgramMenuFolder_ProgVendor"
Directory="ProgramMenuFolder_ProgVendor"
On="uninstall" />
</xsl:copy>
</xsl:template>
<!-- identity template -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match='/'>
<xsl:comment>*** DO NOT EDIT: Generated by heat.exe; transformed by ProgComponentGroup.xsl</xsl:comment>
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
</xsl:stylesheet>
More specific and earlier templates match before more general or later ones. So, the base is to copy every element, attribute, text and comment AS IS, except the ones you want to change. For the ones you want to change, you reconstruct everything—in this case by copying everything the Component element had and then adding the Shortcut and RemoveFolder elements.