It is standard to create shadeless materials by using the emission shader, often with a Lightpath Is Camera Ray to prevent it from casting light on other objects. This creates a flat color regardless of lighting. It does not get any shadows cast on it, and doesn't have any shading on it.
I want to create a material that will not allow any shading on it (so no shadow terminator, same flat color) but WILL allow for shadows to be cast upon it, and most importantly, somehow responds to the overall light level in the scene. In other words, it can change in brightness when in well lit areas, but remains flat.
The purpose of this is to allow for flat shading, but also allow for low light and high key scenes. Currently, the emission based shadeless material will give the same color in a dark room as on a sunny day.
For a full example, consider this material on a character's face: 1)If the light was striking it directly, the whole face would be the same color, which should be the brightness you would have in the brightest area if using a regular diffuse shader.
2) If the character's face wasn't in direct light, it should all be the brightness of the darkest area if it was a regular diffuse shader.
3) If the character's face was strongly lit on one side but not the other (hatchet lighting), it should be fully bright on the bright area, and fully dark in the dark area, which could probably be achieved with some sort of color ramp or have it based on normal.
4) If another object casts a shadow on the object, it should only darken in the area the shadow is cast on, like a regular diffuse. The cast shadow shouldn't be factored into it's shading.
Ideally this would be solved within the material, but compositor options could also work.