Most general formulation of Gödel's incompleteness theorems
Raymond Smullyan gave a very general formulation in terms of representation systems. They appear in his "Theory of Formal Systems", and in the first and last chapters of "Godel's Incompleteness Theorems". They generalise first- and higher-order systems of logic, type theories, and Post production systems.
A representation system consists of:
A countably infinite set $E$ of expressions.
A subset $S \subseteq E$, the set of sentences.
A subset $T \subseteq S$, the set of provable sentences.
A subset $R \subseteq S$, the set of refutable sentences.
A subset $P \subseteq E$, the set of (unary) predicates.
A function $\Phi : E \times \mathbb{N} \rightarrow E$ such that, whenever $H$ is a predicate, then $\Phi(H,n)$ is a sentence.
The system is complete iff every sentence is either provable or refutable. It is inconsistent iff some sentence is both provable and refutable.
We say a predicate $H$ represents the set $A \subseteq \mathbb{N}$ iff $A = \{ n : \Phi(H,n) \in T \}$.
Let $g$ be a bijection from $E$ to $\mathbb{N}$. We call $g(X)$ the Godel number of $X$. We write $E_n$ for the expression with Godel number $n$.
Let $\overline{A} = \mathbb{N} \setminus A$ and $Q^* = \{ n : \Phi(E_n,n) \in Q \}$.
We have:
(Generalised Tarski Theorem) The set $\overline{T^*}$ is not representable.
(Generalised Godel Theorem) If $R^*$ is representable, then the system is either inconsistent or incomplete.
(Generalised Rosser Theorem) If some superset of $R^* $ disjoint from $T^*$ is representable, then the system is incomplete.
In case it's not clear: in a first-order system, we can take $P$ to be the set of formulas whose only free variable is $x_1$, and $\Phi(H,n) = [\overline{n}/x_1]H$.
Theories can be be represented recursion-theoretically by an encoding of the language as natural numbers (most simply, a bijective encoding, which I assume), and a Turing machine that accepts all and only theorems. Theories defined in terms of a Hilbert system will then be either recursive or partial-recursive sets.
It's easy to formalise the idea of such a language having a provability predicate: it's a predicate with a free variable for which the instantiation of that formula with each natural number is accepted iff the formula corresponding to that number is accepted. Theories that have such a predicate are self-descriptive. If you can formalise a substitution operator, you can diagonalise on this predicate. You get four interesting classes (among others) of theory:
- For inconsistent theories, any predicate will do as a self-description predicate (always accept), and any binary function will do as a substitution function;
- Regular completeable theories are not self-descriptive;
- Self-verifying theories have self-description operators, but not substitution operators, and accept the sentence asserting their own consistency;
- Goedel-incomplete theories have both self-description operators and substitution operators, and do not accept the sentences asserting their consistency and inconsistency.
Observe that these definitions are generalisable in an important sense: you can extend to notions of hypercomputation, by using oracle Turing machines, allowing "theories" that are sets that are not recursive or partial recursive. The treatment can be generalised in other ways, such as to the second-order concept of mass problems, which is where I learned about this way of looking at incompleteness.
Note though, that the formalisation here of self-descriptive, susbtitution function, and consistency sentence are still dependent on the language of predicate logic. Loking at provability logic might offer a way to generalise this still further.
The general understanding is that if a system is expressive enough to do arithmetic (say, Robinson arithmetic) then Gödel's theorem applies. A computability view would be, if a system can represent all the computable functions, then Gödel's theorem applies. The crucial link here is that arithmetic is enough to represent all the computable functions.
This syllabus gives a great short proof of Gödel's theorem, and the introductory text could help.
Hope this helps.