Agreements with affirmative statements are made with Yes / Of course + pronoun + auxiliary.
‘It is a nice film.’ ‘Yes. It is.’
‘She is a good girl.’ ‘Of course, she is.’
‘He can speak English well.’ ‘Yes. He can.’
‘She looks upset.’ ‘Yes, she does.’
Agreements with negative statements are made with No + pronoun + auxiliary + n’t/not.
‘The apples aren’t ripe.’ ‘No, they aren’t.’
‘She hasn’t come.’ ‘No, she hasn’t.’
‘He can’t help stealing.’ ‘No, he can’t.’
Disagreements with affirmative statements are made with No + pronoun + auxiliary + n’t/not. But is often used in disagreement with a question or an assumption.
‘He is drunk.’ ‘No, he isn’t.’
‘You are joking.’ ‘No, I’m not.’
‘Why did you beat him?’ ‘But, I didn’t.’
Disagreements with negative statements are made with Yes / but + pronoun + auxiliary.
‘You can’t do it.’ ‘Yes, I can.’
‘He won’t come.’ ‘But he will.’
‘She didn’t break the glass.’ ‘But she did.’
Additions to remarks
Affirmative additions to affirmative remarks are made with So + auxiliary verb + subject.
‘She can swim.’ ‘So can I.’
‘He was late for work.’ ‘So were I.’
‘I have finished the job.’ ‘So has she.’
Negative additions to negative remarks are made with Nor / Neither + auxiliary + subject.
‘He can’t swim.’ ‘Neither can I.’
‘She didn’t come.’ ‘Nor did he.’
‘I don’t speak English.’ ‘Neither does he.’