code wiki / _hdl_build / nx_team_roster.nx
nx_team_roster.nx source
↩ module page · 74 lines · 8757 B
1// nx_team_roster.nx -- the LIBRARIAN catalogs the team: who owns what (role umbrellas + folded sub-
2// functionalities), team-resources, and enablement, with a SPECIAL-FORCES constraint (operator: "we dont
3// want a massive team for massive sake but a special forces optimized like team that can get the job done").
4// The lean rule: a capability area FOLDS as a sub-functionality under an existing role (e.g. Mathematician
5// under Engineer, Archivist under Librarian) unless it's big enough to warrant its own teammate. Emits
6// knowledge/TEAM_ROSTER.md (the output) -- the Librarian gathering all of it. license_tier: ORIGINAL
7
8import "nx_syscalls.nx"
9
10// special-forces health of a role by how many capabilities it owns.
11const TR_LEAN: i64 = 0
12const TR_OVERLOADED: i64 = 1 // owns too much -> consider a folded sub-functionality, or (if huge) split
13const TR_UNDERUSED: i64 = 2 // owns too little -> fold it under a sibling role
14
15func tr_role_health(cap_count: i64, min_caps: i64, max_caps: i64) -> i64 {
16 if cap_count > max_caps { return TR_OVERLOADED }
17 if cap_count < min_caps { return TR_UNDERUSED }
18 return TR_LEAN
19}
20
21// the lean decision: FOLD a functionality under an existing role, or SPLIT it into a NEW teammate.
22const TR_FOLD: i64 = 1
23const TR_SPLIT: i64 = 2
24func tr_fold_or_split(functionality_caps: i64, teammate_threshold: i64) -> i64 {
25 if functionality_caps >= teammate_threshold { return TR_SPLIT }
26 return TR_FOLD
27}
28
29// the team stays special-forces iff the role count is bounded.
30func tr_special_forces_ok(nroles: i64, max_roles: i64) -> i64 { if nroles <= max_roles { return 1 } return 0 }
31
32func tr_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
33
34func main() -> i64 {
35 let fd: i64 = sys_openat_wr("knowledge/TEAM_ROSTER.md" as *u8, 0x1a4)
36 tr_w(fd, "# Nishi Team Roster -- Special-Forces, Capability Ownership (Librarian-generated)\n\n" as *u8)
37 tr_w(fd, "Lean rule: a capability area is a FOLDED sub-functionality under a role unless it's big enough for its own teammate.\n" as *u8)
38 tr_w(fd, "10 core roles. Caps live as `runtime/**/*.nx` (local source) + the self-model registry; SPOKE projects live in Gitea; live binaries on the NAS.\n\n" as *u8)
39
40 tr_w(fd, "## 1. CONDUCTOR (+ Warden)\n- **Umbrella:** orchestration & autonomy -- the heartbeat/tick, autonomy gates, resource politeness, work dispatch, parallel-git isolation, RACI collaboration.\n- **Owns:** nx_conductor, nx_warden, nx_resource_governor, nx_sysload, nx_work_dispatcher, nx_team_console (UI), nx_workstream_git, nx_raci_collab, nx_run_timeout.\n- **Folded:** Warden (allow/deny gate).\n\n" as *u8)
41 tr_w(fd, "## 2. ENGINEER (+ Mathematician)\n- **Umbrella:** build + verify + machine code + mathematics -- the build gate (compile->link->run rigor), the sovereign toolchain, superopt, SIMD, numerics.\n- **Owns:** nx_engineer_* gates, the nxasm/ x86+RV64+ARM64 suite, nx_toolchain_sweep, nx_byte_diff, nx_superopt_*, nx_simd_*, nx_uops_cost, nx_power_iter, nx_build_orchestrator, nx_retire_gcc_orchestrator.\n- **Folded:** Mathematician (linear algebra, cost models, BM25/PPMI math).\n\n" as *u8)
42 tr_w(fd, "## 3. BUILDER\n- **Umbrella:** synthesis & authoring -- AUTHORS code by search/composition (who wrote the answer? the Builder).\n- **Owns:** nx_builder_compose, nx_superopt_strength, nx_eqsat, nx_spec_ingest, nx_semantic_retrieval.\n\n" as *u8)
43 tr_w(fd, "## 4. DOCTOR\n- **Umbrella:** heal & repair (runtime) -- fixes failures, asm-level repair, recompile-retry; never verifies/admits its own fix (RACI).\n- **Owns:** nx_doctor_* (doc_asm_fix, doc_heal_token, doc_rebuild).\n\n" as *u8)
44 tr_w(fd, "## 5. RESEARCHER\n- **Umbrella:** knowledge acquisition -- fetch/extract/browse, the Nishi Library (mirror/cache/ranked search), deep-research, corroboration.\n- **Owns:** nx_browse_text, nx_https_get, nx_research_extract, nx_library_cache, nx_library_search, nx_corroborate, nx_live_reach, nx_researcher_spec, the /deep-research workflow.\n\n" as *u8)
45 tr_w(fd, "## 6. LIBRARIAN (+ Archivist)\n- **Umbrella:** documentation, catalog, the self-model REGISTRY, and archival of what we've tried.\n- **Owns:** nx_librarian, nx_doc_xref/census, nx_self_model_lint, nx_cap_register, nx_team_roster (this), CAPABILITY_CATALOG.md, knowledge/research/, the memory archive.\n- **Folded:** Archivist (history of attempts -- small enough to fold, NOT its own teammate).\n\n" as *u8)
46 tr_w(fd, "## 7. REFEREE (+ Critic, Auditor)\n- **Umbrella:** objective judging & evaluation -- no self-grade, cost oracle, maturity & sovereignty audit, graded critique.\n- **Owns:** nx_referee/v2, nx_cost_oracle, nx_auditor, nx_maturity_auditor, nx_ecosystem_compare, nx_landscape_sweep, nx_dep_retire, nx_critic.\n- **Folded:** Critic (graded counters), Auditor (sovereignty + maturity).\n\n" as *u8)
47 tr_w(fd, "## 8. PROJECT MANAGER (+ Maintainer)\n- **Umbrella:** planning, prioritization & governance flow -- plan/estimates/check-ins, the decision matrix (WSJF+AHP), the review log, tech-debt & update governance.\n- **Owns:** nx_pm_plan, nx_pm_decision_matrix, nx_pm_review_log, nx_maint_council, nx_update_winwinwin, nx_loop_monitor, nx_opportunity_loop.\n- **Folded:** Maintainer (tech debt, maintenance cost, blast-radius).\n\n" as *u8)
48 tr_w(fd, "## 9. COUNCIL\n- **Umbrella:** admission & checks-and-balances -- admits capabilities (additive-only + separation of duties), governed ingest, 3->2->1 cardinal votes.\n- **Owns:** nx_ingest_governed, the council/cardinal logic.\n\n" as *u8)
49 tr_w(fd, "## 10. HUB\n- **Umbrella:** self-improvement & spokes -- the central permanent west team that GROWS; clone-integrate (Naruto); spoke projects (Elder AI) receive + feed back.\n- **Owns:** nx_hub_spoke, the growth loop, the self-model as the hub's living record.\n\n" as *u8)
50
51 tr_w(fd, "## Team resources & enablement (cross-cutting, owned by no single role)\n- **Enablement:** nx_syscalls (substrate wrapper), the known-good compiler + nxasm (Engineer-owned, team-used), the native build cache, nx_grep.\n- **Team resource:** the Scribe crew log + PM logs (/tmp/nishi_*.log), the cap registry (/tmp/nishi_cap_registry.log).\n\n" as *u8)
52
53 tr_w(fd, "## Team-owned vs Gitea vs local vs live\n- **Team-owned capabilities:** ~204 in the self-model (`runtime/_hdl_build/*.nx` + `runtime/*.nx` + `nxasm/`), each mapped to a role above.\n- **Gitea (192.168.8.227:3003):** ~100 SPOKE project repos (Stack/Web/Physical/Games/Home/AI/Other) -- the projects the hub feeds; discovered by the PM (nx_pm_discover/nx_wiki_projects).\n- **Local knowledge/ (Librarian):** CAPABILITY_CATALOG.md, research/, papers/, TEAM_ROSTER.md, captured_site/.\n- **Live (NAS):** sites.elf (family/andelinwest/wiki on :8443) -- deployed artifacts, not source.\n\n" as *u8)
54 tr_w(fd, "## Special-forces verdict\n10 core roles, sub-functionalities FOLDED (Mathematician/Warden/Archivist/Critic/Auditor/Maintainer) rather than spun out -- lean, no role bloated enough to need a new teammate yet. Archival folds under the Librarian. Review when any role's owned-cap count crosses the teammate threshold.\n" as *u8)
55 sys_close(fd)
56
57 // self-checks
58 let r: *i64 = sys_mmap(8*8) as *i64
59 r[0]=0; if tr_role_health(5, 2, 12) == TR_LEAN { r[0]=1 }
60 r[1]=0; if tr_role_health(15, 2, 12) == TR_OVERLOADED { r[1]=1 }
61 r[2]=0; if tr_role_health(1, 2, 12) == TR_UNDERUSED { r[2]=1 }
62 r[3]=0; if tr_fold_or_split(3, 8) == TR_FOLD { r[3]=1 } // Mathematician (small) folds under Engineer
63 r[4]=0; if tr_fold_or_split(20, 8) == TR_SPLIT { r[4]=1 } // a huge area would split into a teammate
64 r[5]=0; if tr_special_forces_ok(10, 12) == 1 { r[5]=1 } // 10 roles = lean
65 r[6]=0; if tr_special_forces_ok(20, 12) == 0 { r[6]=1 } // 20 roles = bloat
66 var pass: i64 = 0; var i: i64 = 0
67 while i < 7 { pass = pass + r[i]; i = i + 1 }
68 let wp: i64 = sys_openat_rd("knowledge/TEAM_ROSTER.md" as *u8); let bb: *u8 = sys_mmap(64); let gg: i64 = sys_read(wp, bb, 63)
69 tr_w(1, "team roster emitted to knowledge/TEAM_ROSTER.md (" as *u8); { let d: *u8=sys_mmap(16); var m: i64=gg; if m==0{d[0]=48;sys_write(1,d,1)} var k: i64=0; let t: *u8=sys_mmap(16); while m>0{t[k]=48+(m%10);m=m/10;k=k+1} var z: i64=0; while z<k {d[z]=t[k-1-z];z=z+1} if gg>0 {sys_write(1,d,k)} }
70 tr_w(1, "+ bytes) -- special-forces checks " as *u8); { let d: *u8=sys_mmap(16); var m: i64=pass; var k: i64=0; let t: *u8=sys_mmap(16); if m==0{t[0]=48;k=1} while m>0{t[k]=48+(m%10);m=m/10;k=k+1} var z: i64=0; while z<k {d[z]=t[k-1-z];z=z+1} sys_write(1,d,k) }
71 tr_w(1, "/7\n" as *u8)
72 if pass == 7 { sys_exit(0); return 0 }
73 sys_exit(1); return 1
74}