Most of the things, if not all, that I taught you here came from my personal experience. There are a lot of other experts out there in the field of game design; they have their own opinions regarding game design, which I recommend you to look into. I will add some references in this part for you to read.
Game-design template
There is a good game-design template from Bob Bates' book, titled Game Design: Second Edition. I will include an example outline (taken from Bates' text, with the non-applicable or complicated parts removed):
Game Name
Executive Summary
High Concept (elevator pitch/"core")
Hook (what makes the game unique and special)
Genre
Visual Style
Core Gameplay
List each mechanic the player will do
Project Scope
Number of Characters (if there are more than one)
Number of Levels/Missions/Puzzles
Number of Enemies (if applicable)
Number of Weapons (if applicable)
Etc.
Platforms being Published On
Menu Diagrams
Game Screen Flow Diagram (this is what I explained as "general flow diagram")