Pretty straightforward question. When should one edit someone else's answer vs. Adding your own? Editing as in adding additional information to the answer, not correct something you think is wrong, not grammatical errors, etc.
Personally, I'll almost always reject edits as invalid that substantially change the original post, including those that add information. I've seen an exception or two, along the lines of adding links to updated documentation or documentation for new versions of whatever product is in question, but other than that, I can't think of any.
I'm of the belief that it's better to either add a comment, if the information fits in a comment, and the poster you're responding to is still active, or otherwise, add your own answer.
"To expand on what [user] said in [linked answer], ..."
If you haven't already done so, I suggest reviewing Editing Help in the Help Center, as it covers some of this.
The cardinal rule for me is that you should not change the meaning of an existing answer.
For instance, you should not remove the word "not" from this answer, because it would change the meaning.
Things like updating broken links and fixing spelling and grammar are OK.
Adding new information is a serious gray area, though. This does run the risk of changing the meaning of the answer. I find it usually best to leave a comment with the additional information, and leave it up to the person who answered as to whether they want to incorporate it.
One example where I would find this acceptable is: an answer recommends using some command with a specific set of options, and your additional information explains what the options do.
If your own additions can stand alone as an answer, then by all means post a new answer.
Finally, don't be too afraid to edit; if it turns out to be really bad, either the original author, or 2K+ community members, can roll it back.
My view is that as long as
- The content you are adding is highly relevant to the answer.
- It makes it obviously better
- You are 100% certain the information added is accurate (and tested to work if code).
Such that you reasonably expect the post author will feel the edit has made the answer better, not worse, then edit away.
Occasionally I have made quite substantive additions to answers that are fundamentally correct but lacking in details and never had any complaints.
The original author can always roll back if they really object.
If your edits are subject to review you should note that this isn't a community consensus opinion however and probably most such edits are automatically rejected as "radical changes" rather than being evaluated per the points above by people with domain knowledge.
If you feel you have information that someone else has not yet provided and would clearly benefit the poster and community, post it as your own answer! If you have advice or knowledge as to the improvement of another's answer, try leaving a comment for them and giving them the opportunity to change it themselves, and learn from what you have to share as well. I would stay away from changing an answer which completely changes what the original person attempted to post, this is even worse if what you are doing destroys the original answer and reduces the amount of benefit the original answer provided.