How to replace node_form() with my custom form callback? In my module, I want to override the call to node_form() for a specific node type called superpage, because I want this specific node form to allow for a confirmation step before saving.

In drupal_retrieve_form(), every node form is built by the function node_form(), which adds everything you'd expect from a node form. 

I want to add an extra step to my form: First, the node form should be rendered normally; then, when the user clicks Save, I am using a custom submit handler to set $form_state['rebuild'], and to set a custom flag, signaling the need for confirmation. Now I want to rebuild the form not through node_form(); instead I want to display a confirm_form().

This means that the process starts over in drupal_retrieve_form(), which simply calls node_form() again, because the node module implements hook_forms() and defines that callback for all node forms. 

I would like to replace the form callback for my custom content type, so that it returns a normal node form if confirmation is not needed, or a confirmation form if needed.

Implementing hook_forms() in my module didn't help.

/**
 * Implements hook_forms().
 */
function superpages_forms($form_id, $args) {
  $forms = array();
  if ($form_id == 'superpage_node_form') {
    // Adding this callback crashes drupal_retrieve_form().
    $forms[$form_id]['callback'] = 'superpages_wrapped_node_form';
  }
  return $forms;
}

function superpages_wrapped_node_form($form, &amp;$form_state, $node) {
  // Build for special case: a confirmation form.
  if (!empty($form_state['values']['confirm_is_needed'])) {
    $confirm = t('You should be careful with this. Are you sure?');
    $confirm_form = confirm_form(array(), $confirm, 'node/' . $node-&gt;nid);
    return $confirm_form;
  } else {
  // Build a normal node form.
    return node_form($form, $form_state, $node);
  }
}
Variant 1. You can use hook_menu_alter and you can set your callback

/**
 * Implements hook_menu_alter.
 */
function MYMODULE_menu_alter(&amp;$items) {
  $items['node/add/superpage']['page callback'] = 'MYMODULE_superpage_form';
}


Variant 2. You can use hook_form_FORM_ID_alter  and override/edit the form

/**
 * Implements hook_form_FORM_ID_alter()
 */
function MYMODULE_form_superpage_node_form_alter(&amp;$form, &amp;$form_state, $form_id){
  // your code
}