code wiki / _hdl_build / nx_pm_review_log.nx
nx_pm_review_log.nx source
↩ module page · 35 lines · 1871 B
1// nx_pm_review_log.nx -- the PROJECT MANAGER's review log: the team flags DELIVERABLES and GAPS to one
2// parseable log the operator and Claude review TOGETHER (operator: "have the team use the tools and flag
3// if we need additional tooling or capabilities or logic built into the team... by building a log we can
4// review together"). Each line is one fact, clear symbols, one meaning per field:
5// PMLOG kind=<DELIVERABLE|GAP|BLOCKER> area=<area> verdict=<OK|NEEDS-TOOLING|NEEDS-CAPABILITY|NEEDS-LOGIC|NEEDS-DECISION> subject=<s> detail=<d>
6// Append-only (history is sacred); any organ can flag, the PM curates the review. license_tier: ORIGINAL
7
8import "nx_syscalls.nx"
9
10func pm_cstr_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
11func pm_w(fd: i64, s: *u8) -> i64 { return sys_write(fd, s, pm_cstr_len(s)) }
12
13// open the review log for append (0644). history accumulates; we read it together.
14func pm_open(path: *u8) -> i64 { return sys_openat_append(path, 0x1a4) }
15
16// one structured review line.
17func pm_flag(fd: i64, kind: *u8, area: *u8, verdict: *u8, subject: *u8, detail: *u8) -> i64 {
18 pm_w(fd, "PMLOG kind=" as *u8); pm_w(fd, kind)
19 pm_w(fd, " area=" as *u8); pm_w(fd, area)
20 pm_w(fd, " verdict=" as *u8); pm_w(fd, verdict)
21 pm_w(fd, " subject=" as *u8); pm_w(fd, subject)
22 pm_w(fd, " detail=" as *u8); pm_w(fd, detail)
23 pm_w(fd, "\n" as *u8)
24 return 1
25}
26
27// a completed deliverable (verdict OK).
28func pm_deliverable(fd: i64, area: *u8, subject: *u8, detail: *u8) -> i64 {
29 return pm_flag(fd, "DELIVERABLE" as *u8, area, "OK" as *u8, subject, detail)
30}
31
32// a flagged gap -- the team needs something built; `needs` is the NEEDS-* verdict.
33func pm_gap(fd: i64, area: *u8, needs: *u8, subject: *u8, detail: *u8) -> i64 {
34 return pm_flag(fd, "GAP" as *u8, area, needs, subject, detail)
35}