nx_coach.nx
buildroot/runtime/nx_coach.nx
about
nx_coach.nx -- balanced pro/anti-pattern coach.
Cardinal: feedback-pro-anti-pattern-coach-balanced-no-corruption.
Advisory, not authoritative. Never deletes / auto-edits / auto-
rejects code. Emits a verdict + confidence + cited evidence.
Caller decides what to do.
Five-verdict sealed enum (binary pro/anti is FORBIDDEN):
PRO -- known pro-pattern, evidence-cited, confidence >= 870
ANTI -- known anti-pattern, evidence-cited, confidence >= 870
NOVEL -- doesn't match either catalog; might be cutting-edge
S-class innovation OR new anti-pattern; ESCALATE
AMBIGUOUS -- matches multiple patterns with conflicting verdicts;
ESCALATE
PROTECTED -- matches a cardinal-class fix / innovation safe-harbor;
coach CANNOT advise against (refusal-of-refusal)
Confidence Q10 (0..1024); PRO/ANTI require >= 870.
dependencies 1 imports · 0 importers
imports: syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 22 | const NX_MAGIC_1024: i64 = 1024 |
| 23 | const NX_MAGIC_2048: i64 = 2048 |
| 26 | const NX_COACH_PRO: i64 = 1 |
| 27 | const NX_COACH_ANTI: i64 = 2 |
| 28 | const NX_COACH_NOVEL: i64 = 3 |
| 29 | const NX_COACH_AMBIGUOUS: i64 = 4 |
| 30 | const NX_COACH_PROTECTED: i64 = 5 |
| 33 | const NX_COACH_MIN_CONF: i64 = 870 |
| 36 | const NX_COACH_PROTECT_BITS_UP: i64 = 0x10000001 |
| 37 | const NX_COACH_PROTECT_NO_C_EXTENSION: i64 = 0x10000002 |
| 38 | const NX_COACH_PROTECT_NO_SKIP: i64 = 0x10000003 |
| 39 | const NX_COACH_PROTECT_SILICON_TO_DEATH: i64 = 0x10000004 |
| 40 | const NX_COACH_PROTECT_HARDWARE_AGNOSTIC: i64 = 0x10000005 |
| 41 | const NX_COACH_PROTECT_USER_OWNS_BITS: i64 = 0x10000006 |
| 42 | const NX_COACH_PROTECT_HONEST_VERDICT: i64 = 0x10000007 |
| 43 | const NX_COACH_PROTECT_FOUR_PILLAR_FIX: i64 = 0x10000008 |
| 56 | const NX_COACH_REC_SIZE: i64 = 32 // 4 i64 |
| 57 | const NX_COACH_CAT_BYTES: i64 = 16384 |
functions
| 59 | func nx_coach_init() -> i64 |
| 73 | func nx_coach_register(pattern_tag: i64, verdict: i64, |
| 102 | func nx_coach_classify(pattern_tag: i64, |
| 148 | func nx_coach_evidence(pattern_tag: i64) -> i64 |
| 160 | func nx_coach_n_catalog() -> i64 |
| 168 | func nx_coach_caller_asserts_pro(pattern_tag: i64, caller_tag: i64) -> i64 |
| 178 | func main() -> i64 |