code wiki / (root) / nx_coach.nx

nx_coach.nx

buildroot/runtime/nx_coach.nx

9521 B238 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic coach
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_coach.nx

imports: syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_coach_init nx_coach_register nx_coach_init ↻ nx_coach_n_catalog nx_coach_init ↻ nx_coach_classify nx_coach_init ↻ nx_coach_caller_asserts_pr nx_coach_classify ↻ nx_coach_evidence nx_coach_init ↻

structs

none

consts

22const NX_MAGIC_1024: i64 = 1024
23const NX_MAGIC_2048: i64 = 2048
26const NX_COACH_PRO: i64 = 1
27const NX_COACH_ANTI: i64 = 2
28const NX_COACH_NOVEL: i64 = 3
29const NX_COACH_AMBIGUOUS: i64 = 4
30const NX_COACH_PROTECTED: i64 = 5
33const NX_COACH_MIN_CONF: i64 = 870
36const NX_COACH_PROTECT_BITS_UP: i64 = 0x10000001
37const NX_COACH_PROTECT_NO_C_EXTENSION: i64 = 0x10000002
38const NX_COACH_PROTECT_NO_SKIP: i64 = 0x10000003
39const NX_COACH_PROTECT_SILICON_TO_DEATH: i64 = 0x10000004
40const NX_COACH_PROTECT_HARDWARE_AGNOSTIC: i64 = 0x10000005
41const NX_COACH_PROTECT_USER_OWNS_BITS: i64 = 0x10000006
42const NX_COACH_PROTECT_HONEST_VERDICT: i64 = 0x10000007
43const NX_COACH_PROTECT_FOUR_PILLAR_FIX: i64 = 0x10000008
56const NX_COACH_REC_SIZE: i64 = 32 // 4 i64
57const NX_COACH_CAT_BYTES: i64 = 16384

functions

59func nx_coach_init() -> i64
73func nx_coach_register(pattern_tag: i64, verdict: i64,
called by 1: main calls 1: nx_coach_init
102func nx_coach_classify(pattern_tag: i64,
148func nx_coach_evidence(pattern_tag: i64) -> i64
called by 1: main calls 1: nx_coach_init
160func nx_coach_n_catalog() -> i64
called by 1: main calls 1: nx_coach_init
168func nx_coach_caller_asserts_pro(pattern_tag: i64, caller_tag: i64) -> i64
called by 1: main calls 1: nx_coach_classify
178func main() -> i64