Grammar
N3AI-drafted〜ことだ(助言)
you should ~, the best thing is to ~
Formation
V-辞書形 + ことだ/V-ない形 + ことだ
Usage
Used to give advice or a recommendation, often from someone in a position to know (teacher, doctor, senior). It states what the listener ought to do as a general principle, so it can sound preachy if used toward a superior. Unlike 〜ほうがいい, which softly compares options, 〜ことだ asserts the one right course of action; it is not used about the speaker's own actions.
Examples
風邪のときはゆっくり休むことだ。
かぜのときはゆっくりやすむことだ。
When you have a cold, the best thing is to rest well.
上手になりたければ、毎日練習することだ。
じょうずになりたければ、まいにちれんしゅうすることだ。
If you want to get good, you should practice every day.
試験の前は、あまり無理をしないことだ。
しけんのまえは、あまりむりをしないことだ。
Before an exam, you shouldn't push yourself too hard.