\define[2]\ChapterCommand
{\framed
[frame=off,bottomframe=on,framecolor=orange,width=fit]
{#1\hspace[medium]#2}}
In newer versions (the environment form was added a few months ago) you can use
\startframed … \stopframed
instead of
\framed{…}
which makes it easier to format code when \framed has more content.
Wolfgang