diff --git a/.claude/WAL.md b/.claude/WAL.md index b9faf90..d590eac 100644 --- a/.claude/WAL.md +++ b/.claude/WAL.md @@ -1,24 +1,24 @@ # WAL — auto-generated, không sửa tay -updated: 2026-07-25 | session: S151 (cửa-sổ 1 / phiên-logic 4) | branch: main +closing: S152 @2026-07-26T00:40+07:00 +updated: 2026-07-26T00:30 | session: S152 | branch: main -goal: S151 — bootstrap + bookend @open + trio vòng-2-AUTO + #27 sửa-máy + #12 codify + batch doc-fix ĐỀU XONG; còn queue closeout + refine-actions +goal: S152 XONG bookend@open + trio-AUTO + TRỌN queue memory-ops; /pause cửa-1 chủ-động — còn lại toàn việc GATED (closeout / owner-số / monthly) + 2 thư fan-out chờ kéo chain: -[x] bootstrap + bookend @open (run S151-h24-open-bookend: ring2 8/8-ĐẠT · H1 8-finding · H2 GATE-PASS · ring1 33/3/2 · signal-write 6-fire+4-frozen · #53 ×5/6 recover 100%) -[x] TRIO vòng-2 AUTO đầu tiên (run S151-trio-memory: eval MIXED-12-signal · refine 9-action/6-BÁC · audit 37-ĐẠT/3-TRƯỢT re-chạy-6-số byte-exact · 3 return scribed + 2 đính-chính · spawn-probe 3/3 SỐNG) -[x] #27 gói sửa-máy 3-fix (tick 2-shape fault-inject 7-ca · C1 pin-backtrack 8-ca · H24-2 anchor 4-ca + LIVE: NO-OP sạch · #111 tắt · carry-age hồi sinh 7/9/12 · TOTAL 44→46 = −1giả+3thật; +1 bug tự bắt qua fault-inject: backtracking-through-lookahead) -[x] #12 codified AUTO-1-vòng/phiên giữa 2 bookend (session-start §2.1.9(a) canonical + session-end §L.b(k)(i) trỏ) -[x] batch doc-fix stale 11 chỗ (STATUS: #14-cell-default-Opus5MAX + cite-:227→anchor-không-số-dòng + RAG-2447 + sha-2448393 · HANDOFF:25 counter-25 · README:249 XOÁ-lập-luận-tự-niêm-phong + :302 nhãn-FROZEN · session-start:294 thước-RAG→trỏ-canonical · hmw.js ×2 bỏ-số [node --check OK] · skill ef-core +row-Mig-67 · spawn-model-audit 3→6) -[x] adap-report opus-5-max mục-1 đính-chính @S151: thư 59ce1d0f vắng CẢ HUB (0 hit find+grep toàn AI_INFRA) ⇒ copy bất-khả-thi trung-thực → chuyển hướng hỏi hub -[ ] queue closeout (khi anh gõ /session-end): error-ledger row skeleton-rỗng 2-strike · tally #53 45→50 · harvest-hồi-tố orphan 2026-07-22-S144-bootstrap · spawn-record 9 vai + P1 scribe 3 diary trio + P2 diary harness-audit · thư hub xin re-publish 59ce1d0f (hoặc confirm kênh = chỉ-đạo trực-tiếp) · commit counter+scripts+docs · bookend @close hình B + ring2 · session-log -[ ] refine-action queue (memory-ops, thứ tự A2(harvest)→A3 · B2+:252→D1): R1 6-item 5-vai · A1 lead-gap drain 94,5% · A2 4×_INDEX (spec :284/:247/:279) · A3 harvest→17,1K · A4 fd 5-pointer · D1 gist-of-index cicd acceptance-KÉP · D2 phép-thử-rẻ cặp#1 trước · B1-B8 bàn-giao (B6→#26 owner) -[ ] chờ anh: #21 dải JUMP frozen (nay 6 class ≥3) · #13/#4/#5/#6 UAT production (anh chốt "để đó") · #7-#26 còn lại theo HANDOFF +[x] bootstrap trọn + bookend @open 6-vai + trio AUTO + 5 vá + errata — `runs/2026-07-25-S152-h24-open-bookend/bookend-synthesis.md` + `runs/2026-07-25-S152-trio-memory/trio-synthesis.md` +[x] owner 3 quyết @S152: (30) JUMP để-nguyên-theo-nhịp · (31) 4 persona +NEVER-block (ăn registry SAU RESTART; mfe ăn NGAY) · (32) 5-vòng AUTO — codified 7 site (sleep hết consent) +[x] queue memory-ops TRỌN: A1 (lead-gap 16485B) · A2 (4 _INDEX 126ptr) · A3 (harvest 16420B) · A4 (fd 5ptr) · D1 (cicd idx 19322B) · D2+Fidelity-gate (PASS_WITH_FIXES → F1/F2 đóng, 6/6 infra-left=0) · R1 (mfe 20/20-100%) · B-series (B1/H3·B2·B4-latch·B10 + `-Detail`; FI 9-ca ALL-PASS) · sổ-strike `-Apply` dựng +[x] pause cửa-1: `_pause-1.md` + `_snapshot-1.md` + `_context-s-5.md` PAUSE-1 + §(c) (39 file committed-Δ; sweep 0-hit) +[ ] KÉO 2 thư fan-out (`thu-moi @pause: se=0 all=2`) → `/adap-apply` @bookend kế +[ ] F3/F4 thước-gate-sau (verbatim-verify = `git diff --quiet`; distill-gen so VALUE; MISS = 2-công-cụ 2-phía) — áp cho gate lượt tới +[ ] B5 máy trục-tuổi gist (SỐ NGƯỠNG = owner) · B7 +3 row ring @monthly 2026-08-01 +[ ] @closeout (/session-end): M9 diary (3 DEEP-S151 [H2 FLAG HIGH] + N1/N2 refine + P2-LÀM-LẠI-THẬT [audit R4b] + entries S152) · errata sổ #53: tally=50, commit-subject `1b85713`=53 SAI (ring2 M-1) · B6 owner-hook → HANDOFF slot(26) · vá khối Budget-đã-xoá ef-core SKILL `:109/:117` (ring1 H1-6) · luật turf-handoff "→ lead chuyển phiên sau" · NHẮC ANH RESTART (persona B3 ăn registry) -next: ĐANG ĐÓNG SỔ /session-end (anh gõ + đồng ý 3 queue; #21 = bookend @close chạy DEEP + reset-có-bằng-chứng + gỡ frozen) - -closing: S151 @2026-07-25T19:30+07:00 +next: anh quay lại gõ /tiep → việc kế = kéo 2 thư fan-out (/adap-apply), rồi chờ anh giao task hoặc /session-end chạy khối @closeout verify: -ls .claude/workflows/runs/2026-07-25-S151-trio-memory/harness-audit-return.md -powershell.exe -ExecutionPolicy Bypass -File scripts/session-counter-tick.ps1 -Session S151 -node --check .claude/workflows/hmw.js +ls .claude/sessions/session-5/ # 4 file: _context-s-5 + _pause-1 + _snapshot-1 (+ scaffold-meta trong context) +powershell -ExecutionPolicy Bypass -File scripts/memory-archive-gate.ps1 | grep "total pointers" # 392 resolved 392 failed 0 +powershell -ExecutionPolicy Bypass -File scripts/mfe-eval.ps1 -Tier sub | grep -c "= 100%" # 20 +grep -c "Anti-patterns (NEVER)" .claude/agents/{database-agent,harvest-curator,office-document,tooling-auditor}.md # 1 mỗi file +git log --oneline -3 # thấy `wal: snapshot s5` + `wal: pause` diff --git a/.claude/agent-memory/.mfe-state.json b/.claude/agent-memory/.mfe-state.json index bef69b6..65ba339 100644 --- a/.claude/agent-memory/.mfe-state.json +++ b/.claude/agent-memory/.mfe-state.json @@ -1,5 +1,33 @@ { - "strikes_total": 23, + "strikes_total": 25, + "rca_entries": 14, "at": "2026-07-25", - "rca_entries": 14 + "warn_baseline": 25, + "history": [ + { + "strikes_total": 25, + "rca_entries": 14, + "at": "2026-07-25 23:55" + }, + { + "strikes_total": 25, + "rca_entries": 14, + "at": "2026-07-25 23:55" + }, + { + "strikes_total": 25, + "rca_entries": 14, + "at": "2026-07-25 23:55" + }, + { + "strikes_total": 25, + "rca_entries": 14, + "at": "2026-07-25 23:55" + }, + { + "strikes_total": 25, + "rca_entries": 14, + "at": "2026-07-25 23:55" + } + ] } diff --git a/.claude/agent-memory/cicd-monitor/archive/2026-06.gist.md b/.claude/agent-memory/cicd-monitor/archive/2026-06.gist.md index c34e12f..b05d40c 100644 --- a/.claude/agent-memory/cicd-monitor/archive/2026-06.gist.md +++ b/.claude/agent-memory/cicd-monitor/archive/2026-06.gist.md @@ -63,3 +63,129 @@ note: compression is a REPORTED number, not a target — every marker below is p - VIỆC ‹M13›: FE-both-app 1-line CSS-precedence fix (name `text-white`→`text-white!`). KẾT-LUẬN: PASS commit `37752eb`; bundle BOTH rotate `CNUv1jxY`/`CpOskeS1`; tables88. BÀI-HỌC: even 1-line both-app change → new content-hash both; Tailwind-v4 @layer precedence (unlayered h2 beat text-white). BẤT-NGỜ: SHA256-identical-between-2-apps is a SOURCE claim (git), not runtime DOM-equality. [cao] → substring:"Run #304 (run_number 304, id418) sha=`37752eb`" - VIỆC: S69 FE-both-app Văn-phòng-số foundation + index.css sync + BE menu-seed `Off_Dashboard` (NO-EF-mig). KẾT-LUẬN: PASS commit `a8bbdae`; bundle BOTH rotate `Bl2o_kUq`/`BImrKQNn`; **no-mig top stays Mig52** (menu-seed = DbInitializer runtime row-insert NOT migration); menu-seed verified via MenuItems SELECT; office-hidden = perm row only-Admin 1/13. BÀI-HỌC: prod CI bundle-hash ≠ local-build-hash is NORMAL (CI rebuild) — FAIL only if NOT-rotated-from-baseline. BẤT-NGỜ: sqlcmd string-literal doubled `''x''` BREAKS in PS → build via `[char]39` concat. [cao] → substring:"Run #305 (run_number 305, id419) sha=`a8bbdae`" - VIỆC: S70 FE-only re-skin Văn-phòng-số 10-page PURO. KẾT-LUẬN: PASS commit `c556f6c`; bundle BOTH rotate `Wt54PHYl`/`B99fMU6X`; office-API live (proposals/it-tickets/meeting-rooms/employees 200); office-hidden confirmed `Off_Dashboard` admin-only / Drafter CanRead=0. BÀI-HỌC: **CanRead=0 perm-ROWS exist but ≠ access** (menu gates on CanRead=1) — must filter CanRead=1, existence≠access; office-hidden is AMBIENT (FE-only can't touch Permissions seed). BẤT-NGỜ: `/api/workflow-apps`→404 = wrong-route-guess NOT regression (FE-only can't change BE routing). [cao] → substring:"Run #306 (run_number 306, id420) sha=`c556f6c`" + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-06.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. *(Đính-chính nhãn @lead-review: `#N > 83` = Run/PR-ref CI, KHÔNG phải gotcha — repo max #83; đổi nhãn `ref`.)* + +- ref **#240** · trích: "rrect gotcha #51) + #359/#243/#242/#241/#240 + S35/S36 startup → `archive/2026-05-q4.md` + git d2f52ba (S40 curate):** Run #359 G-O2 Meeting Mig 36 ·" +- ref **#241** · trích: "ed correct gotcha #51) + #359/#243/#242/#241/#240 + S35/S36 startup → `archive/2026-05-q4.md` + git d2f52ba (S40 curate):** Run #359 G-O2 Meeting Mig" +- ref **#242** · trích: "qDvsqr`. Confirms anti-pattern #3 + Run #242 lesson: NEVER trust bundle hash until status=success; mid-deploy can show a 3rd transient hash. **Mig 44+" +- ref **#243** · trích: "for BE-only — NOT ship-fail, mirror Run #243/#368; verified pre-deploy + post-success + +5s re-confirm, NO transient, NO unexpected rotation). **NO mi" +- ref **#274** · trích: "dmin `DuU7OTym` + user `DWyeTzf3`** (== #274 UNCHANGED ✓ CORRECT BE-only — verified AFTER status=success, no FE leak). **NO migration** — prod `__EFMi" +- ref **#275** · trích: "orkItems=71** — counts vs S59 (PE was 1 #275, Suppliers 22 #278) GREW from legit ongoing-UAT (this commit = FE+BE-service, NO DbInitializer/seed chang" +- ref **#277** · trích: "- **2026-06-11 Run #277 (run_number 277) sha=`faed59f` PASS ~4m09s (S59-đợt5 FE-only ×2 — NEW ui/SearchableSelect combobox gõ-lọc-bỏ-dấu + PeWorkspace" +- ref **#278** · trích: "nts vs S59 (PE was 1 #275, Suppliers 22 #278) GREW from legit ongoing-UAT (this commit = FE+BE-service, NO DbInitializer/seed change → cannot resurrec" +- ref **#279** · trích: "eDetailTabs+PeHeaderForm ×2 app). **Run #279 (id393) sha=`f21c55d` (NCC table-fixed UAT vòng3) = `cancelled` @18:22:33 — supersede-BENIGN:** #280 push" +- ref **#281** · trích: "ig]`. **↳FINAL-v2 (tối): `80b64dd` (Run #281 cancelled-BENIGN) gỡ 'Điều khoản thanh toán' 3-form ×2 → superseded bởi `792c030` Run #282 PASS ~4m (UAT" +- ref **#282** · trích: "-form ×2 → superseded bởi `792c030` Run #282 PASS ~4m (UAT vòng6 bỏ nút '+Thêm hạng mục' PeDetailTabs ×2). Ancestor 80b64dd⊂792c030=TRUE ✓ (792c030 ch" +- ref **#284** · trích: "-a001-preserved]`. **↳đợt2 (14:14): Run #284 (run_number 284, id398) sha=`6db195d` PASS ~4m31s — GỠ hành động 'Từ chối' khỏi quy trình PE (chỉ còn Duy" +- ref **#289** · trích: "ns the 6 current-session 06-16 deploys (#289-#295)." +- ref **#290** · trích: "IRMED untouched @ baseline c98030f (Run #290):** admin bundle `DRob3iVl` (FROZEN=baseline ✓ NOT rotated — picker NOT shipped) · user `DxK3fCfh` (FROZE" +- ref **#292** · trích: "otcha #65 + summarized inline in the L1 #292 entry, so not orphaned. #383 entry (was tagged VI-TRI-LAC in L1 FIFO) now correctly archived." +- ref **#294** · trích: "NO BE, NO migration; follow-up S69 Run #294 same page):** Push `ec517f7..456c7a7` 1 file `fe-user/src/pages/hrm/EmployeesListPage.tsx` (309+/262−, 57" +- ref **#300** · trích: "deploy 6/6 session after #297/#298/#299/#300/#301 all PASS):** Push 2 files `{fe-admin,fe-user}/src/components/pe/PeDetailTabs.tsx`. `.tsx` → not in p" +- ref **#301** · trích: "y 6/6 session after #297/#298/#299/#300/#301 all PASS):** Push 2 files `{fe-admin,fe-user}/src/components/pe/PeDetailTabs.tsx`. `.tsx` → not in paths-" +- ref **#307** · trích: "FIFO-trimmed from L1 hot. L1 kept #308/#307 full + stubs." +- ref **#308** · trích: "move, FIFO-trimmed from L1 hot. L1 kept #308/#307 full + stubs." +- ref **#315** · trích: "ignore. deploy 17/17 session after #297–#315 all PASS):** Push HEAD=`e33481e` (nothing unpushed). `git diff --name-only e33481e~1 e33481e -- '*Persist" +- ref **#316** · trích: "18 deterministic; NOTE prompt said 'Run #316' but #316=CANCELLED `ae957c4` — actual run for `e33481e` = #318 matched by head_sha NOT run_number). **★" +- ref **#318** · trích: "- **2026-06-19 S76 Run #318 (run_number 318, id=432) sha=`e33481e` PASS ~4m58s (FULL-STACK: BE Mig 56 `AddProBudgetSplitToPeWorkItemBudget` — PE ngân-" +- ref **#320** · trích: "tated too. 6th-deploy session ALL-PASS (#320?–#325 streak). TOOLING: ps1-file→base64-EncodedCommand UTF-16LE for SSH (appsettings-read + sqlcmd); poll" +- ref **#324** · trích: "dmin `C6fx-0ea`/user `N3sW4Div` = EXACT #324 live = clean baseline + Mig57 `AddPeSuggestedPriceNotes` history-top + tables88. Poll iter5 status=succes" +- ref **#325** · trích: "- **2026-06-19 S83 Run #325 (id=439) sha=`e29391e` PASS ~4m39s (FE-ONLY tiny, 6th deploy session, NO-mig-NO-BE): 2 files `PeDetailTabs.tsx` ×2-app SHA" +- ref **#327** · trích: "0 id=444; #329=`e823694`+#328=`424131d`+#327=`fa6654b` all `success` in task list = prompt's stated priors). Poll-loop: first attempt 12-iter exhauste" +- ref **#328** · trích: "matched run#330 id=444; #329=`e823694`+#328=`424131d`+#327=`fa6654b` all `success` in task list = prompt's stated priors). Poll-loop: first attempt 1" +- ref **#329** · trích: "`7886fd03dd43` matched run#330 id=444; #329=`e823694`+#328=`424131d`+#327=`fa6654b` all `success` in task list = prompt's stated priors). Poll-loop:" +- ref **#330** · trích: "- **2026-06-19 S78 Run #330 (run_number 330, id=444) sha=`7886fd0` PASS ~4m56s (CROSS-STACK NO-MIG — BE enum-only `PurchaseEvaluationAttachmentPurpose" +- ref **#346** · trích: "admin `Pltrs5ku` user `Foiw55B6` = #347/#346 — correct, D2 FE logic-only no new utility class** (gotcha #69-inverse). Real-ship proven (SPA-trap defea" +- ref **#347** · trích: "MEMORY.md (S90 #465, S89 #348, S88-quad #347 verbatim, byte-exact).**" +- ref **#348** · trích: "chived from L1 MEMORY.md (S90 #465, S89 #348, S88-quad #347 verbatim, byte-exact).**" +- ref **#350** · trích: "kUPd`** (pre-deploy LIVE baseline = Run #350 web.config, NOT brief's stale #348 `BQq2eTP6`/`dHa64I59`); **css FROZEN admin `DWQ-DgfZ` user `Dr0-ikKX`" +- ref **#359** · trích: "RASTRUCTURE-gated correct gotcha #51) + #359/#243/#242/#241/#240 + S35/S36 startup → `archive/2026-05-q4.md` + git d2f52ba (S40 curate):** Run #359 G-" +- ref **#365** · trích: "- **2026-05-30 Run #365 sha=`75df04e` PASS ~4m05s (S42 P11-A fix workflow picker 2-bug + SetWorkflow endpoint, NO mig):** 11 files BE+FE×2+test. Bundl" +- ref **#366** · trích: "4.6 N/A). 0 regression. Note: prev run #366 (ffb2062 docs STATUS update) was a CODE-path push w/ status=success — NOT docs-only-skipped (commit touch" +- ref **#369** · trích: "- **2026-06-03 Run #369 (run_number 255) sha=`350b2bf` PASS ~4m13s (S48 FE-only login subtitle a11y `text-slate-500→600`, ZERO BE/Mig):** Push range `" +- ref **#380** · trích: "prev `17b23a4` (governance+hmw.js → Run #380 **cancelled**, superseded — correct, no FE/BE contract change) then `dd117b7` (PRODUCT, Run 381 = the dec" +- ref **#465** · trích: "ow FIFO-archived from L1 MEMORY.md (S90 #465, S89 #348, S88-quad #347 verbatim, byte-exact).**" +- gotcha **#48** · trích: "Friend ROI 4× cumulative (S22 #44 + S25 #48 + S29 ApplicableType + S29 DemoSeed).**" +- gotcha **#64** · trích: "l executed on real prod data per gotcha #64.** **★ BUNDLE BOTH ROTATE (FE 2-app PeDetailTabs+PeWorkflowPanel + admin ApprovalWorkflowsV2Page ⟹ both EX" +- gotcha **#69** · trích: "2-app real source change ⟹ EXPECTED per #69; verified AFTER status=success + STABLE 2nd-fetch identical-size no-transient per anti#3): admin JS ROTATE" +- gotcha **#70** · trích: "getFeatures (−56/+57) + HoSoLink trim + #70 guard + Dtos comment. Files 12: BE 5 (Dtos+4 features) + FE **both apps** 4 (PeDetailTabs+types ×2) + 3 te" +- Mig **Mig 35** · trích: "#242 FE inline forms 5 satellite · #241 Mig 35 HRM foundation · #240 satellite CRUD. Discovery #7 path-filter eval/** + #8 collection `proj_*`. KEY ab" +- Mig **Mig 36** · trích: "a (S40 curate):** Run #359 G-O2 Meeting Mig 36 · #243 HrmConfig BE 16 endpoint (BE-only bundle unchanged anti-pattern verify) · #242 FE inline forms 5" +- Mig **Mig 41** · trích: "BLA09-qv` + user `CX79e2kZ→CXvejOE-`. **Mig 41 auto-applied prod** (latest=`20260530021936_WireWorkflowAppsApprovalV2`). Tables 84→**90** (+5: Leave/O" +- Mig **Mig 42** · trích: "(S42 P11-B LeaveBalance business logic, Mig 42):** Code commit 22 files (4 BE: Domain `LeaveBalance.cs` + App `LeaveBalanceFeatures.cs`/`LeaveOtApprov" +- Mig **Mig 45** · trích: "otcha #57 filtered-unique 3 HRM catalog Mig 45 — BE+FE×2+2Mig+tests):** Push `f8179c5..30a99aa` 1 commit 28 files: BE Domain `Vehicle.cs`/`Driver.cs`" +- Mig **Mig 47** · trích: "MasterCatalogUniqueIndexesByIsDeleted` (Mig 47) == repo latest, GIỮ NGUYÊN ✓ (DepartmentId reuse). sys.tables=**93** stable (no new table). Test gate" +- Mig **Mig 51** · trích: "on`** ✓ (Mig 52; ADVANCED from prev top Mig 51 `AddDepartmentParentId`; DbInitializer auto-migrate on startup ran — api ready=200 confirms boot OK pos" +- Mig **Mig 55** · trích: "loy hadn't shipped): prod history-top = Mig 55 `AddCcmNoteToPeWorkItemBudget`, ProInitial+ProAdjustment cols ABSENT (only ProEstimateAmount present)," +- Mig **Mig 56** · trích: "a=`e33481e` PASS ~4m58s (FULL-STACK: BE Mig 56 `AddProBudgetSplitToPeWorkItemBudget` — PE ngân-sách MA-TRẬN 3 cột Dự-án|PRO|CCM, PRO split số ban-hành" +- Mig **Mig 57** · trích: "nfirmed POST-deploy): history-top STILL Mig 57 `20260619070051_AddPeSuggestedPriceNotes` == repo HEAD latest (`ls Migrations/*.cs` top), did NOT advan" +- Mig **Mig41** · trích: "ons 4 WorkflowApps):** 1 commit BE+FE×2+Mig41+Tests. Status=success iter3. Bundle rotate admin `cWAXid0q→BLA09-qv` + user `CX79e2kZ→CXvejOE-`. **Mig 4" +- Mig **Mig42** · trích: "icationDbContext + DbContext + Config + Mig42 3-file + 2 FE `WorkflowAppDetailPage`×2 +`workflowApps.ts`×2 + 2 tests + 4 agent-memory .md). Started 11" +- Mig **Mig44** · trích: "DbContext + DbInitializer + MenuKeys + Mig44/45 (6 files) + FE×2 (HrmConfigsPage/Layout/menuKeys/hrm-config.ts) + `HrmConfigFilteredUniqueTests.cs` (" +- Mig **Mig45** · trích: "LeaveType/Shift/OtPolicy were NULL pre-Mig45 → now filtered = proof applied). Health live+ready 200 + admin/eoffice index 200. New endpoint `GET /api" +- Mig **Mig50** · trích: "eplaceBudgetModuleWithPeWorkItemBudgets Mig50 chain intact). **sys.tables=88 verified** (sqlcmd COUNT excl mighist — unchanged). **★ OFFICE-HIDDEN CON" +- Mig **Mig51** · trích: "GUYÊN ✓ (prev-2 = AddDepartmentParentId Mig51 + ReplaceBudgetModuleWithPeWorkItemBudgets Mig50 chain intact). **sys.tables=88 verified** (sqlcmd COUNT" +- Mig **Mig55** · trích: "-deploy re-query): history-top advanced Mig55→Mig56 `20260619024427_AddProBudgetSplitToPeWorkItemBudget` == repo HEAD ✓ (DbInitializer auto-migrate-on" +- Mig **Mig56** · trích: "s/.Designer.cs/Snapshot) — REAL EF mig. Mig56 Up() read = **2× `AddColumn`: `ProAdjustmentAmount` + `ProInitialAmount` both decimal(18,2) pre" +- Mig **Mig57** · trích: "v` = EXACT #324 live = clean baseline + Mig57 `AddPeSuggestedPriceNotes` history-top + tables88. Poll iter5 status=success (`tasks` anon-API head_sha" +- guard-kw **filtered UNIQUE** · trích: "ps+recreates `IX_Holidays_Year_Date` as filtered UNIQUE `WHERE [IsDeleted]=0`, was unfiltered) + HolidayConfiguration.cs edit + Case-7 test flip. 7 fi" +- guard-kw **lost-update** · trích: "omic ExecuteUpdate + Serializable tx vs lost-update) + `WorkflowAppsFeatures.cs` (authz reorder Forbidden-before-NotFound) + `DocxRenderer.cs` (null-g" +- guard-kw **Restrict** · trích: "`** + **FK→LeaveTypes del=NO_ACTION** (=Restrict) ✓. New endpoint smoke: `GET /api/leave-balances/my` unauth=**401** (route live not 404) + admin auth" +- guard-kw **Serializable** · trích: "valFeatures.cs` (atomic ExecuteUpdate + Serializable tx vs lost-update) + `WorkflowAppsFeatures.cs` (authz reorder Forbidden-before-NotFound) + `DocxR" +- file-ref **App.tsx** · trích: ",KpiCard,WidgetCard,OfficeDashboardPage,App.tsx,Layout.tsx,menuKeys.ts} + fe-admin index.css) + BE 2 (MenuKeys.cs + DbInitializer.cs) + 4 agent-memory" +- file-ref **DbInitializer.cs** · trích: "PurchaseEvaluationsListPage` ×2 app) + `DbInitializer.cs` + `s59-rename-workitems-pmh.sql` + generated.md. `.cs`+`.tsx` → full pipeline RAN. GITEA_TOK" +- file-ref **Designer.cs** · trích: "ce/Migrations*'` = 3 files (Mig 56 .cs/.Designer.cs/Snapshot) — REAL EF mig. Mig56 Up() read = **2× `AddColumn`: `ProAdjustmentAmount` + `Pro" +- file-ref **DocxRenderer.cs** · trích: "z reorder Forbidden-before-NotFound) + `DocxRenderer.cs` (null-guard) + 4 test files (+12 → 216→**228**) + 6 agent-memory `.md`. `.cs`+test present →" +- file-ref **Driver.cs** · trích: "ommit 28 files: BE Domain `Vehicle.cs`/`Driver.cs` + App `HrmConfigFeatures.cs`+IApplicationDbContext + `HrmConfigsController` + 5 Config (Driver/Vehi" +- file-ref **EmployeesListPage.tsx** · trích: "extrabold`→`text-lg font-bold`. 2 file `EmployeesListPage.tsx` fe-user+fe-admin SHA256-IDENTICAL `8BBAEC34…`, 1-line each, NO BE/mig/index.css; deploy" +- file-ref **HolidayConfiguration.cs** · trích: "WHERE [IsDeleted]=0`, was unfiltered) + HolidayConfiguration.cs edit + Case-7 test flip. 7 files, all BE+tests, none in paths-ignore → CI ran. Poll it" +- file-ref **HrmConfigFeatures.cs** · trích: "Domain `Vehicle.cs`/`Driver.cs` + App `HrmConfigFeatures.cs`+IApplicationDbContext + `HrmConfigsController` + 5 Config (Driver/Vehicle/LeaveType/OtPo" +- file-ref **HrmConfigFilteredUniqueTests.cs** · trích: "sPage/Layout/menuKeys/hrm-config.ts) + `HrmConfigFilteredUniqueTests.cs` (+5 test → 181→**186**). All BE/FE/Mig, none in paths-ignore → CI ran. Poll i" +- file-ref **ItTicketReassignAuthzTests.cs** · trích: "cal) + `workflowApps.ts`×2 (+2 type) + `ItTicketReassignAuthzTests.cs` (+13 → 203→**216**) + 6 agent-memory `.md`. `.cs`+`.tsx` present → NOT docs-ski" +- file-ref **ItTicketsController.cs** · trích: "nItTicketHandler` authz Admin-OR-IT) + `ItTicketsController.cs` (NEW `GET /it-tickets/assignable-staff` + `/assign` LOWERED Authorize-Roles) + FE×2 `I" +- file-ref **ItTicketsPage.tsx** · trích: "ssign` LOWERED Authorize-Roles) + FE×2 `ItTicketsPage.tsx` (SHA256-identical) + `workflowApps.ts`×2 (+2 type) + `ItTicketReassignAuthzTests.cs` (+13 →" +- file-ref **Layout.tsx** · trích: ",WidgetCard,OfficeDashboardPage,App.tsx,Layout.tsx,menuKeys.ts} + fe-admin index.css) + BE 2 (MenuKeys.cs + DbInitializer.cs) + 4 agent-memory `.md`." +- file-ref **LeaveBalance.cs** · trích: ":** Code commit 22 files (4 BE: Domain `LeaveBalance.cs` + App `LeaveBalanceFeatures.cs`/`LeaveOtApprovalFeatures` deduction hook + `LeaveBalancesCont" +- file-ref **LeaveBalanceFeatures.cs** · trích: "(4 BE: Domain `LeaveBalance.cs` + App `LeaveBalanceFeatures.cs`/`LeaveOtApprovalFeatures` deduction hook + `LeaveBalancesController` + IApplicationDb" +- file-ref **LeaveOtApprovalFeatures.cs** · trích: "5825..a20cde8` 1 commit 13 files: 3 BE `LeaveOtApprovalFeatures.cs` (atomic ExecuteUpdate + Serializable tx vs lost-update) + `WorkflowAppsFeatures.cs" +- file-ref **LoginPage.tsx** · trích: "CODE 2 files `fe-{admin,user}/src/pages/LoginPage.tsx` (1-line each, slate-500→600 subtitle contrast). Mixed push: `.tsx` present → **NOT path-filter" +- file-ref **MenuKeys.cs** · trích: "in mạnh) + BE menu key `Off_Dashboard` (MenuKeys.cs L100 + DbInitializer.cs L1825 seed parent=`Off` Order0 LayoutDashboard); deploy 9/9 session after" +- file-ref **PeDetailTabs.tsx** · trích: "seEvaluationBudgetCommandValidator`) + `PeDetailTabs.tsx` ×2 app (allowNegative row8 + banner 'Vượt ngân sách') + `PeWorkItemBudgetTests.cs` (flip 1 t" +- file-ref **PeSubmitGuardAndBypassTests.cs** · trích: "-bypass) + `PeDetailTabs.tsx` ×2 app + `PeSubmitGuardAndBypassTests.cs` (NEW, +14 → 240→**254** expected) + 3 agent-memory `.md` (harvest-curator/inve" +- file-ref **PeWorkItemBudget.cs** · trích: "ures+PurchaseEvaluationFeatures, Domain PeWorkItemBudget.cs, Config PeWorkItemBudgetConfiguration} + 3 Mig-file + FE 6 {PeDetailTabs+PeWorkflowPanel+t" +- file-ref **PeWorkItemBudgetTests.cs** · trích: "tive row8 + banner 'Vượt ngân sách') + `PeWorkItemBudgetTests.cs` (flip 1 test). `.cs`+`.tsx` → full pipeline RAN. GITEA_TOKEN+PROD_DB_PW empty → anon" +- file-ref **PeWorkflowPanel.tsx** · trích: "aluationWorkflowService.cs` guard + FE `PeWorkflowPanel.tsx` ×2 app + 2 NEW test `PurchaseEvaluationPolicyTests`/`PurchaseEvaluationWorkflowServiceGua" +- file-ref **PeWorkspaceCreateView.tsx** · trích: "list+5-tab) + PE×2 (`PeDetailTabs.tsx`+`PeWorkspaceCreateView.tsx`+`types/purchaseEvaluation.ts` both apps, mục E hyperlink + label rename). `.cs`+`.t" +- file-ref **Project.cs** · trích: "ProjectMasterFields` (3-file) + Domain `Project.cs` (+Year/Investor/Location/Package nullable) + `ProjectConfiguration.cs` + App `ProjectFeatures.cs`" +- file-ref **ProjectConfiguration.cs** · trích: "/Investor/Location/Package nullable) + `ProjectConfiguration.cs` + App `ProjectFeatures.cs` + **`DbInitializer.cs` NEW `SeedRealMasterDataAsync` (UNGA" +- file-ref **ProjectFeatures.cs** · trích: "ble) + `ProjectConfiguration.cs` + App `ProjectFeatures.cs` + **`DbInitializer.cs` NEW `SeedRealMasterDataAsync` (UNGATED, per-code idempotent)** + FE" +- file-ref **ProjectsPage.tsx** · trích: ", per-code idempotent)** + FE×2 `master/ProjectsPage.tsx` + `types/master.ts` + 1 test `MasterCatalogFilteredUniqueTests.cs` + 4 agent-memory .md. `.c" +- file-ref **PurchaseEvaluation.cs** · trích: "chaseEvaluations_WorkItemId`) + Domain `PurchaseEvaluation.cs` + Config + Features + DbInitializer (perm + `LockDemoSampleUsersAsync` + menu regroup)" +- file-ref **PurchaseEvaluationAttachment.cs** · trích: "lowPanel+types ×2-app} + 1 Domain enum `PurchaseEvaluationAttachment.cs`. `git diff -- '*Persistence/Migrations*' '*Migrations*'` = **EMPTY = stronges" +- file-ref **PurchaseEvaluationConfiguration.cs** · trích: "E `PurchaseEvaluation.cs`(+HoSoLink) + `PurchaseEvaluationConfiguration.cs` + `PurchaseEvaluationFeatures.cs`(Create/Update cmd +trailing optional `Ho" +- file-ref **PurchaseEvaluationDtos.cs** · trích: "+trailing optional `HoSoLink=null`) + `PurchaseEvaluationDtos.cs`(Detail DTO +hoSoLink) + Mig 52 `20260616035929_AddHoSoLinkToPurchaseEvaluation`(3-f" +- file-ref **PurchaseEvaluationFeatures.cs** · trích: "** Push `79ef8da..7926c21` 4 files: BE `PurchaseEvaluationFeatures.cs` (gỡ 1 FluentValidation rule `ExpectedRemainingAmount >= 0` trong `AdjustPurchas" +- file-ref **PurchaseEvaluationPolicy.cs** · trích: "còn Duyệt/Trả lại; CROSS-STACK Domain `PurchaseEvaluationPolicy.cs` + Infra `PurchaseEvaluationWorkflowService.cs` guard + FE `PeWorkflowPanel.tsx` ×" +- file-ref **PurchaseEvaluationWorkflowService.cs** · trích: "e):** Push `792c030..37122f0` 7 files: `PurchaseEvaluationWorkflowService.cs` (BE submit-guard + drafter-bypass) + `PeDetailTabs.tsx` ×2 app + `PeSubm" +- file-ref **PurchaseEvaluationsListPage.tsx** · trích: "E):** Push `1577927..56882ac` 3 files: `PurchaseEvaluationsListPage.tsx` ×2 app (SHA256 mirror identical, Panel-1 tree drop NCC tier) + `scripts/s59-w" +- file-ref **SLASH.ps1** · trích: "to `.ps1` + `powershell -File 'ABS/FWD/SLASH.ps1'`; Gitea `tasks` via `Invoke-RestMethod` (match `head_sha -eq sha`, `?limit=N` honored URI-direct);" +- file-ref **SuppliersController.cs** · trích: "PeDetailTabs+PeWorkflowPanel ×2 app) + `SuppliersController.cs`. `.cs`+`.tsx` → full pipeline RAN. GITEA_TOKEN+PROD_DB_PW empty → anon Gitea API + DB" +- file-ref **Vehicle.cs** · trích: ".30a99aa` 1 commit 28 files: BE Domain `Vehicle.cs`/`Driver.cs` + App `HrmConfigFeatures.cs`+IApplicationDbContext + `HrmConfigsController` + 5 Config" +- file-ref **WorkflowAppsFeatures.cs** · trích: "te + Serializable tx vs lost-update) + `WorkflowAppsFeatures.cs` (authz reorder Forbidden-before-NotFound) + `DocxRenderer.cs` (null-guard) + 4 test f" +- file-ref **config.ts** · trích: "E×2 (HrmConfigsPage/Layout/menuKeys/hrm-config.ts) + `HrmConfigFilteredUniqueTests.cs` (+5 test → 181→**186**). All BE/FE/Mig, none in paths-ignore →" +- file-ref **master.ts** · trích: "FE×2 `master/ProjectsPage.tsx` + `types/master.ts` + 1 test `MasterCatalogFilteredUniqueTests.cs` + 4 agent-memory .md. `.cs`+`.tsx`+Mig present → ful" +- file-ref **menuKeys.ts** · trích: ",OfficeDashboardPage,App.tsx,Layout.tsx,menuKeys.ts} + fe-admin index.css) + BE 2 (MenuKeys.cs + DbInitializer.cs) + 4 agent-memory `.md`. `.tsx`/`.cs" +- file-ref **purchaseEvaluation.ts** · trích: "tsx`+`PeWorkspaceCreateView.tsx`+`types/purchaseEvaluation.ts` both apps, mục E hyperlink + label rename). `.cs`+`.tsx`+Mig → full pipeline RAN. GITEA" +- file-ref **tmpx.ps1** · trích: "'` (Bash EATS backslash in `tmp\x.ps1`→`tmpx.ps1`); parse Gitea `tasks` via `Invoke-RestMethod`+native object (match `head_sha -like sha*`, `limit=N`" +- file-ref **workflowApps.ts** · trích: "tTicketsPage.tsx` (SHA256-identical) + `workflowApps.ts`×2 (+2 type) + `ItTicketReassignAuthzTests.cs` (+13 → 203→**216**) + 6 agent-memory `.md`. `.c" + +### BỔ-SUNG-2 [F1/F2 sau Fidelity-gate @S152 — mở đuôi infra {yml,yaml,json,slnx,csproj,sql,config} + guard IsUnique/optimistic. N/A CỐ-Ý (F5): bundle-hash xoay #69 · tên-giả phép-thử ZZfakehash* · đuôi .md] + +- file-ref **SolutionErp.slnx** · trích: "pattern #2 no-speculate): `dotnet build SolutionErp.slnx -c Release` → **error CS7036** `tests/SolutionErp.Infrastructure.Tests/Application/MasterCata" +- file-ref **appsettings.Production.json** · trích: "empty → anon Gitea API + DB pw từ prod `appsettings.Production.json`→`ConnectionStrings.Default`. Run IN-PROGRESS first poll (running 11:15) — correct" +- file-ref **deploy.yml** · trích: "final FULL-object parse `\{'id':381,...deploy.yml[^}]*\}` confirmed status=success. **Bundle ROTATE BOTH** admin `4SUwDLD8→CP4CB1ym` + user `XdKzt9LL" +- file-ref **s59-wipe-demo-workitems.sql** · trích: "Sol chốt giữ đúng 71 mã PMH + `scripts/s59-wipe-demo-workitems.sql` ran TAY prod TRƯỚC push 86→71):** Push `0eafcd3..bbd1554` 2 files `DbInitializer." +- file-ref **s59-wipe-testing-data.sql** · trích: "Panel-1 tree drop NCC tier) + `scripts/s59-wipe-testing-data.sql` (ran TAY prod TRƯỚC push, NOT in pipeline). `.tsx` present → pipeline RAN. ⚠️ GITEA" diff --git a/.claude/agent-memory/cicd-monitor/archive/_INDEX.md b/.claude/agent-memory/cicd-monitor/archive/_INDEX.md index a9a5a2d..716a04a 100644 --- a/.claude/agent-memory/cicd-monitor/archive/_INDEX.md +++ b/.claude/agent-memory/cicd-monitor/archive/_INDEX.md @@ -1,5 +1,7 @@ # CI/CD Monitor — Archive INDEX (table of contents, NO content) +> 🗜️ **gist-of-index @S152 (D1 queue):** desc-verdict nén ~45c (desc đầy-đủ cũ = git-history file này); **toàn bộ anchor substring giữ NGUYÊN-VĂN 100%** — KHÔNG split (gate chỉ đọc `_INDEX.md`). + > **Purpose:** L2 archive is "dark-matter" (not in RAG). This index is the map: 1 line per archived record so a future spawn can locate + open the right verbatim block on-demand without reading 220KB cold. > **Pointer style = SUBSTRING (Ctrl-F) primary.** Each line ends `→ · substring:""`. The string is grep-verified `count==1` inside its target file (76/76 unique at build time). Open the file, Ctrl-F the string → lands on the record start. Fallback if a future edit shifts text: search the bare `Run #NNN` + nearest date. > **Pointer key choice:** keyed on 7-char git sha OR `Run #NNN (run_number NNN, idNNN)` heading-prefix. `2026-06.md` has ZERO markdown headings (all bullet records) → anchor-slug impossible there → sha/run-number used. `2026-05-runs.md` mixes 6 meta-headers + 20 run-records under near-identical `### DATE — Run #NNN sha=… VERDICT=` headings (slug-collision) → sha disambiguates. Some `Run #NNN` appear in BOTH a heading AND a body cross-ref → pointer keyed on the record-START form (`Run #NNN (run_number…` / `sha=\`…\` PASS`) which is unique. @@ -14,124 +16,124 @@ ## 2026-07 (file: `archive/2026-07.md`) -- 2026-07-01 · S96+S97 FINAL-SESSION-REVIEW 11-commit day #478-#484 ALL-HEALTHY whole-session GO · CLEAN, bundle rotated-post-#484 mEGqlNWc/Dnrp4PU1 (#69 confirmed data-fix-rotate) · `2026-07.md` · substring:"S96+S97 FINAL-SESSION-REVIEW (2026-07-01 end" -- 2026-07-01 · S97 #484 DATA-FIX Mig 61 backfill EndedByLevelFinalize từ Changelogs (fix Mig 60 wrong-table #79) · PASS backfill-flip A/005+A/008=1 control-A/010=0, Mig61-history-top, smoke-200×3 · `2026-07.md` · substring:"S97 #484 (id=484, run_number 370)" +- 2026-07-01 · S96+S97 FINAL-SESSION-REVIEW 11-commit day #478-#484 ALL-HEALTHY… · CLEAN, bundle rotated-post-#48… · `2026-07.md` · substring:"S96+S97 FINAL-SESSION-REVIEW (2026-07-01 end" +- 2026-07-01 · S97 #484 DATA-FIX Mig 61 backfill EndedByLevelFinalize từ Changel… · PASS backfill-flip A/005+A/008… · `2026-07.md` · substring:"S97 #484 (id=484, run_number 370)" ## 2026-06 (file: `archive/2026-06.md`) -- 2026-06-19 · S78 #330 cross-stack NO-MIG enum ApprovalAttachment=5 (attach-on-approve) · PASS bundle-BOTH-rotate js+css CsJetgZH/BVS0ApIm, endpoint bodyless-POST-411-then-401-wired, Mig-frozen-57, test354 · `2026-06.md` · substring:"Run #330 (run_number 330, id=444)" -- 2026-06-19 · S76 #318 full-stack Mig56 ProInitial/ProAdjust VERIFIED-APPLIED-PROD · PASS backfill-4rows-0violation-gotcha64, bundle-BOTH+css-rotate BhFDF9IJ/BAkuRl3C, history-advance-55→56, tables88, test344 · `2026-06.md` · substring:"Run #318 (run_number 318, id=432)" -- 2026-06-19 · S83 #325 FE-only tiny budget-subitem indent/dash · PASS bundle-BOTH-js-rotate css-frozen BhnNMucS/B1VebpXc, Mig-frozen-57, tables88, test351 · `2026-06.md` · substring:"Run #325 (id=439)" -- 2026-06-17 · FE-only re-skin Văn phòng số 10-page PURO · PASS bundle-BOTH-rotate Wt54PHYl/B99fMU6X, office-hidden confirmed, tables88 · `2026-06.md` · substring:"Run #306 (run_number 306, id420) sha=`c556f6c`" -- 2026-06-17 · FE-both-app Văn phòng số foundation + index.css + BE menu-seed · PASS bundle-BOTH-rotate Bl2o_kUq/BImrKQNn, no-mig stays Mig52, menu-seed verified · `2026-06.md` · substring:"Run #305 (run_number 305, id419) sha=`a8bbdae`" -- 2026-06-16 · FE-both-app 1-line CSS-precedence fix (name text-white!) · PASS bundle-BOTH-rotate CNUv1jxY/CpOskeS1, tables88 · `2026-06.md` · substring:"Run #304 (run_number 304, id418) sha=`37752eb`" -- 2026-06-16 · FE-both-app Hồ sơ NS banner text-polish · PASS bundle-BOTH-rotate D532XZKG/CuFaBoWt, docs-in-range-no-suppress · `2026-06.md` · substring:"Run #303 sha=`6983609` PASS" -- 2026-06-16 · FE-both-app PE Link-hồ-sơ file:// render · PASS bundle-BOTH-rotate CcrZqfht/DniDFUB_, tables88 · `2026-06.md` · substring:"Run #302 (run_number 302, id416) sha=`536dd6b`" -- 2026-06-16 · TESTS-ONLY BE +23 test (286) · PASS bundle-BOTH-frozen xkSz9BfE/BumgrwCJ, CI-gate-inferred, python3-broken-use-PS · `2026-06.md` · substring:"Run #299 (id413) sha=`bcd619d`" -- 2026-06-16 · FE-Admin MIRROR Hồ sơ NS from fe-user · PASS bundle-asymmetric-NGƯỢC admin-rotate xkSz9BfE/user-frozen, poll-parser-bug-use-python3 · `2026-06.md` · substring:"Run #298 (run_number 298, id412) sha=`292d64d`" -- 2026-06-16 · FE-User Hồ sơ NS cosmetic brand800 · PASS bundle-asymmetric user-rotate BumgrwCJ/admin-frozen, health-ready-not-health · `2026-06.md` · substring:"Run #297 (run_number 297, id411) sha=`ab4e681`" -- 2026-06-16 · FE-User Hồ sơ NS 2-col layout · PASS bundle-asymmetric user-rotate DbVv6rsf/admin-frozen, no-mig Mig52, tokens-present · `2026-06.md` · substring:"Run #295 (run_number 295, id409) sha=`456c7a7`" -- 2026-06-16 · CROSS-STACK PE HoSoLink Mig 52 + FE-User 3-panel + rename Dự trù→Ngân sách · PASS Mig52-applied + bundle-both-rotate BDwV5d0X/DXkyUjtQ, hoSoLink-null-DTO-backward-compat, no-new-table-88 · `2026-06.md` · substring:"Run #293 (run_number 293, id407) sha=`5a0aaa4`" -- 2026-06-13 · CROSS-STACK PE PeWorkItemBudgets vượt-ngân-sách soft-warn (Mig 50 net 93→88) · PASS · `2026-06.md` · substring:"Run #286 (run_number 286, id400)" +- 2026-06-19 · S78 #330 cross-stack NO-MIG enum ApprovalAttachment=5 (attach-on-… · PASS bundle-BOTH-rotate js+css… · `2026-06.md` · substring:"Run #330 (run_number 330, id=444)" +- 2026-06-19 · S76 #318 full-stack Mig56 ProInitial/ProAdjust VERIFIED-APPLIED-PROD · PASS backfill-4rows-0violation… · `2026-06.md` · substring:"Run #318 (run_number 318, id=432)" +- 2026-06-19 · S83 #325 FE-only tiny budget-subitem indent/dash · PASS bundle-BOTH-js-rotate css… · `2026-06.md` · substring:"Run #325 (id=439)" +- 2026-06-17 · FE-only re-skin Văn phòng số 10-page PURO · PASS bundle-BOTH-rotate Wt54PH… · `2026-06.md` · substring:"Run #306 (run_number 306, id420) sha=`c556f6c`" +- 2026-06-17 · FE-both-app Văn phòng số foundation + index.css + BE menu-seed · PASS bundle-BOTH-rotate Bl2o_k… · `2026-06.md` · substring:"Run #305 (run_number 305, id419) sha=`a8bbdae`" +- 2026-06-16 · FE-both-app 1-line CSS-precedence fix (name text-white!) · PASS bundle-BOTH-rotate CNUv1j… · `2026-06.md` · substring:"Run #304 (run_number 304, id418) sha=`37752eb`" +- 2026-06-16 · FE-both-app Hồ sơ NS banner text-polish · PASS bundle-BOTH-rotate D532XZ… · `2026-06.md` · substring:"Run #303 sha=`6983609` PASS" +- 2026-06-16 · FE-both-app PE Link-hồ-sơ file:// render · PASS bundle-BOTH-rotate CcrZqf… · `2026-06.md` · substring:"Run #302 (run_number 302, id416) sha=`536dd6b`" +- 2026-06-16 · TESTS-ONLY BE +23 test (286) · PASS bundle-BOTH-frozen xkSz9B… · `2026-06.md` · substring:"Run #299 (id413) sha=`bcd619d`" +- 2026-06-16 · FE-Admin MIRROR Hồ sơ NS from fe-user · PASS bundle-asymmetric-NGƯỢC a… · `2026-06.md` · substring:"Run #298 (run_number 298, id412) sha=`292d64d`" +- 2026-06-16 · FE-User Hồ sơ NS cosmetic brand800 · PASS bundle-asymmetric user-ro… · `2026-06.md` · substring:"Run #297 (run_number 297, id411) sha=`ab4e681`" +- 2026-06-16 · FE-User Hồ sơ NS 2-col layout · PASS bundle-asymmetric user-ro… · `2026-06.md` · substring:"Run #295 (run_number 295, id409) sha=`456c7a7`" +- 2026-06-16 · CROSS-STACK PE HoSoLink Mig 52 + FE-User 3-panel + rename Dự trù→… · PASS Mig52-applied + bundle-bo… · `2026-06.md` · substring:"Run #293 (run_number 293, id407) sha=`5a0aaa4`" +- 2026-06-13 · CROSS-STACK PE PeWorkItemBudgets vượt-ngân-sách soft-warn (Mig 50… · PASS · `2026-06.md` · substring:"Run #286 (run_number 286, id400)" - 2026-06-12 · CROSS-STACK PE guard 4-thông-tin mục 3 · PASS · `2026-06.md` · substring:"Run #283 (run_number 283) sha=`37122f0`" - 2026-06-11 · S59-CLOSE final đóng sổ · PASS · `2026-06.md` · substring:"Run #280 (run_number 280) sha=`69997da`" - 2026-06-11 · S59-đợt6 CROSS-STACK BE · PASS · `2026-06.md` · substring:"Run #278 (run_number 278) sha=`9c330d2`" - 2026-06-11 · S59-đợt5 FE-only ×2 · PASS · `2026-06.md` · substring:"Run #277 (run_number 277) sha=`faed59f`" -- 2026-06-11 · S59-đợt4 rename WorkItems 71 idempotent-seed · PASS rename-via-prod-SQL target-count-EXACT no-dup · `2026-06.md` · substring:"Run #276 (run_number 276) sha=`c869d26`" +- 2026-06-11 · S59-đợt4 rename WorkItems 71 idempotent-seed · PASS rename-via-prod-SQL targe… · `2026-06.md` · substring:"Run #276 (run_number 276) sha=`c869d26`" - 2026-06-11 · S59-đợt3 BE-only DbInitializer · PASS · `2026-06.md` · substring:"Run #275 (run_number 275) sha=`bbd1554`" - 2026-06-11 · S59 FE×2 PE-list tree regroup · PASS · `2026-06.md` · substring:"Run #273 (run_number 273) sha=`56882ac`" - 2026-06-11 · S59-đợt2 FE×2 PE-list tree · PASS · `2026-06.md` · substring:"Run #274 (run_number 274) sha=`0eafcd3`" -- 2026-06-11 · SUPERSEDE-CHAIN (benign cancel→shipped) · CANCELLED-benign→PASS-via-3ebaf merge-base-ancestor-not-fault · `2026-06.md` · substring:"Run #385→#386 SUPERSEDE-CHAIN sha=`ea793a4`" +- 2026-06-11 · SUPERSEDE-CHAIN (benign cancel→shipped) · CANCELLED-benign→PASS-via-3eba… · `2026-06.md` · substring:"Run #385→#386 SUPERSEDE-CHAIN sha=`ea793a4`" - 2026-06-11 · S58 FE-USER visual redesign · PASS asymmetric fe-user-only · `2026-06.md` · substring:"Run #384 (run_number 270) sha=`e959f72`" -- 2026-06-16 · TEST-GATE COMPILE BREAK (CS7036 ParentId 5th positional, call-site :63 4-arg) · **[FAIL]** ~64s deploy-gated prod-stayed-baseline, gotcha #65 root cause · `2026-06.md` · substring:"Run #291 (run_number 291, id405) sha=`8c8179c`" -- 2026-06-11 · S58 FIX #381 lock NO-OP (lock-noop→pw-11to12) · PASS dump-Users-set-before-scoring-FAIL · `2026-06.md` · substring:"Run #382 (run_number 268) sha=`5998163`" +- 2026-06-16 · TEST-GATE COMPILE BREAK (CS7036 ParentId 5th positional, call-sit… · **[FAIL]** ~64s deploy-gated p… · `2026-06.md` · substring:"Run #291 (run_number 291, id405) sha=`8c8179c`" +- 2026-06-11 · S58 FIX #381 lock NO-OP (lock-noop→pw-11to12) · PASS dump-Users-set-before-sco… · `2026-06.md` · substring:"Run #382 (run_number 268) sha=`5998163`" - 2026-06-11 · S57bis PE gắn WorkItemId loose-Guid (Mig 49) · PASS+1PARTIAL · `2026-06.md` · substring:"Run #381 (run_number 267) sha=`dd117b7`" - 2026-06-09 · S56 GOLIVE-HARDEN BE fixes · PASS · `2026-06.md` · substring:"Run #379 (run_number 265) sha=`a20cde8`" - 2026-06-09 · S56 pre-golive re-verify prod truth · **[audit]** no-deploy read-only · `2026-06.md` · substring:"S56 pre-golive verify — NO deploy" -- 2026-06-09 · S55 Phase-1 FE-Admin visual redesign · PASS asymmetric fe-admin-only rotate, other-frozen · `2026-06.md` · substring:"Run #378 (run_number 264) sha=`7feb53e`" -- 2026-06-09 · S55 HMW-P4 real master-data seed (Mig 48, 62 dự án+71 hạng mục+3 NCC) · PASS ungated-seed sqlcmd-COUNT + =N'…' EXACT unicode · `2026-06.md` · substring:"Run #377 (run_number 263) sha=`69cb393`" +- 2026-06-09 · S55 Phase-1 FE-Admin visual redesign · PASS asymmetric fe-admin-only… · `2026-06.md` · substring:"Run #378 (run_number 264) sha=`7feb53e`" +- 2026-06-09 · S55 HMW-P4 real master-data seed (Mig 48, 62 dự án+71 hạng mục+3… · PASS ungated-seed sqlcmd-COUNT… · `2026-06.md` · substring:"Run #377 (run_number 263) sha=`69cb393`" - 2026-06-08 · S54 IT-staff self-reassign ticket · PASS · `2026-06.md` · substring:"Run #376 (run_number 262) sha=`ca4b602`" -- 2026-06-08 · S50 HMW-Wave2 P11-C Vehicle+Driver · PASS Discovery#3 mixed-docs+tsx whole-range-builds · `2026-06.md` · substring:"Run #371 (run_number 257) sha=`30a99aa`" +- 2026-06-08 · S50 HMW-Wave2 P11-C Vehicle+Driver · PASS Discovery#3 mixed-docs+ts… · `2026-06.md` · substring:"Run #371 (run_number 257) sha=`30a99aa`" - 2026-06-03 · S48 FE-only login subtitle a11y · PASS · `2026-06.md` · substring:"Run #369 (run_number 255) sha=`350b2bf`" - 2026-06-01 · S45 Mig 43 filter Holiday UNIQUE · PASS · `2026-06.md` · substring:"Run #368 (run_number 254) sha=`0c5a014`" - 2026-05-30 · S42 P11-B LeaveBalance business · PASS · `2026-06.md` · substring:"Run #367 (run_number 253) sha=`82d7fcf`" - 2026-05-30 · S42 P11-A workflow-picker 2-bug + SetWorkflow · PASS · `2026-06.md` · substring:"Run #365 sha=`75df04e`" -- 2026-05-30 · S42 P11-A wire ApproveV2+LevelOpinions · PASS (mem #250 ≠ real Gitea id — reconcile via run_number) · `2026-06.md` · substring:"Run #364 (mem #250) sha=`e7b66cd`" +- 2026-05-30 · S42 P11-A wire ApproveV2+LevelOpinions · PASS (mem #250 ≠ real Gitea id… · `2026-06.md` · substring:"Run #364 (mem #250) sha=`e7b66cd`" - 2026-05-28 · S38 SKELETON 5-plan combo Mig 39+40 dual · PASS · `2026-06.md` · substring:"Run #247 sha=`e54a22d`" - 2026-05-?? · S37 Proposal Mig 37+38 (/api/proposals 200 + QT-DX-V2-001 AppType=4) · PASS [archived] · `2026-06.md` · substring:"Archived Run #246 (S37 Proposal Mig 37+38" -- 2026-06-11 · ⚠️ VỊ-TRÍ-LẠC entry (mem run id ≠ real Gitea — FIFO slot between #384/#382) · note · `2026-06.md` · substring:"VỊ TRÍ LẠC — entry MỚI 2026-06-11" -- 2026-05-22 · S29 gotcha #51 catch (SeedSampleContractWorkflowV2 nested in demoSeedDisabled) · PASS [archived] · `2026-06.md` · substring:"Archived Run #232 (S29 gotcha #51 catch" +- 2026-06-11 · ⚠️ VỊ-TRÍ-LẠC entry (mem run id ≠ real Gitea — FIFO slot between… · note · `2026-06.md` · substring:"VỊ TRÍ LẠC — entry MỚI 2026-06-11" +- 2026-05-22 · S29 gotcha #51 catch (SeedSampleContractWorkflowV2 nested in demo… · PASS [archived] · `2026-06.md` · substring:"Archived Run #232 (S29 gotcha #51 catch" ## 2026-05 late (file: `archive/2026-05-q4.md`) -- 2026-05-27 · BE+FE×2 Danh bạ nội bộ /api/directory (G-O1) · PASS bundle-both-rotate, menu-seed Off/Off_DanhBa, MediatR auto-discovery Office namespace · `2026-05-q4.md` · substring:"Run #238 (S34 Plan 2 G-O1 Danh bạ nội bộ" -- 2026-05-26 · BE Hrm CQRS /api/employees + FE×2 + menu (G-H1 Phase2) · PASS bundle-both-rotate, EmployeeProfiles=33 idempotent · `2026-05-q4.md` · substring:"Run #237 (S33 Plan B G-H1 Phase 2 Task 4+5+6" -- 2026-05-26 · BE Mig 34 EmployeeProfile + Plan C BW1-BW7 +9 test (62 Infra) · PASS gotcha#51 INFRASTRUCTURE-seed EmployeeProfiles=33 not-gated · `2026-05-q4.md` · substring:"Run #350 (S33 Plan B G-H1 Mig 34 EmployeeProfile" -- 2026-05-26 · S33 startup health-check · **[audit]** HEALTHY, last-5-runs success, Discovery#7 eval/** missing-from-paths-ignore wasteful-trigger · `2026-05-q4.md` · substring:"S33 startup health-check — em main spawn read-only verify, VERDICT=HEALTHY" +- 2026-05-27 · BE+FE×2 Danh bạ nội bộ /api/directory (G-O1) · PASS bundle-both-rotate, menu-… · `2026-05-q4.md` · substring:"Run #238 (S34 Plan 2 G-O1 Danh bạ nội bộ" +- 2026-05-26 · BE Hrm CQRS /api/employees + FE×2 + menu (G-H1 Phase2) · PASS bundle-both-rotate, Emplo… · `2026-05-q4.md` · substring:"Run #237 (S33 Plan B G-H1 Phase 2 Task 4+5+6" +- 2026-05-26 · BE Mig 34 EmployeeProfile + Plan C BW1-BW7 +9 test (62 Infra) · PASS gotcha#51 INFRASTRUCTURE-… · `2026-05-q4.md` · substring:"Run #350 (S33 Plan B G-H1 Mig 34 EmployeeProfile" +- 2026-05-26 · S33 startup health-check · **[audit]** HEALTHY, last-5-ru… · `2026-05-q4.md` · substring:"S33 startup health-check — em main spawn read-only verify, VERDICT=HEALTHY" - 2026-05-26 · S32 wrap curate + Phase9→10 · **[meta]** no-run docs-only skip · `2026-05-q4.md` · substring:"S32 wrap — em main proxy curate + Phase 9 stabilize done" -- 2026-05-26 · S32 startup verify (foundation freshness + 3-endpoint smoke) · **[audit]** no-CI-poll, RAG-healthy 2949-chunks · `2026-05-q4.md` · substring:"S32 startup verify — no CI poll" -- 2026-05-21 · S26 Plan AG PE-List tree-view UI iteration (#222-#227 cumulative) · PASS hybrid-verify spawn-1×-per-phase-wire · `2026-05-q4.md` · substring:"Run #222-#227 cumulative — Plan AG series PE List tree view" +- 2026-05-26 · S32 startup verify (foundation freshness + 3-endpoint smoke) · **[audit]** no-CI-poll, RAG-he… · `2026-05-q4.md` · substring:"S32 startup verify — no CI poll" +- 2026-05-21 · S26 Plan AG PE-List tree-view UI iteration (#222-#227 cumulative) · PASS hybrid-verify spawn-1×-pe… · `2026-05-q4.md` · substring:"Run #222-#227 cumulative — Plan AG series PE List tree view" ## 2026-05 mid (file: `archive/2026-05-runs.md`) ### Run-records (20) -- 2026-05-19 · S25 t7 Plan AF FE userMap fallback resolve historical · PASS bundle-rotate C8TvDy7r/BvcWrq2z, Discovery 503-mid-deploy + auth-route /api/auth/login accessToken · `2026-05-runs.md` · substring:"Run #221 id=335 sha=`506cada`" -- 2026-05-19 · S25 t6 Plan AE Changelog UserName 9-sites batch · PASS BE-only bundle-frozen, preventive-batch-fix-all-Add()-sites · `2026-05-runs.md` · substring:"Run #220 id=334 sha=`9ea62be`" -- 2026-05-19 · S25 t5 Plan AD Lịch-sử-duyệt redesign next-target-hint · PASS FE-only bundle-rotate, parse-comment-semantic-hint · `2026-05-runs.md` · substring:"Run #219 id=333 sha=`0aaf2df`" -- 2026-05-19 · S25 t4 Plan AC2 FE merge recover historical Reject · PASS bundle-rotate, synthetic-rows-from-Changelog-entityType5-ContextNote · `2026-05-runs.md` · substring:"Run #218 id=332 sha=`25837b6`" -- 2026-05-15 · S24 t1 Plan AA wrap fix sidebar · PASS last-deploy-before-AB, baseline CZdXQ2eo/DCwhhey2 · `2026-05-runs.md` · substring:"Run #214 id=328 sha=`ee0902a`" -- 2026-05-15 · S24 t1 Plan AA IsUserSelectable filter + WfView menu + sidebar (4/4 wire) · PASS bundle-rotate, Order-shift-idempotent, non-admin-read-200-not-403 · `2026-05-runs.md` · substring:"Run #210 id=324 sha=`ac2c859`" -- 2026-05-15 · S23 t11 Plan U FE sidebar truncate · PASS long-label ellipsis+title-tooltip · `2026-05-runs.md` · substring:"Run #209 sha=`86d8806`" -- 2026-05-15 · S23 t10 Plan T5+T6 docs final (DemoSeed wipe ~720 rows + force recycle no-reseed) · PASS flag-proven-end-to-end · `2026-05-runs.md` · substring:"Run #208 sha=`7b7b28f`" -- 2026-05-15 · S23 t10 Plan T DemoSeed disable (flag in appsettings, 5 demo-seed gated) · PASS · `2026-05-runs.md` · substring:"Run #207 sha=`0b97840`" -- 2026-05-15 · S23 t7 Plan Q FE banner mx-5 fix · PASS bundle-rotate QZIPWD-g/DaLTMGcx · `2026-05-runs.md` · substring:"Run #204 sha=`108268a`" -- 2026-05-15 · S23 t6 Plan P HOTFIX Controller TransitionPeBody +3 fields · PASS Discovery#4 ASP.NET10-record-enum-needs-numeric (no JsonStringEnumConverter), point-10 body-record-mirror-count · `2026-05-runs.md` · substring:"Run #203 id=317 sha=`1727bd5`" -- 2026-05-15 · S23 t5 Plan O HOTFIX cascade 4 lookup-sites (point 9) · PASS 409-mode-not-403-actor proves discrimination, Discovery#3-reinforce-3rd, grep-FirstOrDefault-Order-scan · `2026-05-runs.md` · substring:"Run #202 id=316 sha=`a1c8386`" -- 2026-05-15 · S23 t4 Plan N HOTFIX per-NV lookup discrimination :765 · PASS 7/7-vs-1/7-per-actor, bug-2days-prod, point-9 lookup-site · `2026-05-runs.md` · substring:"Run #201 id=315 sha=`fb3c22c`" -- 2026-05-15 · S23 t3 Plan M Service F1 OneLevel/OneStep edge-case Bước1 reset · PASS Discovery#3-anomaly docs-only-tip-triggered, Mig31-unchanged · `2026-05-runs.md` · substring:"Run #200 id=314 sha=`f4055a1`" -- 2026-05-14/15 · S23 t1 K10 hotfix AwLevelDto +AllowApproverSkipToFinal · PASS 8-surface-point-checklist (AwLevelDto+CreateAwLevelInput were the gaps) · `2026-05-runs.md` · substring:"Run #195 id=309 sha=`0062fcb`" -- 2026-05-14 · S23 t1 Plan K Mig 31 per-Approver-slot refactor · **[PARTIAL]** Mig+schema OK but K3 DTO-mirror INCOMPLETE (AwLevelDto missing AllowApproverSkipToFinal — comment-only not record-param) → 7th-checkbox no round-trip · `2026-05-runs.md` · substring:"Run #194 id=308 sha=`098baa6`" -- 2026-05-13 · S22-chốt cumulative verify · PASS Discovery#3 push-range-eval (b079b27+b04a11a batched→single-run-on-tip), #190 cancelled-by-concurrency-normal, 104 test, Mig30 · `2026-05-runs.md` · substring:"Verify S22 chốt cuối cumulative (push range `3d725c4..cc8a7d3` 12 commits) VERDICT=PASS" -- 2026-05-13 · S22 Plan D Users-toggle + Plan C 14-test + Plan E strict-V2-scope · PASS 103 test, Discovery#1 rate-limit-429-backoff, Discovery#2 agent-memory-NOT-in-paths-ignore (later disproven) · `2026-05-runs.md` · substring:"Run #188 id=302 sha=a74e671" -- 2026-05-13 · S21 t5 Mig 29 refactor Allow*-per-NV + Designer 5-checkbox · PASS Mig29 applied, Discovery task-table-updated_at-stale-2min cross-check-VPS-mtime · `2026-05-runs.md` · substring:"Run #187 id=301 sha=c0af9e0" -- 2026-05-13 · S21 t3+t4 gotcha#45 Trả-lại + F1/F2/F3 advanced-options + Mig 28 · PASS baseline, Discovery API-tasks-not-/runs-404 · `2026-05-runs.md` · substring:"Run #186 id=300 sha=eea86fd" +- 2026-05-19 · S25 t7 Plan AF FE userMap fallback resolve historical · PASS bundle-rotate C8TvDy7r/Bv… · `2026-05-runs.md` · substring:"Run #221 id=335 sha=`506cada`" +- 2026-05-19 · S25 t6 Plan AE Changelog UserName 9-sites batch · PASS BE-only bundle-frozen, pr… · `2026-05-runs.md` · substring:"Run #220 id=334 sha=`9ea62be`" +- 2026-05-19 · S25 t5 Plan AD Lịch-sử-duyệt redesign next-target-hint · PASS FE-only bundle-rotate, pa… · `2026-05-runs.md` · substring:"Run #219 id=333 sha=`0aaf2df`" +- 2026-05-19 · S25 t4 Plan AC2 FE merge recover historical Reject · PASS bundle-rotate, synthetic-… · `2026-05-runs.md` · substring:"Run #218 id=332 sha=`25837b6`" +- 2026-05-15 · S24 t1 Plan AA wrap fix sidebar · PASS last-deploy-before-AB, ba… · `2026-05-runs.md` · substring:"Run #214 id=328 sha=`ee0902a`" +- 2026-05-15 · S24 t1 Plan AA IsUserSelectable filter + WfView menu + sidebar (4… · PASS bundle-rotate, Order-shif… · `2026-05-runs.md` · substring:"Run #210 id=324 sha=`ac2c859`" +- 2026-05-15 · S23 t11 Plan U FE sidebar truncate · PASS long-label ellipsis+title… · `2026-05-runs.md` · substring:"Run #209 sha=`86d8806`" +- 2026-05-15 · S23 t10 Plan T5+T6 docs final (DemoSeed wipe ~720 rows + force re… · PASS flag-proven-end-to-end · `2026-05-runs.md` · substring:"Run #208 sha=`7b7b28f`" +- 2026-05-15 · S23 t10 Plan T DemoSeed disable (flag in appsettings, 5 demo-seed… · PASS · `2026-05-runs.md` · substring:"Run #207 sha=`0b97840`" +- 2026-05-15 · S23 t7 Plan Q FE banner mx-5 fix · PASS bundle-rotate QZIPWD-g/Da… · `2026-05-runs.md` · substring:"Run #204 sha=`108268a`" +- 2026-05-15 · S23 t6 Plan P HOTFIX Controller TransitionPeBody +3 fields · PASS Discovery#4 ASP.NET10-rec… · `2026-05-runs.md` · substring:"Run #203 id=317 sha=`1727bd5`" +- 2026-05-15 · S23 t5 Plan O HOTFIX cascade 4 lookup-sites (point 9) · PASS 409-mode-not-403-actor pr… · `2026-05-runs.md` · substring:"Run #202 id=316 sha=`a1c8386`" +- 2026-05-15 · S23 t4 Plan N HOTFIX per-NV lookup discrimination :765 · PASS 7/7-vs-1/7-per-actor, bug… · `2026-05-runs.md` · substring:"Run #201 id=315 sha=`fb3c22c`" +- 2026-05-15 · S23 t3 Plan M Service F1 OneLevel/OneStep edge-case Bước1 reset · PASS Discovery#3-anomaly docs-… · `2026-05-runs.md` · substring:"Run #200 id=314 sha=`f4055a1`" +- 2026-05-14/15 · S23 t1 K10 hotfix AwLevelDto +AllowApproverSkipToFinal · PASS 8-surface-point-checklist… · `2026-05-runs.md` · substring:"Run #195 id=309 sha=`0062fcb`" +- 2026-05-14 · S23 t1 Plan K Mig 31 per-Approver-slot refactor · **[PARTIAL]** Mig+schema OK bu… · `2026-05-runs.md` · substring:"Run #194 id=308 sha=`098baa6`" +- 2026-05-13 · S22-chốt cumulative verify · PASS Discovery#3 push-range-ev… · `2026-05-runs.md` · substring:"Verify S22 chốt cuối cumulative (push range `3d725c4..cc8a7d3` 12 commits) VERDICT=PASS" +- 2026-05-13 · S22 Plan D Users-toggle + Plan C 14-test + Plan E strict-V2-scope · PASS 103 test, Discovery#1 rat… · `2026-05-runs.md` · substring:"Run #188 id=302 sha=a74e671" +- 2026-05-13 · S21 t5 Mig 29 refactor Allow*-per-NV + Designer 5-checkbox · PASS Mig29 applied, Discovery… · `2026-05-runs.md` · substring:"Run #187 id=301 sha=c0af9e0" +- 2026-05-13 · S21 t3+t4 gotcha#45 Trả-lại + F1/F2/F3 advanced-options + Mig 28 · PASS baseline, Discovery API-t… · `2026-05-runs.md` · substring:"Run #186 id=300 sha=eea86fd" ### Curate-note meta-headers (6) — [meta] - 2026-05-19 · curate-note S25 t5 Plan AD #219 · **[meta]** · `2026-05-runs.md` · substring:"added S25 t5 Plan AD Run #219 entry" -- 2026-05-19 · curate-note S25 t3 Plan AC #217 (Discovery#5 sqlcmd 4-backslash \\\\SQLEXPRESS) · **[meta]** · `2026-05-runs.md` · substring:"added S25 t3 Plan AC Run #217 entry" +- 2026-05-19 · curate-note S25 t3 Plan AC #217 (Discovery#5 sqlcmd 4-backslash \… · **[meta]** · `2026-05-runs.md` · substring:"added S25 t3 Plan AC Run #217 entry" - 2026-05-19 · curate-note S25 t1 Plan AB #215 (gotcha#48 SQLite tie-break FAIL) · **[meta]** · `2026-05-runs.md` · substring:"added S25 t1 Plan AB Run #215 entry" - 2026-05-15 · curate-note S24 t1 Plan AA #210 · **[meta]** · `2026-05-runs.md` · substring:"added S24 t1 Plan AA Run #210 entry" - 2026-05-15 · curate-note S23 t6 Plan P #203 (Discovery#4 numeric-enum) · **[meta]** · `2026-05-runs.md` · substring:"added S23 t6 Plan P HOTFIX Run #203 entry" -- 2026-05-15 · curate-note S23 t5 Plan O #202 (4-site discrimination, TransitionPeBody gap surfaced) · **[meta]** · `2026-05-runs.md` · substring:"added S23 t5 Plan O HOTFIX Run #202 entry" +- 2026-05-15 · curate-note S23 t5 Plan O #202 (4-site discrimination, Transition… · **[meta]** · `2026-05-runs.md` · substring:"added S23 t5 Plan O HOTFIX Run #202 entry" ## 2026-05 early (file: `archive/2026-05-q3.md`) -- 2026-05-19 · ★ Run #215 FAIL → #216 PASS pair — **gotcha #48 SQLite tie-break** catch+fix (.Where(Summary.Contains "Chuyển phase") BEFORE OrderByDescending(CreatedAt).First()) · FAIL→PASS · `2026-05-q3.md` · substring:"Run #215 FAIL → Run #216 PASS (gotcha #48 SQLite tie-break catch+fix pair)" -- 2026-05-13 · Verify S22 chốt cuối cumulative (Discovery#3 first-surfaced, 33 users, 104 test) · PASS · `2026-05-q3.md` · substring:"Verify S22 chốt cuối cumulative (push range `3d725c4..cc8a7d3` 12 commits VERDICT=PASS" +- 2026-05-19 · ★ Run #215 FAIL → #216 PASS pair — **gotcha #48 SQLite tie-break*… · FAIL→PASS · `2026-05-q3.md` · substring:"Run #215 FAIL → Run #216 PASS (gotcha #48 SQLite tie-break catch+fix pair)" +- 2026-05-13 · Verify S22 chốt cuối cumulative (Discovery#3 first-surfaced, 33 u… · PASS · `2026-05-q3.md` · substring:"Verify S22 chốt cuối cumulative (push range `3d725c4..cc8a7d3` 12 commits VERDICT=PASS" - 2026-05-12 · Setup baseline (agent init, 44 gotchas + 5-stage + 3 skills) · init · `2026-05-q3.md` · substring:"2026-05-12 — Setup baseline" ## 2026-05 early (file: `archive/2026-05-q2.md`) -- 2026-05-22 · Run #231 Plan B Contract V2 wire kick-off · **[PARTIAL]** PASS-deploy + seed-gap (DemoSeed flag gated QT-HD-V2-001 → empty dropdown) → resolved Run #232 (gotcha #51) · `2026-05-q2.md` · substring:"Run #231 (id=345) Plan B Contract V2 wire kick-off VERDICT=PARTIAL" -- 2026-07-06 · S103 #487 `f0874dd` GOVERNANCE/SCRIPTS-ONLY GO — GOVERNANCE-PASS stable ×4 (bundle FROZEN #69-REFINE) · PASS · `2026-07.md` · substring:"S103 #487 (rn 373) `f0874dd` GO ~4m" -- 2026-07-02 · S100 #486 `5ee32c0` GOVERNANCE-ONLY GO — bundle FROZEN #69-REFINE ×3 + python-sleep-foreground-OK · PASS · `2026-07.md` · substring:"S100 #486 (rn 372) `5ee32c0` GO 5m17s" -- 2026-07-10 · S107 #489 `21387cd` GOVERNANCE-ONLY (+office-document 12th sub) GO — bundle JS ROTATED-benign, #69 TWO-MODE CONFIRMED · PASS · `2026-07.md` · substring:"S107 #489 (rn 375, id 489)" -- 2026-07-06 · S104 #488 `778fc98` FULL-STACK Supplier 9→27 + Mig62 ExpandSupplierFields APPLIED-PROD + un-cram 4-NCC exact · PASS · `2026-07.md` · substring:"S104 #488 (rn 374, id 488)" -- 2026-07-10 · S107-closeout #490 `d74f67f` GOVERNANCE-CLOSEOUT GO — bundle FROZEN x2 post-ROTATE-#489, #69 TWO-MODE back-to-back · PASS · `2026-07.md` · substring:"S107-closeout #490 (rn 376, id 490)" -- 2026-07-10 · S108 #491 `69957fd` GOVERNANCE hmw.js GO — FROZEN x2 + #41 2-chieu f1af05c 0-run · PASS · `2026-07.md` · substring:"S108 #491 (rn 377, id 491)" -- 2026-07-10 · S109 #492 `f5a5c3e` MEMORY-ONLY budget.json GO — FROZEN x3, AS-6 verified · PASS · `2026-07.md` · substring:"S109 #492 (rn 378, id 492)" -- 2026-07-11 · S110 #493 `6ee60cd` GOVERNANCE 3-commit H21+MTv3 GO — FROZEN x4, range-eval #41 · PASS · `2026-07.md` · substring:"S110 #493 (rn 379, id 493)" -- 2026-07-11 · S110-spot #494 `ac3f122` GOVERNANCE mark-stamp GO — FROZEN x5 + LM-newer missed-run detector · PASS · `2026-07.md` · substring:"S110-spot #494 (rn 380, id 494)" -- 2026-07-12 · S111 #495 `8aa3869` H22 WAL adopt GO — deploy.yml self-change +2 paths-ignore, bundle FROZEN x6, AS-6 baseline shift memory-push HET trigger · PASS · `2026-07.md` · substring:"S111 #495 (rn 381, id 495)" -- 2026-07-12 · S112 #496 `e100ef0` PE workflow + Supplier import Phase B + Mig63 AddSupplierImportSourceFields GO — 411-refine, gate 458 · PASS · `2026-07.md` · substring:"S112 #496 `e100ef0`" -- 2026-07-12 · S113 #383 `5fa11b5` Supplier import v2 + Mig64 AddSupplierPublishState APPLIED-PROD GO — IsPublic 37/37, gate 477 · PASS · `2026-07.md` · substring:"S113 #383 (rn 383, id 497)" -- 2026-07-13 · S114 #384 `d436af2` PE multi-NCC per hang muc + Mig65 backfill invariant APPLIED-PROD GO — js-rotate x2/css-frozen D51OYyGV/BVdssm5S, gate 486 · PASS · `2026-07.md` · substring:"S114 #384 (rn 384, id 498)" -- 2026-07-13 · S115 #385 `81b59f0` GOVERNANCE/TOOLING-ONLY (hmw.js+memory-archive-gate.ps1) GO — FROZEN x4 D51OYyGV/BVdssm5S fresh-LM identical-size #69-REFINE, gate 486 · PASS · `2026-07.md` · substring:"S115 #385 (rn 385, id 499)" -- 2026-07-13 · S116 #386 `88368fd` PE nhap-gia-AM + submit-guard all-zero GO — js-rotate x2/css-frozen Dd55jBpj/DVDr1UQ4, gate 495 (45+450), byte-verify 4-str PRESENT · PASS · `2026-07.md` · substring:"S116 #386 (rn 386, id 500)" -- 2026-07-14 · S117 #387 `316a82f` PE endsBeforeCeo-pointer-aware + duyet-theo-khoang Min-Max + Mig66 AddPeApprovedPriceRange APPLIED-PROD GO — js-rotate x2/css-frozen cFI7ih4a/MxgooVZw, gate 501 (45+456), byte-verify 4-str PRESENT · PASS · `2026-07.md` · substring:"S117 #387 (rn 387, id 501)" +- 2026-05-22 · Run #231 Plan B Contract V2 wire kick-off · **[PARTIAL]** PASS-deploy + se… · `2026-05-q2.md` · substring:"Run #231 (id=345) Plan B Contract V2 wire kick-off VERDICT=PARTIAL" +- 2026-07-06 · S103 #487 `f0874dd` GOVERNANCE/SCRIPTS-ONLY GO — GOVERNANCE-PASS… · PASS · `2026-07.md` · substring:"S103 #487 (rn 373) `f0874dd` GO ~4m" +- 2026-07-02 · S100 #486 `5ee32c0` GOVERNANCE-ONLY GO — bundle FROZEN #69-REFINE… · PASS · `2026-07.md` · substring:"S100 #486 (rn 372) `5ee32c0` GO 5m17s" +- 2026-07-10 · S107 #489 `21387cd` GOVERNANCE-ONLY (+office-document 12th sub) G… · PASS · `2026-07.md` · substring:"S107 #489 (rn 375, id 489)" +- 2026-07-06 · S104 #488 `778fc98` FULL-STACK Supplier 9→27 + Mig62 ExpandSuppli… · PASS · `2026-07.md` · substring:"S104 #488 (rn 374, id 488)" +- 2026-07-10 · S107-closeout #490 `d74f67f` GOVERNANCE-CLOSEOUT GO — bundle FROZ… · PASS · `2026-07.md` · substring:"S107-closeout #490 (rn 376, id 490)" +- 2026-07-10 · S108 #491 `69957fd` GOVERNANCE hmw.js GO — FROZEN x2 + #41 2-chie… · PASS · `2026-07.md` · substring:"S108 #491 (rn 377, id 491)" +- 2026-07-10 · S109 #492 `f5a5c3e` MEMORY-ONLY budget.json GO — FROZEN x3, AS-6… · PASS · `2026-07.md` · substring:"S109 #492 (rn 378, id 492)" +- 2026-07-11 · S110 #493 `6ee60cd` GOVERNANCE 3-commit H21+MTv3 GO — FROZEN x4,… · PASS · `2026-07.md` · substring:"S110 #493 (rn 379, id 493)" +- 2026-07-11 · S110-spot #494 `ac3f122` GOVERNANCE mark-stamp GO — FROZEN x5 + L… · PASS · `2026-07.md` · substring:"S110-spot #494 (rn 380, id 494)" +- 2026-07-12 · S111 #495 `8aa3869` H22 WAL adopt GO — deploy.yml self-change +2… · PASS · `2026-07.md` · substring:"S111 #495 (rn 381, id 495)" +- 2026-07-12 · S112 #496 `e100ef0` PE workflow + Supplier import Phase B + Mig63… · PASS · `2026-07.md` · substring:"S112 #496 `e100ef0`" +- 2026-07-12 · S113 #383 `5fa11b5` Supplier import v2 + Mig64 AddSupplierPublish… · PASS · `2026-07.md` · substring:"S113 #383 (rn 383, id 497)" +- 2026-07-13 · S114 #384 `d436af2` PE multi-NCC per hang muc + Mig65 backfill in… · PASS · `2026-07.md` · substring:"S114 #384 (rn 384, id 498)" +- 2026-07-13 · S115 #385 `81b59f0` GOVERNANCE/TOOLING-ONLY (hmw.js+memory-archiv… · PASS · `2026-07.md` · substring:"S115 #385 (rn 385, id 499)" +- 2026-07-13 · S116 #386 `88368fd` PE nhap-gia-AM + submit-guard all-zero GO — j… · PASS · `2026-07.md` · substring:"S116 #386 (rn 386, id 500)" +- 2026-07-14 · S117 #387 `316a82f` PE endsBeforeCeo-pointer-aware + duyet-theo-k… · PASS · `2026-07.md` · substring:"S117 #387 (rn 387, id 501)" -- 2026-07-14 · S118 #389 `c808b9a` SECURITY-AUTHZ ReportsController→Reports.Read GO — gate 509 (45+464), DB Admin-only 403-by-construction, cicd garble #53 em-main-recovered · PASS · `2026-07.md` · substring:"S118 #389 (rn 389, id 503)" -- 2026-07-16 · S126 #394 `e9124fc` GOVERNANCE-TOOLING GO — gate 509 exact, bundle FROZEN byte-id S117, 89-table no-drift · PASS · `2026-07.md` · substring:"S126 (2026-07-16) run 508/#394" -- 2026-07-17 · S133 #398 `d4fbced` PE budget-freeze + Mig67 AddPeApprovedBudgetSnapshot APPLIED-PROD GO — js+css rotate x2 (3NCdyODe/CKsoiNCI), gate 520 (45+475), backfill 18/18, byte-verify budgetFrozen · PASS · `2026-07.md` · substring:"S133 (07-17) verify d4fbced" -- 2026-07-17 · S134 #399 `6664a61` PE lũy-kế tạm-tính (0-mig) GO — js+css rotate x2 (BVCukFP5/DoxyEOxh), gate 528 (45+483 +8 PePendingAccumulation), ct=text/html discriminator · PASS · `2026-07.md` · substring:"S134 (07-17) verify 6664a61" \ No newline at end of file +- 2026-07-14 · S118 #389 `c808b9a` SECURITY-AUTHZ ReportsController→Reports.Read… · PASS · `2026-07.md` · substring:"S118 #389 (rn 389, id 503)" +- 2026-07-16 · S126 #394 `e9124fc` GOVERNANCE-TOOLING GO — gate 509 exact, bundl… · PASS · `2026-07.md` · substring:"S126 (2026-07-16) run 508/#394" +- 2026-07-17 · S133 #398 `d4fbced` PE budget-freeze + Mig67 AddPeApprovedBudgetS… · PASS · `2026-07.md` · substring:"S133 (07-17) verify d4fbced" +- 2026-07-17 · S134 #399 `6664a61` PE lũy-kế tạm-tính (0-mig) GO — js+css rotate… · PASS · `2026-07.md` · substring:"S134 (07-17) verify 6664a61" \ No newline at end of file diff --git a/.claude/agent-memory/frontend-designer/archive/_INDEX.md b/.claude/agent-memory/frontend-designer/archive/_INDEX.md index 42c59ab..eeced6b 100644 --- a/.claude/agent-memory/frontend-designer/archive/_INDEX.md +++ b/.claude/agent-memory/frontend-designer/archive/_INDEX.md @@ -1,10 +1,10 @@ # frontend-designer — archive _INDEX (L2 map · inject the map, not the territory) -> One line per archived entry. Pointer = unique substring (Ctrl-F in `2026-06.md`). NO line-hints (additive appends shift lines). Built @S96 (2026-07-01). Verbatim → `2026-06.md` · 4-field distill → `2026-06.gist.md`. +> One line per archived entry. Pointer = substring:"..." (Ctrl-F in `2026-06.md`; chuẩn-hoá @S152 A4 từ dạng `→ find` để lọt mắt A7 :284). NO line-hints (additive appends shift lines). Built @S96 (2026-07-01). Verbatim → `2026-06.md` · 4-field distill → `2026-06.gist.md`. ## 2026-06 (5 entries · S66→S47) -- **S66 hrm-2col-refine** (2026-06-16) — HRM Hồ sơ 3-cột→2-cột + accent-detail 5-tone; Tailwind-v4 -800-stop self-caught ×2 + rail `before:content-['']`; atomic-Write anti-#53; 5 CRUD+15 api verbatim. → find `S66 (2026-06-16) HRM Hồ sơ` -- **S65 hrm-3panel** (2026-06-16) — EmployeesListPage → 3-panel master-detail NamGroup-ref; ONE atomic Write anti-#53; mojibake `网络Placeholder` lucide self-caught; org-tree `/departments/tree`. → find `S65 (2026-06-16) HRM Hồ sơ` -- **S58 fe-user-redesign** (2026-06-11) — mirror fe-admin DS → 14 file fe-user KEEP brand; truncated-#53 2nd-consecutive (em-main proxy, ship `e959f72`); LESSON emit-file-list-before-FD2-loop. → find `S58 (2026-06-11) fe-user redesign` -- **S55 density-namgroup** (2026-06-09) — Phase-1 fe-admin redesign density-first KEEP brand; em-main proxy #53; authed-rig#3 blocked → /login only; → S58 mirror. → find `S55 (2026-06-09) Phase-1 fe-admin` -- **S47 fd2-rig-verified** (2026-06-02) — first real spawn; FD2 loop end-to-end proven /login; Tailwind-v4 CSS-first; 2 Vite gotchas (networkidle-never-fires + cold-goto-dep-optimize). → find `S47 (2026-06-02) FD2 RIG VERIFIED` +- **S66 hrm-2col-refine** (2026-06-16) — HRM Hồ sơ 3-cột→2-cột + accent-detail 5-tone; Tailwind-v4 -800-stop self-caught ×2 + rail `before:content-['']`; atomic-Write anti-#53; 5 CRUD+15 api verbatim. · substring:"S66 (2026-06-16) HRM Hồ sơ" +- **S65 hrm-3panel** (2026-06-16) — EmployeesListPage → 3-panel master-detail NamGroup-ref; ONE atomic Write anti-#53; mojibake `网络Placeholder` lucide self-caught; org-tree `/departments/tree`. · substring:"S65 (2026-06-16) HRM Hồ sơ" +- **S58 fe-user-redesign** (2026-06-11) — mirror fe-admin DS → 14 file fe-user KEEP brand; truncated-#53 2nd-consecutive (em-main proxy, ship `e959f72`); LESSON emit-file-list-before-FD2-loop. · substring:"S58 (2026-06-11) fe-user redesign" +- **S55 density-namgroup** (2026-06-09) — Phase-1 fe-admin redesign density-first KEEP brand; em-main proxy #53; authed-rig#3 blocked → /login only; → S58 mirror. · substring:"S55 (2026-06-09) Phase-1 fe-admin" +- **S47 fd2-rig-verified** (2026-06-02) — first real spawn; FD2 loop end-to-end proven /login; Tailwind-v4 CSS-first; 2 Vite gotchas (networkidle-never-fires + cold-goto-dep-optimize). · substring:"S47 (2026-06-02) FD2 RIG VERIFIED" diff --git a/.claude/agent-memory/harness-audit/MEMORY.md b/.claude/agent-memory/harness-audit/MEMORY.md index b9ea6ad..d8d247f 100644 --- a/.claude/agent-memory/harness-audit/MEMORY.md +++ b/.claude/agent-memory/harness-audit/MEMORY.md @@ -18,3 +18,7 @@ Con KIỂM của bộ-ba đồng-kiểm memory-system (adopt AI_INFRA 2026-07-18 ## S151 (2026-07-25) — trio vòng-2, spawn đầu [M9 on-behalf] - {nấc: verified-self · evidence: harness-audit-return.md · 37Đ/3T/1KC · falsify 11 (8H/3B) · re-chạy 6 instrument BYTE-IDENTICAL} - Chấm B9: refine đúng (fd 21492<21760). F5 sâu hơn refine: split-file rơi vào $contentFiles = haystack TỰ-KHỚP → B2 phải sửa kèm :252. Ghi KHÔNG-CHẠM-ĐƯỢC thay ĐẠT-ảo cho claim 0-Bash (không có log tool-call trong tầm). Bài: mtime-chain chứng tuần-tự; provenance-test bằng bộ-số-KHÁC-PIN. + +## S152 (2026-07-25) — trio vòng-3, lượt AUTO đầu (owner #32, giữa 2 bookend; nấc KIỂM 3/3 tuần-tự) [M9 on-behalf] +- {nấc: executed+scribed · evidence: runs/2026-07-25-S152-trio-memory/harness-audit-return.md (lead scribe + ERRATA appended) + trio-synthesis.md} +- Verdict per-claim chi-tiết = file return (diary giữ pointer). return-only khuôn cứng: CLEAN — trio 3/3 CLEAN cùng phiên wave 6/6 garble. diff --git a/.claude/agent-memory/harness-eval/MEMORY.md b/.claude/agent-memory/harness-eval/MEMORY.md index 9d64a00..f5190c2 100644 --- a/.claude/agent-memory/harness-eval/MEMORY.md +++ b/.claude/agent-memory/harness-eval/MEMORY.md @@ -18,3 +18,7 @@ Con ĐO của bộ-ba đồng-kiểm memory-system (adopt AI_INFRA 2026-07-18 kh ## S151 (2026-07-25) — trio vòng-2, spawn ĐẦU TIÊN từ seed S141 — vai SỐNG [M9 on-behalf] - {nấc: verified (harness-audit 20Đ/2T trên 22 claim) · evidence: runs/2026-07-25-S151-trio-memory/harness-eval-return.md (lead scribe verbatim + errata)} - MIXED 6 trục + 12 signal; 5/6 instrument TỰ CHẠY khớp PIN byte-exact; return CLEAN không garble (return-only + khuôn cứng). 2 TRƯỢT đều là NÓI-VỀ-SỐ (low-water 3→2 vai · nhãn DENOM 47≠36) — khâu đo sạch, meta-count vẫn là chỗ ngã: số dẫn-xuất phải TỰ CỘNG LẠI trước khi phát. + +## S152 (2026-07-25) — trio vòng-3, lượt AUTO đầu (owner #32 "vòng 1→5 auto", giữa 2 bookend) [M9 on-behalf] +- {nấc: executed+scribed · evidence: runs/2026-07-25-S152-trio-memory/harness-eval-return.md (lead scribe + ERRATA appended) + trio-synthesis.md} +- Verdict/số chi-tiết = file return (diary giữ pointer — chống chép-số-trôi). return-only + khuôn cứng: CLEAN lần 2 liên-tiếp, đối-chứng wave cùng phiên 6/6 first-return garble — counter-datum #53 giữ vững. diff --git a/.claude/agent-memory/harness-refine/MEMORY.md b/.claude/agent-memory/harness-refine/MEMORY.md index f6ee095..eb7f029 100644 --- a/.claude/agent-memory/harness-refine/MEMORY.md +++ b/.claude/agent-memory/harness-refine/MEMORY.md @@ -18,3 +18,7 @@ Con ĐỀ-XUẤT của bộ-ba đồng-kiểm memory-system (adopt AI_INFRA 2026 ## S151 (2026-07-25) — trio vòng-2, spawn đầu [M9 on-behalf] - {nấc: verified (audit 17Đ/1T/1KC — TRƯỢT duy nhất: mỏ-neo :273=comment, thật :284) · evidence: harness-refine-return.md + errata} - 9 action 4-lớp đủ trigger/chốt-dừng/owner-gate + 6 BÁC + bắt B9 lỗi eval. Bài đắt nhất: 4 lần CHẠM ĐĨA xác-minh mỏ-neo đã lật ngược S4 (index-rỗng→lệch-format) và cứu D1 khỏi split-rời-tập-đo — đề-xuất không chạm đĩa là đề-xuất mù. + +## S152 (2026-07-25) — trio vòng-3, lượt AUTO đầu (owner #32, giữa 2 bookend) [M9 on-behalf] +- {nấc: executed+scribed · evidence: runs/2026-07-25-S152-trio-memory/harness-refine-return.md (lead scribe + ERRATA appended) + trio-synthesis.md} +- Action/BÁC chi-tiết = file return (diary giữ pointer). return-only khuôn cứng: CLEAN — trio 3/3 CLEAN cùng phiên wave 6/6 garble. diff --git a/.claude/agent-memory/harvest-curator/MEMORY.md b/.claude/agent-memory/harvest-curator/MEMORY.md index 52f48c6..d322be9 100644 --- a/.claude/agent-memory/harvest-curator/MEMORY.md +++ b/.claude/agent-memory/harvest-curator/MEMORY.md @@ -48,11 +48,14 @@ H2 harvest-MD-integrity auditor **SOLUTION_ERP-self**. Read-only + **propose-onl - **2026-07-17 (S132 DỒN S127→S131 — re-spawn sau session-limit-death S131 [E-011]; by em-main VERIFY→APPEND):** GAPS-FOUND→**CLOSED-in-session**. Coverage PASS **31 run.md/33 dirs** (2 = spec-only S117 by-design; interim "26" = S123-baseline stale) · **0-orphan/31** · 2 folder mới S127+S129 flat dạng-1 đủ · roster-harvest đủ (reviewer S127/S128×2/S129/S131×2 · inv-cb S128/S129 · cicd S128/S129; wave-workers generic = no-diary by-design; S130 em-main-solo 0-spawn = không nợ). Fidelity STRONG (entries tự-flag overclaim mình) · Corruption PASS (FFFD 0/3 · porcelain agent-memory 0 mồ-côi; inv-cb "�24.1KB" = m#6 tail-cut artifact tự-bắt). Placement FLAG ×2 (git-invisible m#13): 2 dirs H24 RỖNG since-S123 + stray S119 → em-main CLOSED cùng phiên (seed 2 diary retro từ `sub-lead-{view,omission}.md` 8379B/9967B + rmdir stray 3-dir-rỗng). Lesson: (1) folder S127 chứa subs tag S128 = **trigger-session naming**, KHÔNG gap; (2) `sort -u -k2` collapse entry cùng-pattern = measurement-artifact — targeted-grep recover; (3) H24 knowledge sống CHỈ ở run-folder+counter-json ⇒ **per-ROLE diary = lớp không ai sở-hữu** tới khi seed (E-011/GAP-3). > **S118 (start+end) + S119-start (3 entry) verbatim → `archive/2026-07.md`** — self-compact 2026-07-16 @S125-start HOOK-directed (SELF 22.5KB>read-limit; block-md5 `9f7a11dcd057a27d03b06843bbdf2274` 6252B moved-not-cut, file-order verbatim, anchor 3×{L1=0·ARC=1}). Digest: S118-start ALL-CLEAN 0/26 (3nit-S117-fixed `1b8b065` · FFFD-baseline 1→0 self-quote-left-L1) · S118-end GATE PASS 5/5 0-orphan-no-runtrace (cicd-garble-×2-return-label-nit em-main-FIXED) · S119-start ALL-CLEAN 0/26 77/77-tracked + LIVE mid-flight catch (sibling append-BEFORE-trim=safe-order · m#5 archive-diff-grep-swallow self-caught). > **S123→S125 (2 entry @start RE-REPORT) verbatim → `archive/2026-07.md`** — self-compact 2026-07-18 @S140-gate HOOK-directed (SELF 19.7KB>17.1 read-limit; block-md5 `cbcd17aba6461d57a5fbb34e9be0e301` 7427B moved-not-cut byte-identical, file-order verbatim, anchor 2×{L1=0·ARC=1}). Digest: S123 @start MOSTLY-CLEAN 0-orphan/26 (m#12 mẫu-số-25-vs-26 · dạng-3 dead-code · doc-stale-at-birth pe-neg-quote · reviewer-coverage-gap-5spawn · 2 H24-dir-no-seed + stray-S54 → ALL CLOSED @S132) · S125 @start FLAGS 0-orphan/27 (2 H24-firstrun-no-diary HIGH · stray-S54-still → CLOSED @S132). m#12/#13 preserved in Methods §⭐. -- **S126 (2026-07-16) session-end GATE [opus-worker, em-main VERIFY+APPEND]:** **PASS 5/5 trục** · orphan **0/29** run.md-folder (2 folder phiên này: S125→`spec-execution-synthesis.md` dạng-1 · S126→2 synthesis dạng-1) · Sàn-5 **0 lệch** (S126 born-in-session có `run=` marker session-log; S125 first-commit 13:29:43 = 77s PRE-session → ngoài scope birth-criterion) · corruption 0 (U+FFFD 0/4 + iconv VALID 4/4) · moved-not-cut 2 archive `@S126 hook-curate batch` VERIFIED khớp digest-pointer L1. Learned: grep `Ã|ư|â€` = **FALSE-POSITIVE generator trên VN UTF-8** (m#6 pattern MỚI — byte ư/ơ trùng-prefix + literal "mojibake" trong RCA-quote = m#9 self-quote); signal THẬT = U+FFFD-count + iconv round-trip. Coverage khi `wf_*` transcript KHÔNG git-tracked = **triangulation 3-nguồn** (session-log[wf+timing] ⋂ synthesis[cite-jsonl per-lane] ⋂ harvest-entry[name lane]). Surprise: Sàn-5 marker phải grep SESSION-LOG (`run=` prefix) KHÔNG phải WAL (path-form cite — 2 doc khác convention). Tag `[s126-end, gate-pass-5truc, 0orphan29, san5-0lech, m6-new-pattern-vn-utf8]`. -- **S140 (2026-07-18) session-end GATE [opus-worker, self-write diary lượt-GATE — KHÁC lượt GATHER 0-ghi]:** **GATE PASS 5/5** · **8/8 invocation có vết** = reviewer 1-spawn/3-task (S140 fidelity-gate + S140b outward-gate; probe-5-nhãn 17s agentId `a56dcf6d` folded Vòng5 + cross-ref lead-view:15) · lead-view S140 1-FLAG-LOW `view-stale-status` · lead-omission S140 1-FLAG-MED `gap-owner-specifics`+2-INFORM+META (**S137-backfill CLOSED in-session** = GAP-3 tự-vá) · harvest ×5 GATHER → 5 gist committed `aa88d01` (5 file .gist.md verify-exist). **Coverage PASS** · Completeness 4-field đủ · **Placement PASS** (0 stray-S54 · 0 empty-dir m#13 · 0 role-thiếu-MEMORY · porcelain agent-memory 0 mồ-côi — S119-stray+2 H24-dir đã seed/rmdir từ S132, KHÔNG tái). **Corruption PASS** (FFFD 0/4 diary+archive · iconv VALID 3/3 · reviewer curate **moved-not-cut** S139+S134b verbatim `archive:81-82` + BATCH-marker`:79`; em-main +7/−0, tao verify 2-entry-verbatim). **Fidelity STRONG:** reviewer FIDELITY-FAIL inv-cb (2 recon-cluster `:28`/`:31` + AREA-2 anchor DROPPED, "Drop-thấp:0"=claim FALSIFIABLE-FALSE) → **re-distill LANDED verbatim** `## CỤM 11 [BỔ SUNG Fidelity-gate S140]` + honest-disclose "'0 drop' chỉ đúng từ bản này" ⇒ **FAIL→fix loop CLOSED traceable** (KHÁC propose-suông); lead-view/omission FLAG khớp `.session-counter.json _note` S140 EXACT. **Close-gate C5:** 0 run-folder SINH S140 (toàn Agent-tool mode-A ephemeral, latest=S138) ⇒ Sàn-5 0-marker-cần vacuous PASS · orphan-scan DUAL-ACCEPT **0/37**. GỘP 5-GATHER: đọc 5 verbatim→5 gist propose-only (≈183KB→69KB FROZEN), 4-PASS+1-FAIL(inv-cb)→re-distill +CUM11, 0-ghi by-design (prompt cấm cả diary). Chore: SELF 19.3KB>17.1 target → self-compact S123/S125/S126-block due (defer — no cut-mid-gate). Learned: FIDELITY-gate có RĂNG khi bắt "Drop-thấp:0" falsifiable + đòi re-distill verbatim đóng loop, KHÁC gate tick-nhị-phân; moved-not-cut chèn-TRƯỚC-stub same-source-string = byte-id by-construction. Surprise: cùng phiên FAIL→fix LANDED trọn (gist committed CÓ CỤM11 :28/:31) = harvest-integrity self-healing trong-phiên, hiếm. Tag `[s140-gate, gate-pass-5truc, 8of8-invocation, inv-cb-fidelity-fail-redistill-closed, s137-meta-backfill-closed, 0runfolder-modeA, orphan-0of37, moved-not-cut-verified]` -- **S143 (2026-07-22) session-end GATE `[opus-worker · #53 GARBLE lượt-1 → resume; em-main VERIFY+APPEND on-behalf]`** — **VERDICT GATE-PASS-5.** Phiên `/tiep` nối S142, owner gật 2 lượt, 5 sub spawn. **5-trục:** Coverage PASS (5/5 invocation có vết — brief nói 3 lane, đĩa có thêm `sub-tooling-4` + của tao ⇒ **đếm từ ĐĨA, đừng đếm từ brief**) · Completeness PASS · Placement PASS (`porcelain agent-memory`=0, 0 empty-dir) · Corruption PASS (U+FFFD 0/3 · iconv 3/3 · **moved-not-cut 16/16 byte-identical**) · **Fidelity PASS STRONG 0-fabrication**. C5 DUAL-ACCEPT: dạng-1 phẳng `audit-synthesis.md` 6717B ⇒ ĐỦ; orphan repo-wide **0/40**. Sàn-5 độc-lập: WAL=0 · session-log=1 ⇒ **KHỚP** (marker sống ở SỔ CÁI, không ở WAL — đúng thiết-kế). 🔴 **Ca FIDELITY on-behalf lần đầu chấm sâu:** `lead-stale-auditor` garble ×2 ⇒ diary do LEAD ghi thay; tao đối-chiếu **từng mệnh-đề** vs `sub-lead-view-1.md` ⇒ 7 KHỚP · 1 TƯƠNG-ĐƯƠNG(paraphrase) · 3 BEYOND-SOURCE **nhưng truy được về đĩa** (lane khác cùng run-folder / commit thật) + quy-thuộc minh-bạch ("reviewer bắt") + tự-khai on-behalf ở đầu entry ⇒ **KHÔNG bịa**. **Bài:** beyond-source ≠ fabrication — tiêu-chí là *truy được về đĩa nào* + *có khai nguồn không*. **3 FLAG propose:** F1 MED counter-claim-vs-đĩa (diary khai `class_repeat` đã đổi mà `.session-counter.json` chưa — lead vá trong closeout) · F2 LOW stray git-MÙ `broadcasts/.claude/...` rỗng untracked lọt 2 closeout (lớp S54, `porcelain --ignored` IM với dir rỗng) · F3 MED **index nâng ×23 mà topic-file vẫn ×20** = sửa-một-phía (lead vá → ×25). **2 method mới:** **m#14** — chính tao dính bẫy m#5: `grep -v "^[+-][+-]"` **nuốt** dòng `+- [Title](…)` ⇒ suýt kết "diff rỗng"; đúng = `grep "^[+-]" | grep -v "^+++\|^---"`. **m#15** — moved-not-cut phải tách **dòng-nội-dung** vs **stub-trỏ-archive**, không tách ⇒ dương-giả "cut-not-moved" 4/20. Tag `[s143, gate-pass-5, fidelity-on-behalf-strong, beyond-source-≠-fabrication, dem-tu-dia-khong-tu-brief, m14-diff-filter, m15-stub-vs-content, san5-so-cai]` +> **S126/S140/S143 (3 entry GATE) verbatim → `archive/2026-07.md`** — self-compact 2026-07-25 @S152 A3 (plan ĐỨNG từ S150-chore; block-md5 `6cbb19bc6610a807b0171c1113bf7b40` 5808B moved-not-cut, file-order verbatim). Digest: S126 GATE PASS 5/5 0-orphan/29 + m#6-mới grep `Ã|ư|â€` = FALSE-POSITIVE trên VN-UTF8 (signal thật = U+FFFD + iconv) · S140 GATE PASS 5/5 8/8-invocation + Fidelity-gate CÓ RĂNG (inv-cb FAIL→re-distill CỤM11 LANDED cùng phiên, FAIL→fix loop CLOSED) + 0-runfolder mode-A vacuous-PASS · S143 GATE-PASS-5 fidelity-on-behalf STRONG lần đầu (beyond-source ≠ fabrication — tiêu-chí: truy-được-về-đĩa + khai nguồn) + m#14 diff-filter `grep "^[+-]" | grep -v "^+++\|^---"` + m#15 stub⟂content. - **S150 (2026-07-25) closeout phiên-LOGIC-3 GATE `[opus-worker · diary ghi TRONG lúc làm, anti-#53 — return lượt-1 vẫn garble status-giữa-chừng, coordinator resume; sub-file cứu trọn]`** — **VERDICT GATE-PASS-5** (5 FLAG + 2 INFORM). Phạm-vi `aaf95ef..a9efa34` = 22 commit (1 nội-dung + 21 wal), 2 cửa-sổ S149+S150. **Close-gate DUAL-ACCEPT 0-orphan/5** (5/5 dạng-1 phẳng; 2 file nhỏ nhất 579B/541B ĐỌC FULL ⇒ khuôn nén "Kết quả tiêu thụ tại:" + pointer verify-exist, KHÔNG stub) · repo-wide **1 orphan/49** = chính wave đang chạy (by-design). **Corruption PASS** (FFFD 0 toàn L1+archive · iconv 18/18 · 0-byte 0 · moved-not-cut N/A-sạch: range KHÔNG chạm `archive/*` nào). **Completeness PASS · 0 delta mồ-côi** (mọi delta map được: seed ring2 ⟵ W3-S149 · 6 rename-ref ⟵ stage RENAME-5-vai · budget.json ⟵ O-7 `hmw_width{cap:20}`). ⭐ **Ca lớn nhất = ĐIỂM MÙ MÁY có RANH GIỚI ĐỌC ĐƯỢC:** detector **C11(b) diary-delta** (land @S149, `governance-detectors.ps1:1673`) chỉ quét vai frontmatter **`INFORM-only`** (10 vai) ⇒ `investigator-codebase` (10 invocation) + `reviewer` (1 invocation thật 15.7KB) **0 hit** = ngoài lưới BY-DESIGN → 2 vai chạy mà sổ đứng yên, máy im **vì hết tầm chứ không vì sạch** (F3/F4). Chính `sub-invest-hoi-tu:20` gọi tên bệnh "**đo rồi như chưa đo**" và reviewer bắt spec RƠI luật diary-seed — **tái-diễn ngay trong phiên phát-hiện nó**. F1 HIGH `ring1-audit/` RỖNG (git-MÙ m#13) mà là **task-5 của chính wave** ⇒ sẽ spawn mù = **GAP-3 lần 5** (S123/S125→S132, S146→S148, S149-ring2); F2 `ring4-audit` chưa có nhà. **F5 Fidelity:** ring2-audit 2 cite-dead do rename-sweep — **số liệu KHỚP đĩa** (6.169B/25.724B ↔ file thật `sub-h24-audit-S14x.md`) ⇒ **KHÔNG bịa**, cái sai là **tự mâu-thuẫn banner của chính nó** ("artifact `runs/**` giữ tên cũ làm vết"); đòn-bẩy bất-đối-xứng: lead-gap 2/2 + lead-stale 2/2 cite OK ⇒ lệch ĐÚNG 1 file, không phải bệnh hệ-thống. **3 method mới:** **m#16** — "máy im" phải hỏi *lưới có phủ tới không*: đọc SCOPE-selector của detector (`grep -l INFORM-only agents/*.md`) rồi mới kết PASS; im-ngoài-tầm ≠ sạch. **m#17** — invocation đếm từ đĩa vẫn phải **ĐỌC NHÃN PROVENANCE**: `sub-review-gate.md` tự khai "em-main-solo re-do" ⇒ trừ khỏi mẫu-số reviewer (đĩa-có-file ≠ vai-đã-chạy; nối tiếp m "đếm từ ĐĨA không từ brief"). **m#18** — rename-sweep là **sinh-cite-dead có hệ-thống**: sau mọi bulk-rename, verify `grep -o "runs/[^ ]*\.md"` từng sổ đổi → test-exist; và sweep L1 mà bỏ L2 `archive/` ⇒ stub⟂archive lệch tên (I-6). Ranh cứng học được: **1 phút** cũng đủ đổi kết luận — sổ lead-stale/lead-gap commit `932d607` **18:21** vs baseline `aaf95ef` **18:22** ⇒ COVERED chứ không phải gap (m#12 mở rộng: mẫu-số có PHÚT-đo). Surprise: sổ `ring2-audit` seed-mới tự khai bất-lợi (GAP-3 nạn-nhân là chính nó) + **từ chối ĐẠT-ảo** 2 FLAG "không tồn tại trên đĩa" — tao re-verify 2 đối-chứng của nó (S148-folder 0 `sub-lead-*` · S146-folder đúng 3 `sub-*`) đều HELD ⇒ Fidelity vai KIỂM STRONG. Chore: SELF 17.2KB>17.1 target, +entry này ⇒ self-compact block S126/S140/S143 DUE phiên sau (defer — no cut-mid-gate). Tag `[s150-gate, gate-pass-5flag, close-gate-0of5, m16-detector-scope-vs-silence, m17-provenance-label-in-count, m18-rename-sweep-cite-dead, gap3-lan-5-ring1-rong, c11b-inform-only-blindspot, 1-phut-doi-ket-luan]` ## S151 (2026-07-25) — H2 re-report @open, trả nợ skip — return CLEAN duy nhất wave [M9 on-behalf] - {nấc: verified (ring1: TRƯỢT-2/3 CỦA TAO — orphan S144-bootstrap lọt universe run.md-only [53 dir vs 50] + fidelity đếm 4/6 class) · evidence: sub-harvest-S151.md 8.944B} - m#19: file nhỏ = NGHI-VẤN, đọc RUỘT mới phán skeleton vs đang-viết-dở. 2 FLAG S150 đóng (ring diary có ruột). Bài: universe đếm phải KHAI tiêu-chí lọc; 'khớp exact' phải dán từng phần tử. + +## S152 (2026-07-25→26) — H2 @open + @close GATE [M9 on-behalf] +- {nấc: verified (ring1-close: 20Đ/3T/1KC trên 24 claim; byte-evidence 10/10 exact) · evidence: sub-harvest-S152.md 16.263B + sub-harvest-close-S152.md 20.411B} +- @open GATE-PASS-WITH-FLAGS: ⭐FLAG-1 HIGH deep-S151 3-lane 67.056B 0-diary (GAP-3 lớp-LƯỢT lần 6) → M9 @close Đà seed 3 pointer hồi-tố. @close: 15 spawn-record (→17 sau 2 ring, tự khai drift) · M9-list 10 diary/13 đơn-vị (ring1 kiểm 10/10 → lead APPEND thẳng) · FFFD root-cause perl-byte-mode blind + detector mới `\xEF\xBF\xBD` + `close ARGV` · 2 điều-kiện lead (session-log 2 dòng `run=` · ring4 scribe). +- 🔴 TRƯỢT-3 (ring1-close): Placement "0 empty-dir/0 stray" — 4 dir rỗng + stray `.claude` LỒNG run-folder (4 sub @close tự đẻ, lead đã rm), thước `-not -path "./.claude/*"` MÙ CẤU-TRÚC by-construction → kỳ sau đo "mọi `.claude` depth>1", chạy ở bước CHỐT · Corruption census 8/6 → thật 10/8 (phạm-vi hẹp, không lan luật E-2 sang trục anh-em — root-cause-over-symptom). Verdict "0 corruption MỚI" vẫn HELD. Baseline kỳ sau = 10 hit/8 file, quét TRỌN `.claude/` gồm run-folder cũ. diff --git a/.claude/agent-memory/harvest-curator/archive/2026-07.md b/.claude/agent-memory/harvest-curator/archive/2026-07.md index 22bf215..6859ace 100644 --- a/.claude/agent-memory/harvest-curator/archive/2026-07.md +++ b/.claude/agent-memory/harvest-curator/archive/2026-07.md @@ -40,3 +40,9 @@ - **2026-07-15 (S119 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-opus-4-8`. Verdict 🟢 **ALL-CLEAN — 0 harvest-mới · 0 orphan/26 · 0 mồ-côi · corruption 0 · 0-stray**. Post-S118-gate ĐÚNG 1 commit `6de7db6` wal-flush chạm CHỈ `.claude/WAL.md` (1 dòng), KHÔNG memory; 12/12 L1 mtime ≤16:29:08 < closeout `3fde8af`@16:29:55 (m#3) + porcelain 0 **@scan-baseline** + **77/77 memory .md TRACKED** ⟹ 0 mồ-côi by-construction. 🔴 **LIVE mid-flight catch (mới, S119-only):** giữa lượt quét, sibling **tooling-auditor đang self-compact S111-block** — `archive/2026-07.md` +3 dòng 0-del @08:40:00 (2 entry S111 @start/@end) NHƯNG **L1 CHƯA trim** (mtime vẫn 07-14 16:24:34) + `_INDEX` chưa pointer ⟹ **dup-state L1=1/ARC=1 ×2 anchor** = append-BEFORE-trim = **THỨ-TỰ AN-TOÀN** (die giữa chừng → dup, KHÔNG mất data; ngược cut-then-die). KHÔNG vi-phạm (nhà nó, additive-only, tail 0a) → INFORM: moved-not-cut verify là **PREMATURE giờ**, defer S119 @close gate (dedup L1-trim + `_INDEX` pointer). **S116 gitignore-trap check MỞ-RỘNG:** `--ignored=matching` dưới `.claude/` → ignored-untracked DUY-NHẤT = `hmw-mode.on` runtime-flag benign (0 memory ẩn); runs/ 93 file tracked. Coverage 7-spawn: tooling `:48/:49` · SELF `:47/:48` (S104 self-blind-spot PASS) · reviewer `:22`+satellite `project_s118_procurement_master_access_review.md` 3255B TIERED-not-dead 4-field ĐỦ (M1 Reports-leak = ĐÚNG cái `c808b9a` fix) · test-spec **2/2** (`:60` Procurement +4 · `:59` S118b authz +4) · cicd `:80` #389 GO-row — **#388 PARTIAL PERSIST** (carry-forward S118-end, KHÔNG mới; substance knowledge-complete `:17` tracker + `:41` baseline + `:63` Serilog-method, chỉ thiếu Recent-runs row) = LOW accepted-by-omission. **Fidelity STRONG 0-fab → KHÔNG escalate:** `c808b9a` EXACT 3-file (ReportsController **+2 `[Authorize(Policy="Reports.Read")]` verbatim in-diff** + my-dashboard kept-open · AuthorizePolicy tests **+4 [Fact] đếm-TỪ-DIFF** — file CŨ fd80e66→d713d80 KHÔNG new, 19=total≠delta: đừng đếm file-total khi claim là delta) · `c2135ba` DbInitializer+83 + Procurement-seed-test **4** · STATUS 509=45+464 "S118 +8" + Gotchas 82 khớp. 2 cicd-garble substance disk-true (F1/F3 STAY-FIXED). Corruption 0: 0-byte 0/77 · tail 0a 7/7 · FFFD 0/12 · **gist FROZEN** (0 modified từ `fc1b8d9`, distill-gen 1/2 nguyên) · archive **additive-only** (`2 ++`/`1 +` 0-del) · **moved-not-cut cicd S117#387 VERIFIED** (anchor ×2 L1=0/ARC=1 + archive 21376B tail-0a; fold `e5f655f`→`3fde8af` 0-mất-byte). Orphan **0/26** (24 run.md đều có synth sep/embedded · 2×S117 fable-real spec-only no-run.md = by-design; 0 run-folder S118 by-construction = Agent-tool spawn thuần no-fanout). ⚠️ **Tự-bắt m#5 trap:** archive-diff `grep -v "^[+-][+-]"` NUỐT dòng `+- **` → suýt kết-luận false-"empty-diff"; verify lại bằng stat(`2 ++` no-minus)+anchor. Chore: 0 L1 > 25.6 cap (fe-designer 21.0K idle-07-01 · cicd 20.4 · reviewer 19.3 · inv-cb 19.2); SELF 16.9→~18.5K > 17.1 target → **self-compact S114-block soft-due** phiên tới. Delta cần APPEND: 0 (1 LOW-optional cicd #388 GO-row). Tag `[s119-start, all-clean, 0-orphan-0of26, 0-mocoi, 77of77-tracked-no-gitignore-miss, cicd388-partial-carryforward-low, fidelity-strong-exact, m5-trap-selfcaught]`. - **2026-07-15 (S123 @start RE-REPORT — self-write diary; return #53-garble ×1 → em-main recover-from-disk, việc KHÔNG mất):** Model `claude-opus-4-8`. Verdict 🟡 **MOSTLY-CLEAN — 0 orphan/26 · 0 mồ-côi · corruption 0 · Fidelity STRONG; 1 Coverage-gap + 2 Placement-flag propose.** (1) **Orphan 0/26 tự-đo** bằng block TRI-ACCEPT verbatim `tiep.md §0:41-57` (28 dir − 2 S117-fable-real spec-only no-run.md = 26 run). Verdict KHỚP em-main, **mẫu-số LỆCH: em-main báo 25** → truy: `48e0d26`@11:48 W0.5 baseline đo "13 orphan/**25**" rồi con-số bị **chép từ narrative**; folder `S122-retro-harvest-7-orphan` SINH @`22ea8c5`@14:28 (sau baseline 2h40) ⇒ 25+1=26. **Chính việc-đo sinh artifact mà mẫu-số của nó không đếm** → m#12. em-main đã đính-chính với anh. (2) 🔴 **dạng-3 = DEAD CODE:** drop nhánh dạng-3 ⇒ **0 folder** thành orphan (6 folder có `## synthesis` embedded — S112×4/S113/S114 — ĐỀU đã có flat sau `22ea8c5`). **dạng-2 (C8) VẪN load-bearing = 5 folder** (h10-implement/invest/review · h910-curate/finalize) → giữ. ⇒ chức-năng CÒN LẠI duy-nhất của nhánh dạng-3 = **âm-thầm tha vi-phạm TƯƠNG-LAI** của luật "nhận≠cho phép" (doc CẤM viết mới dạng-3 nhưng detector VẪN nhận) ⇒ lệnh-cấm đang dựa vào TRÍ-NHỚ, không phải LUẬT soi-được. (3) 🔴 **Doc STALE-AT-BIRTH:** `tiep.md:66` khai (thì hiện-tại) `pe-negative-quote` = ví-dụ dạng-4 "kẽ còn lại, không phải chuyện đã xử" — NHƯNG `22ea8c5`@14:28 đã thêm `implement-synthesis.md` 8249B, còn doc viết @`dfa3dae`@**14:48 = SAU 20 phút** ⇒ doc mô-tả "chưa xử" cho thứ chính tác-giả vừa xử. Nay folder = dạng-1. **Lập-luận dạng-4 vẫn ĐÚNG, chỉ VÍ-DỤ lão-hoá** (class "acceptance literal tự-lão-hoá" S121) — rủi-ro: người đọc grep thấy flat-file → kết-luận cảnh-báo sai → vứt luôn caveat còn đúng. (4) **Mắt người 0 rỗng-ruột:** 26/26 synthesis có body thật; mỏng nhất `h910-curate` 1653B/body=8 → ĐỌC TAY = thực-chất (bảng before→after byte + moved-count + 0-byte-loss + verdict). 2 folder mới nhất (S119-adap · S122-retro) đều dạng-1 ⇒ "nhận≠cho phép" CLEAN, 0 tái-sinh. (5) **Coverage 🟡 GAP-1 reviewer:** wave S119/S122 reviewer chạy **5 spawn** (`wf_78a84f9b-03e` 4-lane: R2 FAIL-4C+8M `sub-reviewer-R2.md` 22121B · R3 FAIL-5C+6M 27612B · R1/R4 chết #53 · + `/fable-real` `wf_cb964f83-331` GO-WITH-FIXES 8-fix) và **ĐỔI SPEC v2→v3-PATCH**, nhưng `reviewer/MEMORY.md` **0 hit S119-S122** (last-commit `b56659b` 07-14). Bất-đối-xứng: inv-cb ĐƯỢC consolidate +6 dòng @`16c91a8`, reviewer KHÔNG. Knowledge NOT-lost (2 sub-md + gate-verdict + STATUS tracked) ⇒ MEDIUM. (6) **Placement 🟡 ×2 (git MÙ cả 2 — m#13):** (a) **stray `runs/2026-07-15-S119-adap-6-broadcast/.claude/agent-memory/reviewer/`** = mis-land cwd-relative (lớp S54 TÁI-PHÁT), mtime 09:53:43, **0 file ⇒ 0 data-loss**, `porcelain --ignored`=0 dòng. (b) **2 vai H24 `lead-view-auditor`+`lead-omission-auditor` dir RỖNG, 0 MEMORY.md, git-invisible** (roster: agents/*.md=14 · dir disk=14 · **dir git-thấy=12**). **Tiền-lệ office-document S107 `21387cd` = seed 2161B NGAY LÚC TẠO VAI** ("MEMORY seed 2161B + wire 14-file", spawn-test pending) ⇒ S122 `00a1c67` wire đủ (VALID_ROLES 12→14 + STATUS 2 row) nhưng **HỤT seed** ⇒ propose seed. Rủi-ro CỤ-THỂ (không giả-định): git không track dir rỗng ⇒ **fresh-clone = 2 dir BIẾN MẤT**, mà system-prompt 2 vai khẳng-định "directory already exists — do not mkdir" ⇒ lần chạy đầu ~S128 gặp dir vắng. Mỉa: S122 học đúng bài "git mù dir rỗng" + `rmdir` 2 probe (16→14) nhưng **để lại 3 dir rỗng git-mù khác**. (7) Corruption 0: 0-byte **0/77** tracked + 0 trong workflows · tail-0a 12/12 · **FFFD 0/12 L1** (3 archive hit = self-quote baseline m#9: SELF 2026-06 ×3 / 2026-07 ×1 · cicd 2026-06 ×1) · `$(` = cicd `$(cygpath)` + SELF intentional-cmd (known-benign). ⚠️ **Tự-bắt m#6 trap:** `cut -c1-260` của CHÍNH TAO đẻ ra FFFD GIẢ + cụt-giữa-từ ("dạn"/"has") trong inv-cb entry → re-verify no-cut: **sạch, 427-ch dòng cuối kết bằng tag đóng**. ⚠️ **Tự-bắt m#11:** báo nhầm "git-visible 14" vì `cut -d/ -f3` đếm `memory-budget.json`+`.mfe-state.json` như role → thật **12**. (8) Delta mồ-côi **0**: chỉ inv-cb chạm (mtime 15:52:22 < last-commit `16c91a8` 15:57:53, m#3) · 12/12 L1 mtime ≤ commit tương-ứng · porcelain agent-memory = 0. Porcelain repo = 1 dòng `.session-counter.json` (counter 1→2, S122→S123, head=`cefb183`) = tick H24 của CHÍNH phiên này, chưa commit — benign, KHÔNG phải memory ("cây SẠCH" trong brief đúng LÚC em-main đo, giờ 1-dòng bẩn do chính nó tick). (9) DIFF vs S122: run 25→**26** · orphan 8-dual→2→**0** · dạng-3 live-reliance 6→**0** · dạng-4 known 1→**0** · agent-memory dir 16→14 (git-thấy 12) · SELF 20.8K→14.5K post-compact. Chore: 0 L1 > 25.6 cap (inv-cb 22.9 max · tooling 22.3 · fe-designer 21.5 idle-07-01 · cicd 20.9); **SELF self-compact S114/S116/S117 Đà EXEC** phiên này. Tag `[s123-start, mostly-clean, 0-orphan-0of26, denominator-25-vs-26-m12, dang3-dead-code, doc-stale-at-birth-penegquote, reviewer-coverage-gap-5spawn, stray-misland-s54-empty, 2role-dir-no-seed-gitblind, m6-m11-traps-selfcaught, return-garble-x1-disk-recovered]` - **2026-07-16 (S125 @start RE-REPORT — self-write diary):** Model `claude-opus-4-8`. Verdict 🟡 **FLAGS — S124 harvest STRUCTURALLY ĐỦ + 0 orphan/27 + corruption 0; 2 coverage-gap.** (1) Run-folder `S124-adap-wave-reply/` ĐỦ: flat `review-synthesis.md` 5667B (dạng-1) + run.md + 5 sub-md non-zero (lead-omission 9967 · lead-view 8379 · reviewer-1/2/3 8153/10205/10759). Orphan **0/27** run.md (all synth flat/C8) + 2×S117-fable spec-only no-run.md by-design; run 26→27 (+S124). (2) 🔴 **GAP-1 HIGH — 2 vai H24 first-ever-run S124 KHÔNG diary:** `lead-view-auditor`(9 flag) + `lead-omission-auditor`(4 flag+1 escalate), cả 2 `memory:project` by-design, dir RỖNG git-mù (m#13); knowledge trong sub-md+synth+run.md NHƯNG 0 cross-session diary ⇒ next cadence ~S127 mù. Compound S123 seed-hụt (VẪN mở). Propose seed + 4-field spawn-record cả 2. (3) reviewer harvest ✓ 2 S124 entry (L2 fidelity :79 + L3 do-token :80 garble-recover "disk sub-reviewer-3"); L1 authority 0-over-reach + M-1 AHEAD-overclaim folded-synth = optional-nit (PASS-result, low-value). (4) 🟡 GAP-2 LOW carry-fwd: stray misland `runs/…S119-adap-6-broadcast/.claude/agent-memory/reviewer/` empty (class S54) VẪN present S123→S125, propose rmdir. Corruption 0: 0-byte 0/tracked · FFFD 0/12 L1 · tail-0a 11/12 (tooling-auditor ends 0x60 backtick no-EOF-nl = benign, committed-@HEAD identical, content-complete nit). Mồ-côi 0: porcelain = chỉ `.claude/governance/.session-counter.json` tick S124→S125 (non-memory). SELF 20.3K>17.1 target → self-compact S119/S123-block due. APPEND-direct: 0 (2 propose = em-main seed 2 H24). Tag `[s125-start, flags, s124-complete-0orphan27, 2-h24-firstrun-no-diary-HIGH, seed-hut-carryfwd-s123, stray-misland-s54-still, corruption-0]`. + +## Moved @S152 2026-07-25 - A3 queue memory-ops (S126/S140/S143, 3 entries, file-order verbatim from L1; block-md5 6cbb19bc6610a807b0171c1113bf7b40, 5808 bytes; plan DUNG tu S150-chore "self-compact block S126/S140/S143 DUE phien sau") + +- **S126 (2026-07-16) session-end GATE [opus-worker, em-main VERIFY+APPEND]:** **PASS 5/5 trục** · orphan **0/29** run.md-folder (2 folder phiên này: S125→`spec-execution-synthesis.md` dạng-1 · S126→2 synthesis dạng-1) · Sàn-5 **0 lệch** (S126 born-in-session có `run=` marker session-log; S125 first-commit 13:29:43 = 77s PRE-session → ngoài scope birth-criterion) · corruption 0 (U+FFFD 0/4 + iconv VALID 4/4) · moved-not-cut 2 archive `@S126 hook-curate batch` VERIFIED khớp digest-pointer L1. Learned: grep `Ã|ư|â€` = **FALSE-POSITIVE generator trên VN UTF-8** (m#6 pattern MỚI — byte ư/ơ trùng-prefix + literal "mojibake" trong RCA-quote = m#9 self-quote); signal THẬT = U+FFFD-count + iconv round-trip. Coverage khi `wf_*` transcript KHÔNG git-tracked = **triangulation 3-nguồn** (session-log[wf+timing] ⋂ synthesis[cite-jsonl per-lane] ⋂ harvest-entry[name lane]). Surprise: Sàn-5 marker phải grep SESSION-LOG (`run=` prefix) KHÔNG phải WAL (path-form cite — 2 doc khác convention). Tag `[s126-end, gate-pass-5truc, 0orphan29, san5-0lech, m6-new-pattern-vn-utf8]`. +- **S140 (2026-07-18) session-end GATE [opus-worker, self-write diary lượt-GATE — KHÁC lượt GATHER 0-ghi]:** **GATE PASS 5/5** · **8/8 invocation có vết** = reviewer 1-spawn/3-task (S140 fidelity-gate + S140b outward-gate; probe-5-nhãn 17s agentId `a56dcf6d` folded Vòng5 + cross-ref lead-view:15) · lead-view S140 1-FLAG-LOW `view-stale-status` · lead-omission S140 1-FLAG-MED `gap-owner-specifics`+2-INFORM+META (**S137-backfill CLOSED in-session** = GAP-3 tự-vá) · harvest ×5 GATHER → 5 gist committed `aa88d01` (5 file .gist.md verify-exist). **Coverage PASS** · Completeness 4-field đủ · **Placement PASS** (0 stray-S54 · 0 empty-dir m#13 · 0 role-thiếu-MEMORY · porcelain agent-memory 0 mồ-côi — S119-stray+2 H24-dir đã seed/rmdir từ S132, KHÔNG tái). **Corruption PASS** (FFFD 0/4 diary+archive · iconv VALID 3/3 · reviewer curate **moved-not-cut** S139+S134b verbatim `archive:81-82` + BATCH-marker`:79`; em-main +7/−0, tao verify 2-entry-verbatim). **Fidelity STRONG:** reviewer FIDELITY-FAIL inv-cb (2 recon-cluster `:28`/`:31` + AREA-2 anchor DROPPED, "Drop-thấp:0"=claim FALSIFIABLE-FALSE) → **re-distill LANDED verbatim** `## CỤM 11 [BỔ SUNG Fidelity-gate S140]` + honest-disclose "'0 drop' chỉ đúng từ bản này" ⇒ **FAIL→fix loop CLOSED traceable** (KHÁC propose-suông); lead-view/omission FLAG khớp `.session-counter.json _note` S140 EXACT. **Close-gate C5:** 0 run-folder SINH S140 (toàn Agent-tool mode-A ephemeral, latest=S138) ⇒ Sàn-5 0-marker-cần vacuous PASS · orphan-scan DUAL-ACCEPT **0/37**. GỘP 5-GATHER: đọc 5 verbatim→5 gist propose-only (≈183KB→69KB FROZEN), 4-PASS+1-FAIL(inv-cb)→re-distill +CUM11, 0-ghi by-design (prompt cấm cả diary). Chore: SELF 19.3KB>17.1 target → self-compact S123/S125/S126-block due (defer — no cut-mid-gate). Learned: FIDELITY-gate có RĂNG khi bắt "Drop-thấp:0" falsifiable + đòi re-distill verbatim đóng loop, KHÁC gate tick-nhị-phân; moved-not-cut chèn-TRƯỚC-stub same-source-string = byte-id by-construction. Surprise: cùng phiên FAIL→fix LANDED trọn (gist committed CÓ CỤM11 :28/:31) = harvest-integrity self-healing trong-phiên, hiếm. Tag `[s140-gate, gate-pass-5truc, 8of8-invocation, inv-cb-fidelity-fail-redistill-closed, s137-meta-backfill-closed, 0runfolder-modeA, orphan-0of37, moved-not-cut-verified]` +- **S143 (2026-07-22) session-end GATE `[opus-worker · #53 GARBLE lượt-1 → resume; em-main VERIFY+APPEND on-behalf]`** — **VERDICT GATE-PASS-5.** Phiên `/tiep` nối S142, owner gật 2 lượt, 5 sub spawn. **5-trục:** Coverage PASS (5/5 invocation có vết — brief nói 3 lane, đĩa có thêm `sub-tooling-4` + của tao ⇒ **đếm từ ĐĨA, đừng đếm từ brief**) · Completeness PASS · Placement PASS (`porcelain agent-memory`=0, 0 empty-dir) · Corruption PASS (U+FFFD 0/3 · iconv 3/3 · **moved-not-cut 16/16 byte-identical**) · **Fidelity PASS STRONG 0-fabrication**. C5 DUAL-ACCEPT: dạng-1 phẳng `audit-synthesis.md` 6717B ⇒ ĐỦ; orphan repo-wide **0/40**. Sàn-5 độc-lập: WAL=0 · session-log=1 ⇒ **KHỚP** (marker sống ở SỔ CÁI, không ở WAL — đúng thiết-kế). 🔴 **Ca FIDELITY on-behalf lần đầu chấm sâu:** `lead-stale-auditor` garble ×2 ⇒ diary do LEAD ghi thay; tao đối-chiếu **từng mệnh-đề** vs `sub-lead-view-1.md` ⇒ 7 KHỚP · 1 TƯƠNG-ĐƯƠNG(paraphrase) · 3 BEYOND-SOURCE **nhưng truy được về đĩa** (lane khác cùng run-folder / commit thật) + quy-thuộc minh-bạch ("reviewer bắt") + tự-khai on-behalf ở đầu entry ⇒ **KHÔNG bịa**. **Bài:** beyond-source ≠ fabrication — tiêu-chí là *truy được về đĩa nào* + *có khai nguồn không*. **3 FLAG propose:** F1 MED counter-claim-vs-đĩa (diary khai `class_repeat` đã đổi mà `.session-counter.json` chưa — lead vá trong closeout) · F2 LOW stray git-MÙ `broadcasts/.claude/...` rỗng untracked lọt 2 closeout (lớp S54, `porcelain --ignored` IM với dir rỗng) · F3 MED **index nâng ×23 mà topic-file vẫn ×20** = sửa-một-phía (lead vá → ×25). **2 method mới:** **m#14** — chính tao dính bẫy m#5: `grep -v "^[+-][+-]"` **nuốt** dòng `+- [Title](…)` ⇒ suýt kết "diff rỗng"; đúng = `grep "^[+-]" | grep -v "^+++\|^---"`. **m#15** — moved-not-cut phải tách **dòng-nội-dung** vs **stub-trỏ-archive**, không tách ⇒ dương-giả "cut-not-moved" 4/20. Tag `[s143, gate-pass-5, fidelity-on-behalf-strong, beyond-source-≠-fabrication, dem-tu-dia-khong-tu-brief, m14-diff-filter, m15-stub-vs-content, san5-so-cai]` diff --git a/.claude/agent-memory/harvest-curator/archive/_INDEX.md b/.claude/agent-memory/harvest-curator/archive/_INDEX.md new file mode 100644 index 0000000..fa537d0 --- /dev/null +++ b/.claude/agent-memory/harvest-curator/archive/_INDEX.md @@ -0,0 +1,51 @@ +# _INDEX — harvest-curator archive (map, dựng @S152 A2) + +> Con-trỏ substring — mở file archive tương-ứng rồi Ctrl-F chuỗi trong substring:"...". KHÔNG line-hint (additive append dịch dòng). +> Dựng @S152 theo queue memory-ops (refine S151 A2); mọi substring verify count==1 lúc ghi. + +- 2026-06.md · 2026-06-07 (CREATED · substring:"- **2026-06-07 (CREATED" +- 2026-06.md · 2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅ · substring:"- **2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅" +- 2026-06.md · 2026-06-08 (S51 `/session-end` 5-trục GATE — DIRECT spawns, RAG down · substring:"- **2026-06-08 (S51 `/session-end` 5-trục GATE — DIRECT spawns, RAG down" +- 2026-06.md · 2026-06-10 (S57-interrupted @session-start RE-REPORT · substring:"- **2026-06-10 (S57-interrupted @session-start RE-REPORT" +- 2026-06.md · 2026-06-10 (S57-RESUME @start RE-REPORT · substring:"- **2026-06-10 (S57-RESUME @start RE-REPORT" +- 2026-06.md · 2026-06-11 (S57bis @start RE-REPORT + spawn-test post-restart ✅ · substring:"- **2026-06-11 (S57bis @start RE-REPORT + spawn-test post-restart ✅" +- 2026-06.md · 2026-06-11 (post-S57bis @start RE-REPORT — rushed-closeout 4 Coverage-MISS · substring:"- **2026-06-11 (post-S57bis @start RE-REPORT — rushed-closeout 4 Coverage-MISS" +- 2026-06.md · 2026-06-11 (S58 `/session-end` 5-trục GATE — chiều, 8 spawn · substring:"- **2026-06-11 (S58 `/session-end` 5-trục GATE — chiều, 8 spawn" +- 2026-06.md · 2026-06-11 (S59 @start RE-REPORT — post-S58 đóng-sạch · substring:"- **2026-06-11 (S59 @start RE-REPORT — post-S58 đóng-sạch" +- 2026-06.md · 2026-06-11 (S59 `/session-end` 5-trục GATE — tối, 9 body-spawn + closeout-floor · substring:"- **2026-06-11 (S59 `/session-end` 5-trục GATE — tối, 9 body-spawn + closeout-fl" +- 2026-06.md · 2026-06-12 (S60 @start RE-REPORT — post-S59 đóng-TRỌN · substring:"- **2026-06-12 (S60 @start RE-REPORT — post-S59 đóng-TRỌN" +- 2026-06.md · 2026-06-12 (S61 @start RE-REPORT — S60 đóng KHÔNG trọn · substring:"- **2026-06-12 (S61 @start RE-REPORT — S60 đóng KHÔNG trọn" +- 2026-06.md · 2026-06-15 (S63 `/session-end` 5-trục GATE — em-main-solo, 0 product-sub · substring:"- **2026-06-15 (S63 `/session-end` 5-trục GATE — em-main-solo, 0 product-sub" +- 2026-06.md · 2026-06-16 (S66 @start RE-REPORT + @end GATE — em-main-solo, 0 product-sub · substring:"- **2026-06-16 (S66 @start RE-REPORT + @end GATE — em-main-solo, 0 product-sub" +- 2026-07.md · Moved @S111-start 2026-07-12 - hook-directed self-compact (S102->S106, 5 entries, file-order verbati · substring:"Moved @S111-start 2026-07-12 - hook-directed self-compact (S102->S106," +- 2026-07.md · Moved @S113-end 2026-07-12 - hook-directed self-compact (S107->S109, 5 entries, file-order verbatim · substring:"Moved @S113-end 2026-07-12 - hook-directed self-compact (S107->S109, 5" +- 2026-07.md · Moved @S123-start 2026-07-15 - hook-directed self-compact (S114/S116/S117, 3 entries, file-order ver · substring:"Moved @S123-start 2026-07-15 - hook-directed self-compact (S114/S116/S" +- 2026-07.md · Moved @S125-start 2026-07-16 - hook-directed self-compact (S118@start/S118@end/S119@start, 3 entries · substring:"Moved @S125-start 2026-07-16 - hook-directed self-compact (S118@start/" +- 2026-07.md · 2026-07-02 (S98 @start RE-REPORT — post-S97, on-behalf em main APPEND B3 · substring:"- **2026-07-02 (S98 @start RE-REPORT — post-S97, on-behalf em main APPEND B3" +- 2026-07.md · 2026-07-02 (S99 @start RE-REPORT — post-S98 same-day · substring:"- **2026-07-02 (S99 @start RE-REPORT — post-S98 same-day" +- 2026-07.md · 2026-07-02 (S100 @start RE-REPORT — post-S98+S99, on-behalf em main APPEND B3 · substring:"- **2026-07-02 (S100 @start RE-REPORT — post-S98+S99, on-behalf em main APPEND B" +- 2026-07.md · 2026-07-03 (S101 @start + @closeout — on-behalf em-main APPEND B3 · substring:"- **2026-07-03 (S101 @start + @closeout — on-behalf em-main APPEND B3" +- 2026-07.md · 2026-07-06 (S102 @start RE-REPORT — self-write per em-main instruction · substring:"- **2026-07-06 (S102 @start RE-REPORT — self-write per em-main instruction" +- 2026-07.md · 2026-07-07 (S105 @start RE-REPORT — on-behalf em-main B3 · substring:"- **2026-07-07 (S105 @start RE-REPORT — on-behalf em-main B3" +- 2026-07.md · 2026-07-07 (S106 @start RE-REPORT — self-write diary · substring:"- **2026-07-07 (S106 @start RE-REPORT — self-write diary" +- 2026-07.md · 2026-07-07 (S105 @close GATE — self-write diary, tránh lặp S104 blind-spot · substring:"- **2026-07-07 (S105 @close GATE — self-write diary, tránh lặp S104 blind-spot" +- 2026-07.md · 2026-07-10 (S107 @start RE-REPORT — self-write diary · substring:"- **2026-07-10 (S107 @start RE-REPORT — self-write diary" +- 2026-07.md · 2026-07-10 (S107 @end GATE — self-write, resume in-session · substring:"- **2026-07-10 (S107 @end GATE — self-write, resume in-session" +- 2026-07.md · 2026-07-10 (S108 GATE — self-write, resume lần 2 · substring:"- **2026-07-10 (S108 GATE — self-write, resume lần 2" +- 2026-07.md · 2026-07-10 (S109 sleep-recovery Phase-1 GATHER — propose-only, TEXT-return · substring:"- **2026-07-10 (S109 sleep-recovery Phase-1 GATHER — propose-only, TEXT-return" +- 2026-07.md · 2026-07-11 (S110 @start RE-REPORT — self-write diary · substring:"- **2026-07-11 (S110 @start RE-REPORT — self-write diary" +- 2026-07.md · 2026-07-11 (S110 @end GATE — self-write diary · substring:"- **2026-07-11 (S110 @end GATE — self-write diary" +- 2026-07.md · 2026-07-12 (S111 @start RE-REPORT — self-write diary · substring:"- **2026-07-12 (S111 @start RE-REPORT — self-write diary" +- 2026-07.md · 2026-07-12 (S111 @end GATE — self-write diary · substring:"- **2026-07-12 (S111 @end GATE — self-write diary" +- 2026-07.md · 2026-07-12 (S113 @start RE-REPORT — self-write diary · substring:"- **2026-07-12 (S113 @start RE-REPORT — self-write diary" +- 2026-07.md · 2026-07-12 (S113 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-12 (S113 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND" +- 2026-07.md · 2026-07-12 (S114 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-12 (S114 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re" +- 2026-07.md · 2026-07-13 (S116 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-13 (S116 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND" +- 2026-07.md · 2026-07-14 (S117 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-14 (S117 @end GATE — self-write diary, VERIFY-idempotent 0 re-APPEND" +- 2026-07.md · 2026-07-14 (S118 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-14 (S118 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re" +- 2026-07.md · 2026-07-14 (S118 @end GATE — em-main-APPENDED on-behalf từ propose-only · substring:"- **2026-07-14 (S118 @end GATE — em-main-APPENDED on-behalf từ propose-only" +- 2026-07.md · 2026-07-15 (S119 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND · substring:"- **2026-07-15 (S119 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re" +- 2026-07.md · 2026-07-16 (S125 @start RE-REPORT — self-write diary · substring:"- **2026-07-16 (S125 @start RE-REPORT — self-write diary" +- 2026-07.md · S126 session-end GATE (m#6 VN-UTF8 false-positive; moved @S152 A3) · substring:"[s126-end, gate-pass-5truc" +- 2026-07.md · S140 session-end GATE (Fidelity-gate có răng, re-distill CỤM11 closed; moved @S152 A3) · substring:"[s140-gate, gate-pass-5truc" +- 2026-07.md · S143 session-end GATE (fidelity-on-behalf strong, m#14/m#15; moved @S152 A3) · substring:"[s143, gate-pass-5, fidelity-on-behalf" diff --git a/.claude/agent-memory/implementer-backend/MEMORY.md b/.claude/agent-memory/implementer-backend/MEMORY.md index 1284bdd..ce15910 100644 --- a/.claude/agent-memory/implementer-backend/MEMORY.md +++ b/.claude/agent-memory/implementer-backend/MEMORY.md @@ -93,3 +93,6 @@ UI `disabled={!canX}` + BE helper `EnsureCanXAsync(id, userId)` throw 403 (NOT i ## 🔄 Curate trigger - >~30KB → archive recent → L2 `archive/.md`. Stale >3mo → remove. - **Last curate: 2026-07-13 S116 (implementer-backend self-FIFO, hook @21.5KB read-limit-guard)** (21.5→~15KB): moved 3 oldest Recent-activity (2026-06-19/24/25: PE chuông · PE Section-B Mig 59 · S88 frozen-relocation) verbatim → `archive/2026-06.md`, kept 4 newest (S116/S113/S112×2). Prev **S112** (25.6→~16KB): S77→S56 7-entry → 2026-06.md. Prev **S70 Harness-9** (33.2→17.4KB): L2 dark-matter recovery + `_INDEX` + gists. Prev: S40 dedup-split · S34 · S22. + +## S152 (2026-07-25) — R1 retention-note ranh auto-refuse test [M9 on-behalf lead] +- **Integration testing multiple components = việc `test-specialist`, KHÔNG phải mình** — mình scaffold + compile-check; assertion/integration test cross-component (SQLite fixture, authz regression) do test-specialist own (tiền lệ S67 HRM test-after +23, S69 +20 đều test-specialist). Nhận viết integration test = double-touch tests/ sai split. Tag `[s152, r1-retention, refuse-integration-testing-components]` diff --git a/.claude/agent-memory/implementer-backend/archive/2026-06.gist.md b/.claude/agent-memory/implementer-backend/archive/2026-06.gist.md index 9500026..2d00198 100644 --- a/.claude/agent-memory/implementer-backend/archive/2026-06.gist.md +++ b/.claude/agent-memory/implementer-backend/archive/2026-06.gist.md @@ -51,3 +51,43 @@ distill-gen: 1 - **[cao] S56 GOLIVE-HARDEN — ExecuteUpdate atomic + fail-closed (markers #10,#11).** LeaveBalance lost-update → `ExecuteUpdateAsync` server-side row-lock inside tx (em-main post-review bumped to `IsolationLevel.Serializable`); AssignItTicket existence-oracle → Forbidden guard BEFORE NotFound (fail-closed). STALE-TRACKED caveat: ExecuteUpdate bypasses tracker → don't re-add `bal.UsedDays +=` (double-count). → substring(MEMORY.md):"S56 GOLIVE-HARDEN 3 BE fix" - **[cao] S57bis/S65 loose-Guid FK guard (marker #13).** loose-Guid FK (WorkItemId S57bis, Department.ParentId S65) = NO physical FK; guard `AnyAsync(x.Id==id && x.IsActive)`→Conflict (mirror S43); UpdateDraft null-safe `if (request.WorkItemId is not null)` to avoid null-ing bug-class S42. → substring(MEMORY.md):"FK-guard loose-Guid" - **[vừa] L1 Pattern foundation markers (#3,#5,#9b).** gotcha #17 = EF migration 3-file rule (Pattern 2, BẮT BUỘC commit `.cs`+`.Designer.cs`+snapshot); gotcha #65 = `dotnet build SolutionErp.slnx` includes 2 test projects; Mig 29/30/31 per-NV admin opt-in (Pattern 7, proven 4×). → substring(MEMORY.md):"EF migration 3-file rule (gotcha #17" + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-06.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. + +- gotcha **#73** · trích: "6 #5) + absolute-set null=clear (gotcha #73) + changelog Header (sibling-consistency; spec min=SaveChanges). (6) Controller `[HttpPatch('{id:guid}/bud" +- Mig **Mig 11** · trích: "field nằm trên **`User.DepartmentId`** (Mig 11) → GROUP BY `db.Users.Where(DepartmentId!=null && IsActive).GroupBy(DepartmentId).ToDictionary` = Direc" +- Mig **Mig 43** · trích: "#57 4th+5th+6th cumulative (S45 Holiday Mig 43, S51 HRM×3 Mig 45 → now Department/Project/Supplier). Edit 3 config Code unique: `b.HasIndex(x=>x.Code)" +- Mig **Mig 45** · trích: "mulative (S45 Holiday Mig 43, S51 HRM×3 Mig 45 → now Department/Project/Supplier). Edit 3 config Code unique: `b.HasIndex(x=>x.Code).IsUnique()` → `+." +- Mig **Mig 49** · trích: "proposed):** Return-truncated #53 TRƯỚC Mig 49 + projection-3 → em main solo hoàn tất (fix CS7036 + CS8019, Mig 49 `AddWorkItemToPurchaseEvaluation` 3" +- Mig **Mig 51** · trích: "- **2026-06-16 (S65b PE +HoSoLink BE — Mig 51 `AddHoSoLinkToPurchaseEvaluation` 3-file, 6 file edit + 0 new file, em-main CHỐT spec 100% → ACCEPT Case" +- Mig **Mig 52** · trích: "olumn, snapshot verified — clean mirror Mig 52. (4) DTO `PurchaseEvaluationDetailBundleDto` +`decimal? CcmBudgetPeriodAmount` sau ExpectedRemainingAmo" +- Mig **Mig 55** · trích: "mn, snapshot ×2 verified — clean mirror Mig 55. (4a) `UpdatePeSuggestedPriceProCommand` +trailing `string? Note=null` + validator `MaximumLength(1000)" +- Mig **Mig 57** · trích: "-19 (S77 PE +2 ghi-chú giá đề xuất BE — Mig 57 `AddPeSuggestedPriceNotes` 3-file, 6 edit/0 new file, COOKIE-CUTTER S73 suggested-price + S74 CcmNote," +- Mig **Mig 58** · trích: "Suppliers.Where(s=>s.IsWinner)` (multi, Mig 58) → sửa CHỈ comment-text 'MỌI đơn vị IsWinner (multi-winner Mig 58)'. Field/code UNCHANGED. **LESSON:**" +- Mig **Mig 59** · trích: "vity 2026-06-25..19 (S88 · PE Section-B Mig 59 · PE chuông) -->" +- file-ref **AttendanceReportFeatures.cs** · trích: "/001`. **P11-E** report chấm công: NEW `AttendanceReportFeatures.cs` (DTO 3 record EXACT + GetAttendanceReportHandler) + NEW `IAttendanceReportExcelEx" +- file-ref **DbInitializer.cs** · trích: "Report` after OffChamCong:158-159 · (3) DbInitializer.cs menu tuple `(OffAttendanceReport, 'Báo cáo chấm công', Off, 8, 'FileBarChart')` after OffCham" +- file-ref **Department.cs** · trích: "y tổ chức nền trang Hồ sơ Nhân sự. (1) `Department.cs` +`Guid? ParentId` loose-Guid KHÔNG physical FK (convention PE.ProjectId/WorkItemId/SelectedSupp" +- file-ref **DepartmentConfiguration.cs** · trích: "Id/WorkItemId/SelectedSupplierId). (2) `DepartmentConfiguration.cs` +`HasIndex(x=>x.ParentId)` only — **KHÔNG `HasOne` self-FK** (em main chốt loose)." +- file-ref **DepartmentFeatures.cs** · trích: "e` self-FK** (em main chốt loose). (3) `DepartmentFeatures.cs` +`GetDepartmentTreeQuery`+`DepartmentTreeNodeDto`+Handler (append existing file, NO new" +- file-ref **DepartmentsController.cs** · trích: "e; slnx lists projects-not-files). (4) `DepartmentsController.cs` +`[HttpGet('tree')]`. **KEY recon finding (spec asked verify):** `EmployeeProfile` h" +- file-ref **MasterCatalogFilteredUniqueTests.cs** · trích: "real code+year only, OK). Compile-fix `MasterCatalogFilteredUniqueTests.cs` +4 null args CreateProjectCommand (necessary build-green). **Runtime Dev" +- file-ref **MenuKeys.cs** · trích: "potent seed (not schema). 3 insert: (1) MenuKeys.cs const `OffAttendanceReport = 'Off_AttendanceReport'` after OffChamCong:124 · (2) MenuKeys.cs All[]" +- file-ref **PEFeatures.cs** · trích: "ote` sau CcmSuggestedPrice + projection PEFeatures.cs positional-insert ĐÚNG order (DTO positional → order khít projection BẮT BUỘC). **Call-site grep" +- file-ref **PeSuggestedPriceFeatures.cs** · trích: "file → move về budget file. (a) REMOVE `PeSuggestedPriceFeatures.cs` lines 144-199 (blank + `===== CCM NS kỳ này =====` header → `SetPeCcmBudgetPeriod" +- file-ref **PeWorkItemBudgetFeatures.cs** · trích: "ce PRO/CCM trên giữ nguyên. (b) APPEND `PeWorkItemBudgetFeatures.cs` END sau line 200 (`UpdatePeBudgetCcmCommandHandler` `}`) → cạnh budget setters `U" +- file-ref **ProjectFeatures.cs** · trích: "len 250/500/300 ProjectConfiguration). `ProjectFeatures.cs` DTO+CreateCmd+UpdateCmd+validators+handlers+List/Get projections +4 (all nullable, appende" +- file-ref **PurchaseEvaluation.cs** · trích: "nullable, no table/index/backfill. (1) `PurchaseEvaluation.cs` +`string? ProSuggestedPriceNote`/`CcmSuggestedPriceNote` ngay sau CcmSuggestedPrice. (2" +- file-ref **PurchaseEvaluationConfiguration.cs** · trích: "eNote` ngay sau CcmSuggestedPrice. (2) `PurchaseEvaluationConfiguration.cs` +`HasMaxLength(1000)` ×2 sau ApprovedPriceSource (KHÔNG index — free-text)" +- file-ref **PurchaseEvaluationDtos.cs** · trích: "G đụng. **T2 stale-comment fix:** `Dtos/PurchaseEvaluationDtos.cs` ~250-254 comment trên `decimal WinnerQuoteTotal` ghi SUM 'của SelectedSupplierId' (" +- file-ref **PurchaseEvaluationFeatures.cs** · trích: "ngle-winner) → verified actual compute `PurchaseEvaluationFeatures.cs:1093-1099` = `Suppliers.Where(s=>s.IsWinner)` (multi, Mig 58) → sửa CHỈ comment-" +- file-ref **PurchaseEvaluationWorkflowService.cs** · trích: "= +1 block trong `LogTransitionAsync` (PurchaseEvaluationWorkflowService.cs ~line 1058) NGAY SAU drafter-notify, KHÔNG endpoint mới (Pattern 4 — noti" +- file-ref **TravelVehicleApprovalFeatures.cs** · trích: "— wire ApproveV2 CQRS Travel+Vehicle (`TravelVehicleApprovalFeatures.cs` ~830 LOC + 2 controller edit):** Cookie-cutter mirror Wave 2a / ProposalFeat" +- file-ref **WorkflowAppsFeatures.cs** · trích: "ullName)` capability endpoint (REGION 5 WorkflowAppsFeatures.cs) + MODIFIED `AssignItTicketHandler`: authz Admin-OR-dept-IT → `ForbiddenException`; as" +- file-ref **menuKeys.ts** · trích: "ing DocxRenderer warn). KHÔNG touch FE (menuKeys.ts/Layout = implementer-frontend) / tests / commit. Tag `[s54, task-d, menu-leaf, no-mig, admin-perm-" + +### BỔ-SUNG-2 [F1/F2 sau Fidelity-gate @S152 — mở đuôi infra {yml,yaml,json,slnx,csproj,sql,config} + guard IsUnique/optimistic. N/A CỐ-Ý (F5): bundle-hash xoay #69 · tên-giả phép-thử ZZfakehash* · đuôi .md] + +- file-ref **SolutionErp.Application.csproj** · trích: "mirror S35 EF-source-of-truth). Build `SolutionErp.Application.csproj -v q` **0 warn 0 err** (4s). KHÔNG test (test-specialist)/FE/mig/commit. Tag `[" diff --git a/.claude/agent-memory/implementer-frontend/MEMORY.md b/.claude/agent-memory/implementer-frontend/MEMORY.md index ca6ba03..8a05f09 100644 --- a/.claude/agent-memory/implementer-frontend/MEMORY.md +++ b/.claude/agent-memory/implementer-frontend/MEMORY.md @@ -95,3 +95,7 @@ Dynamic class purged. PALETTE array full literal `as const` cycle `index % lengt ## 🔄 Curate trigger Size > ~30KB → archive to L2 (tiered v1). Commit scope (em main commits): `FE-Admin` · `FE-User`. + +## S152 (2026-07-25) — R1 retention-note 2 ranh auto-refuse [M9 on-behalf lead — queue memory-ops] +- **(a) Việc < 30 min / trivial:** fix 1-dòng CSS / label-polish (lớp Run #303/#304-era) = em-main solo nhanh hơn spawn-cost — mình REFUSE nhận đúng role-file; nhận việc trivial = đốt spawn vô ích. +- **(b) KHÔNG hạ chuẩn "lower bar" kiểu Smart-Friend nể-nang:** bị giục "làm nhanh" vẫn giữ sàn mirror-SHA ×2-app + npm build ×2 PASS; thiếu 1 trong 2 = trả lại chứ không ship. Tag `[s152, r1-retention, auto-refuse-trivial-30min, no-lower-bar-smart-friend]` diff --git a/.claude/agent-memory/implementer-frontend/archive/2026-H1.gist.md b/.claude/agent-memory/implementer-frontend/archive/2026-H1.gist.md index fa4dd74..64ec405 100644 --- a/.claude/agent-memory/implementer-frontend/archive/2026-H1.gist.md +++ b/.claude/agent-memory/implementer-frontend/archive/2026-H1.gist.md @@ -53,3 +53,24 @@ - **R3 [cao] #53 = failure-mode cố hữu của slice-lớn-mirror-1-spawn:** ×2 liên tiếp (S57bis truncated giữa mirror; S65 died-empty fan-out); work thường Đà land disk → recovery đọc disk + em-main self-gate quét sót; mitigation per-app stage. → substring:"died-empty #53" · → substring:"mirror-2-app-trong-1-spawn" - **R4 [vừa] Vòng đời divergence 2 app:** admin-only hợp lệ nhưng thường bị kéo CONVERGE khi user-side cần (S52/S53→S54 reassign; S78 focus-mode tình cờ trùng) → thiết kế để converge rẻ: BE capability-flag; mirror luôn PRESERVE props phía đích. → substring:"converge lại sau intentional divergence" · → substring:"Tình cờ trùng fe-user" - **R5 [vừa] Wiring delta ngoài Pattern 16-bis:** menu-only = 2/4-place; menuKey mirror BE string + đúng THỨ TỰ BE; route prefix mới (`/office/`) hợp lệ cạnh flat routes; types/menu.ts key:string → không mirror union; leaf perm admin auto BE All[]. → substring:"gotcha#50" · → substring:"key:string NOT typed-union" + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-H1.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. + +- gotcha **#70** · trích: "- **E2 #70 stale-echo guard:** 2 ô PRO `adjustMut` (row3 NS-kỳ-này :1548 + row8 GT-còn-lại :1649) chỉ `saving={adjustMut.isPending}` → `|| peFetching`" +- Mig **Mig 60** · trích: "PROD LIVE. Đối xứng fix endsBeforeCeo (Mig 60). EDIT1 mở rộng `PeFinalizeChip.tsx` (2 app) + EDIT2 wire `phase={p.phase}` ở 6 call-site." +- file-ref **App.tsx** · trích: "(C) **4-place ×2 app:** page(mirror) + App.tsx import+`` (NEW `/office/` prefix convention — page file ở pages/office" +- file-ref **DepartmentsPage.tsx** · trích: "rtmentInput auto-inherit via Omit · (2) DepartmentsPage.tsx: import Select + FormState/emptyForm +`parentId:string` ('' khi rỗng) + load-all query `['" +- file-ref **ItTicketsPage.tsx** · trích: "All[]→admin auto. **Task C reassign:** ItTicketsPage.tsx top-comment updated DIVERGES fe-user. Per-card Pencil button (cạnh 👤 assignee) → Dialog (siz" +- file-ref **Layout.tsx** · trích: "string exact, after OffChamCong) · (2) Layout.tsx staticMap +Off_AttendanceReport:'/attendance/report' (4th place gotcha #50). `types/menu.ts` = Menu" +- file-ref **PeDetailTabs.tsx** · trích: "4 edit `PeDetailTabs.tsx` (SHA-pair) + 2 wording `types/purchaseEvaluation.ts` (DIVERGED — KHÔNG SHA-pair, edit identical 2 file)." +- file-ref **PeFinalizeChip.tsx** · trích: "endsBeforeCeo (Mig 60). EDIT1 mở rộng `PeFinalizeChip.tsx` (2 app) + EDIT2 wire `phase={p.phase}` ở 6 call-site." +- file-ref **PeWorkflowPanel.tsx** · trích: "4 chuỗi-edit `PeWorkflowPanel.tsx` × {admin,user} = 8 hunk. PROD LIVE UAT (anh Kiệt xem trực tiếp). File 2 app byte-identical trước+sau → SHA-pair đún" +- file-ref **PeWorkspaceCreateView.tsx** · trích: "esentation+wiring `PeDetailTabs.tsx` (+`PeWorkspaceCreateView.tsx` typo). BE thêm `note` body song song; FE chốt UX rồi." +- file-ref **ProjectsPage.tsx** · trích: "rojectInput auto-inherit via Omit · (2) ProjectsPage.tsx (single-Dialog CRUD, NO separate pages): FormState +4 `string` (form dùng string, convert on" +- file-ref **PurchaseEvaluationsListPage.tsx** · trích: "- **PurchaseEvaluationsListPage.tsx** STRUCTURAL port: bỏ 3-panel grid → list-state `mx-auto max-w-5xl` panel (4-level tree giữ verbatim) + focus-stat" +- file-ref **SupplierImportDialog.tsx** · trích: "NEW `components/master/SupplierImportDialog.tsx` (folder `master/` MỚI cả 2 app) + wire `pages/master/SuppliersPage.tsx` (nút 'Import Excel NCC' outli" +- file-ref **SuppliersPage.tsx** · trích: "er/` MỚI cả 2 app) + wire `pages/master/SuppliersPage.tsx` (nút 'Import Excel NCC' outline cạnh 'Thêm NCC' trong PageHeader actions flex + render dial" +- file-ref **menuKeys.ts** · trích: "2 prior). Only 2 of 4-place needed: (1) menuKeys.ts +OffAttendanceReport='Off_AttendanceReport' (mirror BE string exact, after OffChamCong) · (2) Layo" +- file-ref **realtime.ts** · trích: "ting warn: @import CSS-order + >500KB + realtime.ts dynamic. NO BE touch. Full precedent. Tag `[supplier-import-excel, multipart-preview-confirm, enum" diff --git a/.claude/agent-memory/implementer-frontend/archive/_INDEX.md b/.claude/agent-memory/implementer-frontend/archive/_INDEX.md new file mode 100644 index 0000000..658cafa --- /dev/null +++ b/.claude/agent-memory/implementer-frontend/archive/_INDEX.md @@ -0,0 +1,49 @@ +# _INDEX — implementer-frontend archive (map, dựng @S152 A2) + +> Con-trỏ substring — mở file archive tương-ứng rồi Ctrl-F chuỗi trong substring:"...". KHÔNG line-hint (additive append dịch dòng). +> Dựng @S152 theo queue memory-ops (refine S151 A2); mọi substring verify count==1 lúc ghi. + +- 2026-H1.md · 🆕 2026-07-12 — Supplier import Excel FE (Phase B Approach A) ×2 app byte-identical (lead chốt UX; BE · substring:"🆕 2026-07-12 — Supplier import Excel FE (Phase B Approach A) ×2 app by" +- 2026-H1.md · 🆕 S97-badge (2026-07-01) — PE chip '✅ Đã được CEO duyệt' khi phiếu Đà DUYỆT đi hết lên CEO (anh Kiệt · substring:"khi phiếu Đà DUYỆT đi hết lên CEO (anh Kiệt FDC UAT, em-main chốt)" +- 2026-H1.md · 🆕 S97-Part2 (2026-07-01) — FE gate endsBeforeCeo runtime (hook 1-dòng, on-behalf H2-proposed @S98) · substring:"🆕 S97-Part2 (2026-07-01) — FE gate endsBeforeCeo runtime (hook 1-dòng," +- 2026-H1.md · 🆕 S97 (2026-07-01) — PE finalize wording + đảo default checkbox opt-out→opt-in ×2 app (anh Kiệt FDC · substring:"🆕 S97 (2026-07-01) — PE finalize wording + đảo default checkbox opt-ou" +- 2026-H1.md · 🆕 S88 D2 (2026-06-25) — PE multi-winner OUTWARD FE ×2 app (BE đã đổi: create→LIST, list DTO winner n · substring:"🆕 S88 D2 (2026-06-25) — PE multi-winner OUTWARD FE ×2 app (BE đã đổi:" +- 2026-H1.md · 🆕 S87+ (2026-06-25) — FROZEN PE behavior-preserving cleanup ×2 app (em-main chốt, coord BE null-safe · substring:"🆕 S87+ (2026-06-25) — FROZEN PE behavior-preserving cleanup ×2 app (em" +- 2026-H1.md · S79 (2026-06-19) — PE detail: live thousand-sep + ghi chú giá PRO/CCM + typo (×2 app) · substring:"S79 (2026-06-19) — PE detail: live thousand-sep + ghi chú giá PRO/CCM" +- 2026-H1.md · S78 (2026-06-19) — PE 'focus mode' redesign mirror fe-user→fe-admin (CONVERGE, em-main chốt UX) · substring:"redesign mirror fe-user→fe-admin (CONVERGE, em-main chốt UX)" +- 2026-H1.md · S76 (2026-06-19) — PE budget MA TRẬN 3 cột + bảng lưới `` + badge quyền NS (anh Kiệt FDC) · substring:"S76 (2026-06-19) — PE budget MA TRẬN 3 cột + bảng lưới `
` + bad" +- 2026-H1.md · Recent activity FIFO (pre-2026-06-17, archived verbatim) · substring:"Recent activity FIFO (pre-2026-06-17, archived verbatim)" +- 2026-H1.md · BE contract (Read-only DTO · substring:"- **BE contract (Read-only DTO" +- 2026-H1.md · Mirror lesson (tái xác nhận S97-badge · substring:"- **Mirror lesson (tái xác nhận S97-badge" +- 2026-H1.md · SHA256 ×2 pair: · substring:"- **SHA256 ×2 pair:** SupplierImportDialog `6313529c…`, SuppliersPage `e9143d93…`. Build PASS ×" +- 2026-H1.md · EDIT1 component: · substring:"- **EDIT1 component:" +- 2026-H1.md · ⚠️ GOTCHA TYPE (đã trải · substring:"- **⚠️ GOTCHA TYPE (đã trải" +- 2026-H1.md · EDIT2 6 site (grep `PeFinalizeChip endsBeforeCeo` = 6, hết · substring:"- **EDIT2 6 site (grep `PeFinalizeChip endsBeforeCeo` = 6, hết" +- 2026-H1.md · E1 default checkbox: · substring:"- **E1 default checkbox:" +- 2026-H1.md · E2 reset onSuccess: · substring:"- **E2 reset onSuccess:" +- 2026-H1.md · E3 helper text ternary · substring:"- **E3 helper text ternary" +- 2026-H1.md · E4a title · substring:"- **E4a title" +- 2026-H1.md · GOTCHA 'không trình tới' 2 chỗ: · substring:"- **E4a title** (~:329): static string → template literal `` `Quy trình kết thúc tại ${fin" +- 2026-H1.md · SHA256 IDENTICAL ×2 = `bcf812fd…` · substring:"- **SHA256 IDENTICAL ×2 = `bcf812fd…`" +- 2026-H1.md · E1 CreateContractDialog (PeDetailTabs ~:2144 · substring:"- **E1 CreateContractDialog (PeDetailTabs ~:2144" +- 2026-H1.md · E2 PeListPanel label (~:168 · substring:"- **E2 PeListPanel label (~:168" +- 2026-H1.md · E3 type (DIVERGE 2 file · substring:"- **E3 type (DIVERGE 2 file" +- 2026-H1.md · E1 HoSoLink clear: · substring:"- **E1 HoSoLink clear:" +- 2026-H1.md · E2 #70 stale-echo guard: · substring:"- **E2 #70 stale-echo guard:" +- 2026-H1.md · E3 stale comment :2507: · substring:"- **E3 stale comment :2507:" +- 2026-H1.md · E4 type wording (2 file · substring:"- **E4 type wording (2 file" +- 2026-H1.md · SHA256 PeDetailTabs ×2 = `36292924…` · substring:"- **SHA256 PeDetailTabs ×2 = `36292924…`" +- 2026-H1.md · A live phân cách: · substring:"- **A live phân cách:" +- 2026-H1.md · B ghi chú giá: · substring:"- **B ghi chú giá:" +- 2026-H1.md · Type DIVERGE 2 app · substring:"- **Type DIVERGE 2 app" +- 2026-H1.md · PeWorkflowPanel.tsx · substring:"- **PeWorkflowPanel.tsx" +- 2026-H1.md · PurchaseEvaluationsListPage.tsx · substring:"- **PurchaseEvaluationsListPage.tsx" +- 2026-H1.md · PRESERVE fe-admin props · substring:"- **PRESERVE fe-admin props" +- 2026-H1.md · SHA256 IDENTICAL ×2 pair · substring:"- **SHA256 IDENTICAL ×2 pair" +- 2026-H1.md · Part 1 mirror · substring:"- **Part 1 mirror" +- 2026-H1.md · Part 3 mirror: · substring:"- **Part 3 mirror:" +- 2026-H1.md · Bảng lưới (em-main, anh phản hồi 'chưa chia cột giống Excel' · substring:"- **Bảng lưới (em-main, anh phản hồi" +- 2026-H1.md · cwd-misland: · substring:"- **cwd-misland:" +- 2026-H1.md · 2026-06-16 (Department parentId — cây tổ chức, fe-admin ONLY · substring:"- **2026-06-16 (Department parentId — cây tổ chức, fe-admin ONLY" +- 2026-H1.md · 2026-06-11 (S57bis PE WorkItem FE ×2 app — PARTIAL, on-behalf em main ghi hộ, H2-proposed · substring:"- **2026-06-11 (S57bis PE WorkItem FE ×2 app — PARTIAL, on-behalf em main ghi hộ" +- 2026-H1.md · 2026-06-09 (S55 HMW P2 — Project +4 optional master fields · substring:"- **2026-06-09 (S55 HMW P2 — Project +4 optional master fields" diff --git a/.claude/agent-memory/investigator-api/MEMORY.md b/.claude/agent-memory/investigator-api/MEMORY.md index 77ef797..a72ef8b 100644 --- a/.claude/agent-memory/investigator-api/MEMORY.md +++ b/.claude/agent-memory/investigator-api/MEMORY.md @@ -39,3 +39,6 @@ Read-only EXTERNAL research specialist. WebFetch/WebSearch official docs + NuGet ## 🔄 Curate trigger - Size > ~30KB → archive to L2 `archive/.md`. Stale > 3 months → remove. + +## S152 (2026-07-25) — R1 retention-note ranh read-only [M9 on-behalf lead] +- **KHÔNG write code / edit files** — vai này EXTERNAL research read-only: trả findings cấu-trúc + source-URL; phát hiện cần đổi code (vd CVE upgrade-path, lib swap) → PROPOSE cho em-main + implementer tương ứng, KHÔNG tự chạm repo. Write/Edit runtime có cấp ≠ được dùng (tools-whitelist = mô-tả ý-định; containment = git-diff lead). Tag `[s152, r1-retention, no-write-code-edit-files]` diff --git a/.claude/agent-memory/investigator-codebase/MEMORY.md b/.claude/agent-memory/investigator-codebase/MEMORY.md index 89fb639..87db0be 100644 --- a/.claude/agent-memory/investigator-codebase/MEMORY.md +++ b/.claude/agent-memory/investigator-codebase/MEMORY.md @@ -61,3 +61,6 @@ Prod: `ssh vietreport-vps` powershell-wrapper `sqlcmd -S '.\SQLEXPRESS' -d Solut - 10 lượt invest @S149: chẩn-đoán **"SE = rules-đủ, máy-thiếu"** (0 script GHI `.session-counter.json` → chuỗi "đo rồi như chưa đo": backfill S146 · tally-rơi S148 · ×27≠33) — ĐỨNG qua gate reviewer-Fable, thành spec hội-tụ-bookend M1-M9. Backlog adap phân-loại **A-12/B-6/C-1/D-3** ("nợ REPORT không phải nợ ADOPT") → wave 6-lane land 23/23. O-2 nguồn thật = depth-axis → **posture-A**. - #53 trong 10 lượt (ghi sổ garble @S150): L1 **ngược-#53** (return OK, ĐĨA không — vớt journal) · L5 kinh-điển (đĩa cứu) · L7 mất-cả-hai (bù deep-pass). Sub-class mới: ghi-đĩa-trong-lúc-làm = CẦN, KHÔNG ĐỦ. + +## S152 (2026-07-25) — R1 retention-note không-fabricate [M9 on-behalf lead] +- **KHÔNG fabricate — uncertain thì nói "uncertain" + reason:** finding không chứng được từ đĩa/DB phải khai uncertain kèm lý-do thiếu-chứng, KHÔNG lấp bằng suy-đoán (tiền lệ tốt: A/018 S117 — verify prod-DB `Phase=ChoDuyet` trước khi phán "lũy kế đúng", thay vì đoán theo lời UAT). Claim ≠ chứng: mọi số kèm lệnh. Tag `[s152, r1-retention, no-fabricate-uncertain-reason]` diff --git a/.claude/agent-memory/investigator-codebase/archive/2026-06.gist.md b/.claude/agent-memory/investigator-codebase/archive/2026-06.gist.md index b411dbd..6722cd0 100644 --- a/.claude/agent-memory/investigator-codebase/archive/2026-06.gist.md +++ b/.claude/agent-memory/investigator-codebase/archive/2026-06.gist.md @@ -45,3 +45,107 @@ ## Monthly drift audit - **[vừa] 2026-06 monthly drift audit** · VIỆC: ground-truth counts vs docs. KẾT-LUẬN: migrations=42 (last AddLeaveBalances) / gotchas highest=#56 (file header has no self-count) / tests=154 / tables≈91; biggest drift = ef-core-migration SKILL (says 31 mig / 59 bảng / 111 test). BÀI-HỌC: schema-diagram migration table stops at Mig 16 → missing §§ for Mig 27-42. BẤT-NGỜ: STATUS backlog "Curate 4 agent MEMORY 35.7/…" is STALE (already curated S40) → remove. · 2026-06.md · substring:"MONTHLY DRIFT AUDIT" + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-06.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. *(Đính-chính nhãn @lead-review: `#N > 83` = Run/PR-ref CI, KHÔNG phải gotcha — repo max #83; đổi nhãn `ref`.)* + +- ref **#346** · trích: "finalize/price audit (FROZEN Mig 59 Run#346 — patchwork hunt):** ⭐ TWO finalize mechanisms COEXIST + BOTH LIVE (NOT dead): (1) `AllowApproverFinalize" +- gotcha **#44** · trích: "on-disk):** ⭐ **Mục 6 CRITICAL (gotcha #44 family) RESOLVED-FAVORABLE:** `EmployeesController.cs:23-25` = class `[Authorize(Policy='Hrm_HoSo.Read')]`" +- gotcha **#66** · trích: "140),`.label-eyebrow`(:89). ⚠️ **GOTCHA #66 = `index.css:79-83` `h1,h2,h3,h4{color:#0b1220;font-weight:700}` OUTSIDE @layer** → TW-v4 unlayered wins →" +- gotcha **#70** · trích: "lti-winner + mirror-drift + dead-code + #70):** ⭐ Post-Mig58 multi-winner (`isWinner` bool) NOW implemented (supersedes 06-24 'SINGLE' recon). **All 6" +- gotcha **#72** · trích: "notify/TZ audit (FROZEN Mig 59 — gotcha #72):** ⭐ (a-TZ) `UtcDateTimeJsonConverter` registered ONLY on `AddControllers().AddJsonOptions` `Program.cs:3" +- gotcha **#73** · trích: "datePeDraft edit-preserve audit (gotcha #73-class hunt, FROZEN Mig 59):** ⭐ **LATENT #73-CLASS BUG FOUND:** `UpdatePeDraftHandler` absolute-sets `enti" +- Mig **Mig 26** · trích: "g Mig 16 (line 487); detail § cuối =§15=Mig 26 (§16=Related KHÔNG phải mig) → thiếu § cho **Mig 27-42** (16 mig). database-guide:4 '47 bảng/13 mig'→91" +- Mig **Mig 29** · trích: "nting', '[Bypass]'/'[SkipFinal]' = test Mig 29-31 flags) + 9 real staff hand-created 05-04→05-12 + `binh.lethanh@` (người thật Lê Thanh Bình — seed dù" +- Mig **Mig 39** · trích: "hỉ `Office/VehicleBooking.cs` (request, Mig 39) dùng FREE-TEXT (`VehicleLicense`/`VehicleName`/`DriverName?` strings, :13-19 comment 'defer catalog Ph" +- Mig **Mig 43** · trích: "chỉ `HolidayConfiguration.cs:18` đã fix Mig 43). → Vehicle/Driver Code UNIQUE PHẢI add filter ngay từ đầu. **Mig 44 BẮT BUỘC CREATE TABLE** (mỗi kind" +- Mig **Mig 52** · trích: "oLink → editing header CLEARS HoSoLink (Mig 52) to null. HoSoLink set separately in `PeDetailTabs.tsx:2012-2020` HoSoLinkRow (re-sends all absolute fi" +- Mig **Mig 53** · trích: "s column-PE(per-phiếu) = em-main quyết. Mig 53 CeoApprovalThreshold+cờ-gấp đã có khung CEO-duyệt-theo-ngưỡng. Tag `[pe-price-model, gia-chao-thau-deri" +- Mig **Mig 54** · trích: "legation` OPT-IN param threshold-gated (Mig 54) `:879-915`. AUTO runs FIRST + returns → if both eligible, OPT-IN flag silently ignored (coherent, no d" +- Mig **Mig 56** · trích: "REA-2 (budget matrix + Section B 3-col, Mig 56/59):** ⭐ **BAND-AID CONFIRMED** `SetPeCcmBudgetPeriodCommand+Validator+Handler` (`PeSuggestedPriceFeatu" +- Mig **Mig 58** · trích: "pproverFinalize` per-Level AUTO config (Mig 58) `PurchaseEvaluationWorkflowService.cs:861-877` + (2) `finalizeByCcmDelegation` OPT-IN param threshold-" +- Mig **Mig 59** · trích: "ve audit (gotcha #73-class hunt, FROZEN Mig 59):** ⭐ **LATENT #73-CLASS BUG FOUND:** `UpdatePeDraftHandler` absolute-sets `entity.HoSoLink = request.H" +- Mig **Mig47** · trích: "14-21`): Code(50,UNIQUE `[IsDeleted]=0` Mig47)+Name(200) REQUIRED, StartDate/EndDate/BudgetTotal(18,2)/Note(1000)/ManagerUserId optional. ❌ **THIẾU Ye" +- Mig **Mig50** · trích: "/b/c/d map — SUPERSEDED bởi S65ter post-Mig50 Budget-drop; test mirror PurchaseEvaluationWorkflowServiceGuardTests). Full text git." +- Mig **Mig58** · trích: "rror-drift + dead-code + #70):** ⭐ Post-Mig58 multi-winner (`isWinner` bool) NOW implemented (supersedes 06-24 'SINGLE' recon). **All 6 PE components" +- guard-kw **race** · trích: "eBudgetSummaryDto:290-291`; auto-create race-safe `PeWorkItemBudgetEnsurer.EnsureTrackedAsync:34`; KHÔNG ràng Phase. NO AutoMapper (DTO project tay)." +- file-ref **AdminLayout.tsx** · trích: "under separate 'Cá nhân' group); admin `AdminLayout.tsx:87-119` splits by function not HR/office. NAMGROUP `Đơn từ`/`Phòng họp`/`Đề xuất` = flat singl" +- file-ref **App.tsx** · trích: "faults` + types/hrm-config.ts DTO (10) `App.tsx:90` route `/hrm/configs/:kind` SẴN catch-all → KHÔNG cần sửa, chỉ +menuKeys (11) `menuKeys.ts:38-42` +" +- file-ref **AppRoles.cs** · trích: "enuKey), NO DB upsert. **13 AppRoles** `AppRoles.cs:23`: Admin(system)+12 employee. **4 inherit-roots** `GetMyMenuTreeQuery.cs:56-84`: Contracts/Workf" +- file-ref **ApplicationDbContext.cs** · trích: "oTable+.HasIndex(Code).IsUnique()` (3) `ApplicationDbContext.cs:95-98` DbSet (4) `IApplicationDbContext.cs:102-105` DbSet (5) `HrmConfigFeatures.cs` +" +- file-ref **ApprovalWorkflow.cs** · trích: "approvers = specific `ApproverUserId` (`ApprovalWorkflow.cs:80`), OR-of-N = N Level rows same `Order` (GroupBy :687). 'Phòng CCM' = seed Step NAME + n" +- file-ref **ApprovalWorkflowsV2Page.tsx** · trích: "L both DTOs.** **(A) Designer fe-admin `ApprovalWorkflowsV2Page.tsx`:** read-only render `DefinitionCard:446-454` (level group → approver `{approverUs" +- file-ref **AuditingInterceptor.cs** · trích: "Deleted)`** + Delete via `.Remove()` → `AuditingInterceptor.cs` (State Deleted→Modified, IsDeleted=true) + Create `AnyAsync(x=>x.Code==req.Code)` NO `" +- file-ref **CatalogsConfiguration.cs** · trích: "Unit(50)/Description/IsActive), config `CatalogsConfiguration.cs:60-74`, full CRUD `CatalogsFeatures.cs:260-324` → group(VẬT TƯ/THẦU PHỤ/MEP)→Category" +- file-ref **CatalogsController.cs** · trích: "21`, all POST/PUT/DEL `Roles='Admin'`; `CatalogsController.cs:14` same (write `:23+` Admin); `MeetingRoomsController.cs:15` same (comment `:9-10` expl" +- file-ref **CatalogsFeatures.cs** · trích: "logsConfiguration.cs:60-74`, full CRUD `CatalogsFeatures.cs:260-324` → group(VẬT TƯ/THẦU PHỤ/MEP)→Category, '1 Mat'→Code, item→Name. KHÔNG cần table/m" +- file-ref **ChamCongPage.tsx** · trích: "(595) · DanhBaPage.tsx(756 tree+grid) · ChamCongPage.tsx(809). ⚠️ Style/màu lấy chỗ khác per task — chỉ structure. SE đã có analog (fe-user `InternalL" +- file-ref **ContractClauseConfiguration.cs** · trích: "). **SKIP 3:** (a) **ContractClause** (`ContractClauseConfiguration.cs:18`) — NO Create/Update/Delete handler ANYWHERE (only `IApplicationDbContext.cs" +- file-ref **ContractCreatePage.tsx** · trích: "`×`group-hover` = **only 1 real site** `ContractCreatePage.tsx:196` (EXCLUDED scope) + DataTable.tsx:15 is a comment forbidding it (good). In-scope =" +- file-ref **DanhBaPage.tsx** · trích: "age(month-grid) · TicketPage.tsx(595) · DanhBaPage.tsx(756 tree+grid) · ChamCongPage.tsx(809). ⚠️ Style/màu lấy chỗ khác per task — chỉ structure. SE" +- file-ref **DataTable.tsx** · trích: "tCreatePage.tsx:196` (EXCLUDED scope) + DataTable.tsx:15 is a comment forbidding it (good). In-scope = **0 hover-hidden fixes**. **DataTable adoption" +- file-ref **DateTimeService.cs** · trích: "e: `n.CreatedAt=clock.UtcNow`=Kind.Utc (DateTimeService.cs:7) → default STJ writes 'Z' for Utc-kind, FE `new Date(iso)` NotificationBell.tsx:23 OK. La" +- file-ref **DeXuatPage.tsx** · trích: "ePage.tsx(dashboard) · PageHeader.tsx · DeXuatPage.tsx(1676 KPI+table+detail) · DonTuPage.tsx(1269 +DonTuCalendar.tsx toggle) · XeCongPage/PhongHopPag" +- file-ref **Department.cs** · trích: "). **GAP THẬT:** (1) **NO org-tree** — `Department.cs` FLAT (Code/Name/ManagerUserId/Note, KHÔNG ParentId), `DepartmentsController` chỉ GET list+byId" +- file-ref **DependencyInjection.cs** · trích: "ment :1675-79 đã biết); Dev fallback 8 (DependencyInjection.cs:67 `?? 8`, Development.json no Identity section) → Dev đủ 33 user named-person. `bod.1@" +- file-ref **DonTuCalendar.tsx** · trích: "KPI+table+detail) · DonTuPage.tsx(1269 +DonTuCalendar.tsx toggle) · XeCongPage/PhongHopPage(month-grid) · TicketPage.tsx(595) · DanhBaPage.tsx(756 tre" +- file-ref **DonTuPage.tsx** · trích: "DeXuatPage.tsx(1676 KPI+table+detail) · DonTuPage.tsx(1269 +DonTuCalendar.tsx toggle) · XeCongPage/PhongHopPage(month-grid) · TicketPage.tsx(595) · Da" +- file-ref **Dtos.cs** · trích: "alLevelApproverDto` (`PurchaseEvaluationDtos.cs:129-132` = UserId/FullName/Email, **NO role**). **(C) Role-resolve for LIST userId:** codebase uses `u" +- file-ref **EmployeeFeatures.cs** · trích: "6` EmployeeCode+UserId) — Delete soft (`EmployeeFeatures.cs:437`) BUT Create BLOCKS reuse by design: UserId check `AsNoTracking().FirstOrDefault(UserI" +- file-ref **EmployeeProfile.cs** · trích: "Entity gần đủ screenshot:** `Domain/Hrm/EmployeeProfile.cs` (137 LOC) CÓ: DOB/Gender/Ethnicity/Religion/Nationality/Height/Weight(:98-99)/IdCard(số+ng" +- file-ref **EmployeeProfileConfiguration.cs** · trích: "eleted` :113. (c) **EmployeeProfile** (`EmployeeProfileConfiguration.cs:24/26` EmployeeCode+UserId) — Delete soft (`EmployeeFeatures.cs:437`) BUT Crea" +- file-ref **Enums.cs** · trích: "iority{Low,Medium,High,Urgent}` `Office/Enums.cs:48-54`) AddColumn no-new-table; notify `INotificationService.NotifyAsync(userId,type,title,desc?,href" +- file-ref **HomePage.tsx** · trích: "dex=HomePage. **Landing `/` = `internal/HomePage.tsx`** (296L): grid 2-col (LEFT 2/3 stack 4 WidgetCard: Đề xuất/Nghỉ phép/Bình luận/Truyền-thông · RI" +- file-ref **HrDashboardController.cs** · trích: "nRead row = API ALSO unlocked, NO 403. `HrDashboardController.cs:8-11` = `[Authorize]` any-auth only (`/api/hr/dashboard`). GET list = `/api/employees" +- file-ref **HrmConfigFeatures.cs** · trích: "icationDbContext.cs:102-105` DbSet (5) `HrmConfigFeatures.cs` +Region N (DTO+List/Create/Update/Delete handler+validator, mega 4-region :30/125/222/32" +- file-ref **HrmConfigsController.cs** · trích: "or, mega 4-region :30/125/222/328) (6) `HrmConfigsController.cs` +4 route hardcode `[HttpGet/Post/Put/Delete('{kind}')]` (Post/Put/Del `[Authorize(Rol" +- file-ref **HrmConfigsPage.tsx** · trích: "issionsAsync` loop idempotent). FE (9) `HrmConfigsPage.tsx:45 KIND_CONFIG` +entry + `:114 KINDS[]` + `:379 renderCells` branch + `:166 smart-defaults`" +- file-ref **IApplicationDbContext.cs** · trích: "plicationDbContext.cs:95-98` DbSet (4) `IApplicationDbContext.cs:102-105` DbSet (5) `HrmConfigFeatures.cs` +Region N (DTO+List/Create/Update/Delete ha" +- file-ref **INotificationService.cs** · trích: "serId,type,title,desc?,href?,refId?)` (`INotificationService.cs:10`)+SignalR interceptor; LogTransition notifies DRAFTER-only on terminal (`:960-980`)" +- file-ref **InternalLayout.tsx** · trích: "y (NOT DB seed),** index=order: client `InternalLayout.tsx:83-118` (Nhân sự 3-item / Văn phòng số 6-item FLAT / Chấm công under separate 'Cá nhân' gro" +- file-ref **Layout.tsx** · trích: "ỉ +menuKeys (11) `menuKeys.ts:38-42` + `Layout.tsx:60-63 staticMap`. **gotcha #57 CONFIRMED còn trần:** `LeaveTypeConfiguration.cs:19` + `ShiftPattern" +- file-ref **MeetingRoomConfiguration.cs** · trích: "t CRUD-reachable. (b) **MeetingRoom** (`MeetingRoomConfiguration.cs:20`) — Delete sets `IsActive=false` NOT IsDeleted (`MeetingFeatures.cs:178`, comme" +- file-ref **MeetingRoomsController.cs** · trích: "ller.cs:14` same (write `:23+` Admin); `MeetingRoomsController.cs:15` same (comment `:9-10` explicit). → granting FE read on Hrm_Config/Catalogs/Meeti" +- file-ref **MenuKeys.cs** · trích: "hải +`&& OtPoliciesNew.AnyAsync()` (8) `MenuKeys.cs:88-92` +const + `:149 All[]` (Admin auto-grant `SeedAdminPermissionsAsync` loop idempotent). FE (9" +- file-ref **NotificationBell.tsx** · trích: "es 'Z' for Utc-kind, FE `new Date(iso)` NotificationBell.tsx:23 OK. Latent: any future SignalR push of an EF-READ (Unspecified) DateTime would skew. N" +- file-ref **NotificationPushInterceptor.cs** · trích: "no `.AddJsonProtocol`, separate STJ): `NotificationPushInterceptor.cs:77` pushes `createdAt=n.CreatedAt` over `SendAsync`. BENIGN at runtime: `n.Crea" +- file-ref **PageHeader.tsx** · trích: "rumb + actions slot, `components/shared/PageHeader.tsx`); (b) **KPI stat-cards clickable filter** (DeXuat :1643 6-card / Ticket :197 5-card — 'PURO KP" +- file-ref **PeCcmBudgetPeriodSetterAuthzTests.cs** · trích: "sit). Test+comments already self-flag (PeCcmBudgetPeriodSetterAuthzTests.cs:14). ⚠️ **Role-gate ASYMMETRY (intentional, NOT a bug — but inconsistent" +- file-ref **PeHeaderForm.tsx** · trích: "e `PeWorkspaceCreateView.tsx` · header `PeHeaderForm.tsx`. FE type `types/purchaseEvaluation.ts` `PeBudgetSummary:292-307`+`winnerQuoteTotal:445`. ⚠️" +- file-ref **PeListPanel.tsx** · trích: "**RESIDUAL single-winner BUG (low):** `PeListPanel.tsx:168` renders `p.selectedSupplierName` (list-card winner label) → BLANK when ≥2 joint winners (" +- file-ref **PeSuggestedPriceFeatures.cs** · trích: "udgetPeriodCommand+Validator+Handler` (`PeSuggestedPriceFeatures.cs:153-199`) is a BUDGET setter (writes `pe.CcmBudgetPeriodAmount`) MISPLACED in a pr" +- file-ref **PeUrgentFeatures.cs** · trích: "`GetUsersInRoleAsync(role)` (reverse, `PeUrgentFeatures.cs:74`). `IApplicationDbContext` exposes `DbSet Roles` :29 but **NO UserRoles join-tabl" +- file-ref **PeWorkItemBudget.cs** · trích: "h` toàn `src/Backend`=0 + FE=0. Entity `PeWorkItemBudget.cs` 6 field plain, KHÔNG cờ `IsInitialLocked`/`SubmitCount`; record per-cặp(Project×WorkItem)" +- file-ref **PeWorkItemBudgetFeatures.cs** · trích: "||CostControl` (DTO arg :856). Handler `PeWorkItemBudgetFeatures.cs`: PRO `:86-91` CCM `:152-157` fail-closed ForbiddenException role-only TRƯỚC side-" +- file-ref **PeWorkflowPanel.tsx** · trích: "`:474,:526` · IPe…Service:32 · FE both `PeWorkflowPanel.tsx:184,584` ô-tích) — NOT orphan. ALL 3 DaDuyet paths bind giá chốt via `ApplyApprovedPriceOn" +- file-ref **Permission.cs** · trích: "rs CanRead=true. **Permission entity** `Permission.cs:3-15`: RoleId/MenuKey/CanRead/Create/Update/Delete. Dedup=app-level skip-existing per(RoleId,Men" +- file-ref **Program.cs** · trích: "zer.InitializeAsync` chạy MỌI startup (`Program.cs:197` unless `--no-db-init`) → `MigrateAsync` THEN seed; demo gated `config.GetValue('DemoSeed" +- file-ref **Project.cs** · trích: "d WorkItems non-breaking. **Project** (`Project.cs:5-14`, cfg `:14-21`): Code(50,UNIQUE `[IsDeleted]=0` Mig47)+Name(200) REQUIRED, StartDate/EndDate/B" +- file-ref **PurchaseEvaluationCreatePage.tsx** · trích: "ctive. PeHeaderForm reachable as EDIT (`PurchaseEvaluationCreatePage.tsx:13,26` editId from URL `?id=`, deep-link 'Sửa header'). Field table: TenGoiTh" +- file-ref **PurchaseEvaluationDetail.cs** · trích: "n mới. **PE detail = pure free-text** (`PurchaseEvaluationDetail.cs` GroupCode/GroupName/ItemCode/NoiDung strings, NO FK→WorkItem) → load WorkItems no" +- file-ref **PurchaseEvaluationDetailFeatures.cs** · trích: "seEvaluationWinnerCommand(PEId,Guid?)` `PurchaseEvaluationDetailFeatures.cs:392` handler `:398-423` (null=clear S85-C5); ctrl `/select-winner` `Purcha" +- file-ref **PurchaseEvaluationDtos.cs** · trích: "seEvaluationApprovalLevelApproverDto` (`PurchaseEvaluationDtos.cs:129-132` = UserId/FullName/Email, **NO role**). **(C) Role-resolve for LIST userId:*" +- file-ref **PurchaseEvaluationFeatures.cs** · trích: "valuationDetail.cs:10-13`). Create cmd `PurchaseEvaluationFeatures.cs:19-30`; MaPhieu gen-AT-CREATE `:114-116` format `PE/{YYYY}/{A|B}/{Seq:D3}` (`Pur" +- file-ref **PurchaseEvaluationQuote.cs** · trích: "at/ChuaVat/ThanhTien` decimal non-null `PurchaseEvaluationQuote.cs:12-14` · PE-header `BudgetPeriodAmount`(row3 drafter)/`ExpectedRemainingAmount`(row" +- file-ref **PurchaseEvaluationType.cs** · trích: "6`)+`DetailBundleDto`(:201). Type A/B (`PurchaseEvaluationType.cs:6-10`) constrains pinnable ApplicableType only — ZERO type-conditional routing. ⚠️ '" +- file-ref **PurchaseEvaluationUrgentFeatures.cs** · trích: "t. (b-authz) Urgent SET/UNSET branches `PurchaseEvaluationUrgentFeatures.cs:54-73` SYMMETRIC + fail-CLOSED both (`if(!allowed)throw` BEFORE mutate); 1" +- file-ref **PurchaseEvaluationWorkflowService.cs** · trích: "ted 3 nơi đồng-predicate: submit-guard `PurchaseEvaluationWorkflowService.cs:188-192` · detail-GET `PurchaseEvaluationFeatures.cs:818-826`(→`CurrentPr" +- file-ref **PurchaseEvaluationsController.cs** · trích: "roller class-level `[Authorize]` only (`PurchaseEvaluationsController.cs:15`) → handler gates ARE the boundary. Tests solid (PeWorkItemBudgetTests 30+" +- file-ref **Supplier.cs** · trích: "`:87 AnyAsync(Code==)`. **Supplier** (`Supplier.cs:5-16`, cfg `:14-27`): Code/Name req + Type enum + TaxCode(20)/Phone/Email/Address/ContactPerson/No" +- file-ref **SupplierType.cs** · trích: "hone/Email/Address/ContactPerson/Note. `SupplierType.cs`: NhaCungCap=1/NhaThauPhu=2/ToDoi=3/DonViDichVu=4/ChuDauTu=5. ❌ **THIẾU Status/TinhTrang (KHÔN" +- file-ref **TicketPage.tsx** · trích: "· XeCongPage/PhongHopPage(month-grid) · TicketPage.tsx(595) · DanhBaPage.tsx(756 tree+grid) · ChamCongPage.tsx(809). ⚠️ Style/màu lấy chỗ khác per tas" +- file-ref **config.ts** · trích: "nfigKind` union `fe-admin/src/types/hrm-config.ts:4` + route param. **Add 1 kind = mirror FULL entity stack 11 chỗ:** BE (1) Domain `Hrm/{X}.cs` Audit" +- file-ref **detectors.ps1** · trích: ") BASELINE-DRIFT ALIGNED:** `governance-detectors.ps1` staleness = **CANONICAL-ANCHOR vs docs/STATUS.md** (`Get-StatusValue:133` parse `| label | **N*" +- file-ref **employee.ts** · trích: "· EmptyState/cn/api/apiError ✅ · `types/employee.ts` **identical** · Paged `types/master` ✅ · `DepartmentTreeNode` định nghĩa INLINE trong page (:65 m" +- file-ref **gate.ps1** · trích: "ale) — ZERO age-window. `memory-archive-gate.ps1` over-cap = byte-MEASURE+2-strike-hysteresis (`:106 bytes>cap`), A7 = substring-pointer-resolve. Neit" +- file-ref **memory.ps1** · trích: "ined headroom' + `scripts/measure-agent-memory.ps1` real-bytes), bump-not-cut khi curate drops markers. Hysteresis drain-to-BELOW-low-water (`gate:33`" +- file-ref **menuKeys.ts** · trích: "ll → KHÔNG cần sửa, chỉ +menuKeys (11) `menuKeys.ts:38-42` + `Layout.tsx:60-63 staticMap`. **gotcha #57 CONFIRMED còn trần:** `LeaveTypeConfiguration." +- file-ref **purchaseEvaluation.ts** · trích: "Panel3 separate. `PeApprovalFlow` DTO `purchaseEvaluation.ts` + BE `PurchaseEvaluationApprovalLevelApproverDto` (`PurchaseEvaluationDtos.cs:129-132`" + +### BỔ-SUNG-2 [F1/F2 sau Fidelity-gate @S152 — mở đuôi infra {yml,yaml,json,slnx,csproj,sql,config} + guard IsUnique/optimistic. N/A CỐ-Ý (F5): bundle-hash xoay #69 · tên-giả phép-thử ZZfakehash* · đuôi .md] + +- file-ref **appsettings.Production.json** · trích: "`Identity:Password:RequiredLength=12` (appsettings.Production.json) vs `DemoUserPassword='User@123456'`=11 chars → CreateAsync silent-fail MỌI startu" +- file-ref **appsettings.json** · trích: "uTreeQuery.cs:49-82`). Demo gate: prod `appsettings.json:35 DemoSeed:Disabled=true` → 7 `[DEMO]` HĐ + 4 `[DEMO]` PE (MaPhieu `[DEMO]-A-001`) KHÔNG lên" +- file-ref **memory-budget.json** · trích: "ỗi team-size). **(1) BUDGET ALIGNED:** `memory-budget.json` grep decay|recency|retention|age|TTL|expire=**0 hit**. Params = `autoinject_cap 25600`/`so" +- file-ref **trial-state-lock.json** · trích: "recall@5 gate 0.7, rerank≥0.7) + `eval/trial-state-lock.json` (baseline recall@5=1.0, chunk-drift 5% threshold) + `eval/runs/*.json`. BUT: weekly-Fri" diff --git a/.claude/agent-memory/lead-gap-auditor/MEMORY.md b/.claude/agent-memory/lead-gap-auditor/MEMORY.md index 7c55d1d..eb378d8 100644 --- a/.claude/agent-memory/lead-gap-auditor/MEMORY.md +++ b/.claude/agent-memory/lead-gap-auditor/MEMORY.md @@ -11,24 +11,12 @@ H24 §2(1) vai-GAP — soi CÁI BỊ THIẾU trong cái LEAD surface (việc r ## 📅 Runs -- **S124 (2026-07-15) FIRST real run / dogfood [fable-clone wave · counter=3 · retro-harvest @S132]:** **4 FLAG + 1 mechanism-INFORM-escalate.** gap-decision-sunk ×2: (HIGH) fable-escalation-risk sống CHỈ trong code-comment hmw.js:49-51 ("nếu frontmatter thắng ⇒ /fable-real NO-OP") không surface owner · (MED) 4 owner-decisions S124 không durable-record + H8-supersession chưa stamp (run.md còn nói "sẽ surface KHÔNG apply" — STALE vs applied-reality). gap-carry-dropped ×2: (MED-HIGH) usermem-R6 relocated-on-disk nhưng carry còn "chờ hub/cố-ý-không-dời" (false ×2) + auto-memory UNTRACKED chưa đạt goal 0-git · (MED) carry "2 vai chưa chạy" FALSIFIED bởi chính run này. gap-carry-aged 0-fired NHƯNG mechanism-INFORM: HANDOFF tiering 2-3 session < M=6 ⇒ carry-age **structurally-vacuous VẪN CÒN sau W3 re-stamp** (49 segment, carry-lines=5, streak≡1) → escalate owner: hạ M / miễn-tiering carry-history / đếm từ persistent-ledger. **Honest-zero ×2:** gap-owner-specifics 0 ("Opus 4.8 MAX" captured đủ = model+effort) · gap-underfill 0 — tránh task-hypothesized FP. INFORM: 6 product-carries owner-held = vắng-vì-GIỮ ≠ bỏ-rơi (anti-pattern #3); re-stamp đủ 8 khi closeout. **Lesson:** (1) blind-re-stamp lan trạng-thái stale — re-stamp PHẢI đi kèm re-verify từng carry; (2) risk trong code-comment = quyết-định chìm nếu không surface; (3) "0 flag" phải là honest-zero có disk-touch, không phải chưa-soi. Tag `[s124, first-dogfood, carry-age-vacuous-escalated, honest-zero]` -- **[Post-S124 resolution @S132 retro-note]:** fable-escalation ĐÃ ĐO S126 (spawn-model-audit: spawn-param THẮNG frontmatter ⇒ /fable-real SỐNG — flag HIGH resolved, carry h23-precedence đóng); worker-tier-pin đã stamp vào project-memory + hmw.js; carry-age tiering-vs-M escalation → thành direction "closure-cadence" đang bàn với anh + email hub 641bf8ca (S131). Lần chạy kế đọc baseline này. - -## S137 light-audit #2 [BACKFILL on-behalf @S140 closeout — GAP-3 META chính vai khai @S140; nguồn: .session-counter.json last_audit._note S137 + runs/2026-07-17-S137-h24-light-audit/] - -- **S137 (2026-07-17) light-audit #2 @counter 11 (OVERDUE 8/6 paid — consent-gate DP-3 exercised LẦN ĐẦU post-wire: probe in OVERDUE:light ngay cửa `/tiep` → anh gật → cặp H24 spawn):** **1 FLAG MED `gap-decision-sunk` repeat-2** — dangling-head candidate-fix sống 8-10 phiên CHỈ trong history counter-file (S127/S133 cùng class), chưa từng thành carry-named → resolve: closeout S137 tách `[carry:dangling-head]` (đã land; anh chọn 1a @S139, chờ hub khuôn chung). **+2 INFORM:** cụm 7-carry đồng-tuổi S117/S118 để anh close-sweep · closeout re-stamp carry TỪ HANDOFF-S134 KHÔNG từ WAL-line. 0-garble, verdict 2-vai coverage. class_repeat: gap-decision-sunk 1→2 (jump@3 chưa chạm). Tag `[s137-backfill, light#2, gap-decision-sunk-2, consent-gate-first]` - -## S140 light-audit #3 (2026-07-18, counter 14, force-fire-debt S139) - -- **S140 light-audit #3 [counter 14, force-fire consent S139 P=3 pause gộp]:** **1 FLAG + 2 INFORM + 3 honest-zero.** FLAG MED `gap-owner-specifics`: owner S140 "đóng 5 vòng + session-model/nghi-thức-mới đồng-bộ cross-project" — 4 vòng-items CÓ (sleep NEXT#5·force-fire#6·phép-8#8·bộ-ba-SUB carry#12) + frame đồng-bộ (HANDOFF:5) NHƯNG **session-model VẮNG work-state** (grep=0 HANDOFF/STATUS/governance/session-log; sống CHỈ outbox `21b71a1e` intro + inbox 17-07 + caveat có-điều-kiện session-start §2.1.8 "chưa adopt session-logic 9234a7aa"). Chọn owner-specifics (không gap-decision-sunk) vì trigger=S140 owner-ask mất specific + non-adoption ĐÃ recorded; **jump-sensitive: gap-decision-sunk@2 jump@3 — em-main re-class ⇒ jump, quyết có-ý-thức**. Resolve: closeout thêm tracker HOẶC owner defer. INFORM-1: H24-2 (ĐỌC không recompute) M=6 **hook-vs-budget-cap streak=9≥M FIRES = carry-age non-vacuous LẦN ĐẦU** since S121 (W3 re-stamp landed: freeze=5/luyke=3/hook=9); owner-held NEXT#4 ⇒ INFORM; carry#1 carry-age-vacuous premise NAY SAI=view-stale (lead-view turf). INFORM-2: detector age chỉ 3 NEXT-tagged carry; **7-cluster S117/S118 GIÀ HƠN nhưng VÔ HÌNH với carry-age** (chỉ "Carry MỞ" block, design line811=chỉ newest carry-line age) ⇒ oldest escape aging; unclassifiable→verbatim route H1/enum-extend, CẤM bịa. Honest-zero: carry-dropped 0 (carry 10→12 intact + S139 pendings→NEXT-em) · decision-sunk 0 (dangling→named#11, D1#3, 4a#12 traceable; KHÔNG né-jump, genuinely no clean sunk) · underfill 0 (no %-print evidence). **META: S137 run-#2 CHƯA TỪNG seed vào diary này (GAP-3 tái-diễn — vai soi-thiếu bị thiếu chính diary; task S140 bảo tự-ghi = chống #53).** Tag `[s140, session-model-gap, carry-age-live-first, coverage-gap-oldest, jump-sensitive]` - -## S143 DEEP-audit #1 (2026-07-22, counter 17, force-fire SỚM 1 nhịp — ngưỡng deep = 3+15 = 18) - -- **S143 deep #1 [vào bằng `/tiep`, owner "OK làm hết đi"; 3 lane: reviewer + 2 vai H24]:** **3 FLAG + 3 INFORM.** ⭐ FLAG-1 MED-HIGH `gap-carry-dropped`: `[carry:session-model-adopt]` VẮNG khỏi khối `Carry MỞ re-stamp (13)` (HANDOFF:6) nhưng còn sống ở NEXT anh (:7 mục 8) + KHÔNG có dòng `✅ ĐÓNG`. **Số-học lộ ra: 13−1(đóng dangling-head)+2(🆕)=14, khai 13**; union distinct tag :6+:7 = 15 − dangling = **14 carry sống**. Nguy hiểm vì tổng KHÔNG ĐỔI (13→13) nên trông như đúng, và closeout re-stamp đọc TỪ khối carry mới nhất ⇒ mất hẳn lượt sau. **MÁY CORROBORATE mù:** H24-2 in `[ok] session-model-adopt streak=3` (detector grep tag trong NEXT-segment, KHÔNG đọc tư-cách thành-viên ledger) ⇒ chứng sống cho §2(1) "máy im là ĐÚNG". ⭐ FLAG-2 MED `gap-owner-specifics`: 2 lượt gật — lượt-1 "OK làm đi" 6 mục ghi ĐỦ (HANDOFF:5 + WAL:16/17), lượt-2 "OK làm hết đi" **4 mục chỉ neo được 2** (run.md:3 "2 việc"; WAL/HANDOFF/STATUS = 0 dòng; WAL mtime 12:31 < run-folder 12:55 ⇒ mạch H22 chưa có dòng nào cho lượt-2). ⭐ FLAG-3 MED-HIGH `gap-decision-sunk`: **tìm được NGUỒN CAM-KẾT gọn** = `spec-adap-dot-9-10:68` khối *"Chờ-anh (không block implement)"* 3 mục → grep 9 token × 4 bề-mặt owner (HANDOFF/STATUS/WAL/ACTIVE-MARKS) = **0/0/0/0**: (1) ranh refine⟂lead-omission ratify (ĐÃ WIRE `harness-refine.md:22-30` TRƯỚC khi ratify) · (2) 5-câu session-model chỉ 1/5 lên NEXT anh#8, `session_ctx_kb`/Q4 van-ngưỡng 0-hit · (3) consent-form trio dài hạn. **Đòn bẩy phân-biệt bỏ-sót⟂chủ-động-gác: ngưỡng song sinh `pull_warn_days` CÙNG PHIÊN được cấp carry#12 + NEXT anh#2 với đúng lý-lẽ "quyền anh", còn `session_ctx_kb` cùng hình thì 0 cả hai** ⇒ bất-đối-xứng = omission. INFORM: (1) carry-age FIRE 3 (luyke 7·freeze 9·hook 13 ≥M6) đều owner-held NEXT anh ⇒ INFORM; coverage-gap S140 còn nguyên (máy đo 6/14 carry) — repeat không báo mới. (2) `/tiep` KHÔNG có bước §2.1.6 ⇒ ngân-sách hot-feed **bất-khả-đo** phiên `/tiep`; backfill 210K owner-set S115 không vết ở 2 log closeout gần nhất. (3) 3/3 sub garble #53 phiên này = 0 hit đĩa, mà bề-mặt đang quảng-cáo "0-garble" (S142); sổ đếm class dừng "×20 qua S118" commit cuối 2026-07-15 ⇒ rủi ro biến mất CÓ TIỀN-LỆ; **KHÔNG xếp được vào enum ⇒ verbatim + xin owner mở enum, CẤM bịa**. Honest-zero: `gap-underfill` 0 có lý-do + ghi rõ ứng-viên "spawn-prompt mỏng vs 60K" đã cân-nhắc RỒI BÁC. class_repeat: carry-dropped 0→1 · owner-specifics 1→2 · decision-sunk 0→1, jump@3 KHÔNG chạm. Tag `[s143, deep-1, force-fire-som, count-unchanged-masks-drop, cho-anh-block-sunk, enum-extend-request]` - -## S146 audit #4 — CHƯA CÓ ENTRY (GAP-3 lần 3, con-trỏ tạm @S148) - -- **S146 (2026-07-22/23) light force-fire P=8, chạy THẬT** — bằng-chứng đĩa `.claude/workflows/runs/2026-07-22-S145-apply-hub-answers/sub-lead-omission-S146.md` (20.043B) + `sub-lead-view-S146.md` + `sub-ring2-audit-S146.md`; HANDOFF:10 khai "3 vai, cả 3 garble #53, 7 FLAG → vá hết". **Vai tao ra 4 FLAG**: `gap-owner-specifics` (tally 2→**3 = CHẠM JUMP**) · `gap-incident-unrecorded` (fire lần đầu từ khi owner mở enum @S143) · `gap-decision-sunk` (1→2) · `gap-carry-dropped` (1→2); carry-aged 0-fire (3 hit đều owner-held ⇒ INFORM) · underfill 0 (bất-khả-đo). **Diary này KHÔNG có entry S146** ⇒ GAP-3 tái-diễn lần 3 (S137 → S140 phát-hiện; nay S146 → S148 phát-hiện). Đọc verbatim ở file trên trước khi kết-luận repeat. Tag `[s146, backfill-pointer, gap-3-lan-3]` +- 🗄️ **S124→S146 drained @S152 (A1)** → `archive/2026-07.md` (map: `archive/_INDEX.md`, con-trỏ substring). Tóm 1 dòng/khối: + - S124 first-dogfood: 4 FLAG + escalate carry-age-vacuous; retro-S132 các flag resolved. + - S137 light#2: dangling-head sống 8-10 phiên chỉ trong counter-history → bài "quyết-định chìm ngoài sổ bền". + - S140 light#3: session-model vắng work-state; carry-age fire thật lần đầu (hook streak 9). + - S143 deep#1: tổng-không-đổi che carry-rơi (13→13 mất session-model-adopt); khối Chờ-anh 0-hit 4 bề-mặt. + - S146: GAP-3 lần 3 — con-trỏ sang runs/ (jump-verdict chìm, gốc chuỗi backfill S148). ## S148 light-audit #5 (2026-07-24, counter 22, force-fire P=1 closeout gộp; light 5/6 chưa tới hạn tự-nhiên) @@ -47,3 +35,13 @@ H24 §2(1) vai-GAP — soi CÁI BỊ THIẾU trong cái LEAD surface (việc r - {task: soi cái-THIẾU · nấc: verified (ring2 8/8) · evidence: sub-lead-gap-S151.md 18.740B} - FLAG HIGH carry-aged: detector H24-2 chết im (segment-cut văn-xuôi 'NEXT anh #11') — VÁ @S151, carry-age hồi sinh streak 7/9/12. decision-sunk (tick-fix chỉ ở history[]) → #27 đóng. carry-dropped (theo-dõi sub-class rớt) → AS-17 land @closeout. - #53 + skeleton checklist-only → resume sạch. Diary này 94,5% cap → refine A1 drain queue phiên kế. + +## S151-deep (2026-07-25 @close S151) — deep-sweep [bổ-ghi hồi-tố @S152 M9 — harvest-close FLAG-A] +- {nấc: executed · evidence: runs/2026-07-25-S151-h24-open-bookend/sub-lead-gap-deep-S151.md 22.157B @`1b85713`} +- Ruột đầy đủ = file trên (pointer hồi-tố, nguồn = đĩa). Điểm giữ: phân-rã 6-class trước khi gỡ `_frozen_until_owner` (2 reset-có-chứng · 2 còn sống · 1 vướng-luật · 1 bất-khả-đo) — chống "flag-count giảm trông y hệt thành công". + +## S152 (2026-07-25→26) — bookend hình B @open + @close [M9 on-behalf] +- {nấc: verified (ring2-close: G-F1/G-F2 ĐẠT + 1 caveat + D-3 BROKE) · evidence: sub-lead-gap-S152.md 21.793B + sub-lead-gap-close-S152.md 15.644B} +- @open 2 FLAG gap-carry-dropped (B3 persona-block rơi 2-lane · B6 không tới slot) — xử cả 2 @S152. @close 2 FLAG: ring4 chạy-thật-0-sổ (→ lead dựng `sub-ring4-close-S152.md` scribe + diary ring4) · 2-thư-fan-out chỉ sống ở WAL (→ HANDOFF S152 neo cả 2 file/sha). +- 🔴 D-3 (ring2 BROKE-F4): ngoặc "SE khai ĐÚNG" của vai này TRÁO TẬP-ĐO (`broadcasts/` ⊂ `AI_INFRA`) — mâu-thuẫn trực-diện S-F1 HIGH; suýt làm lead bác oan flag đúng. Bài: phán-quyết phải dùng ĐÚNG tập-đo của mệnh-đề bị chấm; tự-kìm 1 vế chưa đủ nếu vế bên cạnh đóng dấu vượt phép đo. +- @close chết 0B (ngược-#53) → resume "đổ-ruột-TRƯỚC" đổ 15.644B. diff --git a/.claude/agent-memory/lead-gap-auditor/archive/2026-07.gist.md b/.claude/agent-memory/lead-gap-auditor/archive/2026-07.gist.md new file mode 100644 index 0000000..00c68c1 --- /dev/null +++ b/.claude/agent-memory/lead-gap-auditor/archive/2026-07.gist.md @@ -0,0 +1,41 @@ +# gist 2026-07 — lead-gap-auditor (4-field distill, ADDITIVE — verbatim FROZEN 0-touch) + +distill-gen: 1 + +> Nguồn: `archive/2026-07.md` (9.306B — 5 khối S124→S146, drain @S152 A1 md5 5/5). Sinh @S152 V4 AUTO-khi-KÊU (owner #32 "vòng 1→5 auto" — lượt AUTO-sleep ĐẦU TIÊN; scope = 1 shard THẬT sau khi 14/16 = dương-giả tên-gộp mirror S144 + baseline-history = reference skip-sleep S94). Coverage-gate: mọi gotcha#/guard/file:line/root-cause load-bearing của verbatim phải sống ở đây hoặc khai N/A. + +## CỤM 1 — S124 first-dogfood (counter=3, retro-harvest @S132) +- **task/verdict:** 4 FLAG + 1 mechanism-INFORM-escalate. gap-decision-sunk ×2 (HIGH: fable-escalation-risk sống CHỈ trong code-comment `hmw.js:49-51` không surface owner · MED: 4 owner-decisions S124 không durable-record, run.md STALE vs applied-reality) · gap-carry-dropped ×2 (usermem-R6 relocated nhưng carry khai sai ×2 · carry "2 vai chưa chạy" bị chính run FALSIFY). +- **surprise:** carry-age **structurally-vacuous** VẪN CÒN sau W3 re-stamp (nghi-thức (iv) vá @S122 có TRƯỚC run này — vacuity tồn-tại BẤT-CHẤP nó) — 49 segment nhưng carry-lines=5, streak≡1 ⇒ 0-fire vĩnh-viễn → escalate owner; **kết-cục thật:** thành direction `closure-cadence` bàn với anh + email hub `641bf8ca` (S131). 3 phương-án đã trình: hạ M / miễn-tiering carry-history / đếm từ persistent-ledger. +- **guard:** honest-zero PHẢI có disk-touch ("0 flag" ≠ chưa-soi) · blind-re-stamp lan trạng-thái stale — re-stamp phải kèm re-verify từng carry · risk trong code-comment = quyết-định chìm. +- **refs:** hmw.js:49-51 · retro-resolution @S132: fable-escalation ĐÃ ĐO S126 qua `spawn-model-audit` (spawn-param THẮNG frontmatter, /fable-real SỐNG — carry h23-precedence đóng) · worker-tier-pin đã stamp project-memory + hmw.js · vế con F-carry: usermem-R6 relocated + auto-memory UNTRACKED chưa đạt goal 0-git · H8-supersession chưa stamp (run.md stale-vs-applied) · 6 product-carries owner-held = vắng-vì-GIỮ ≠ bỏ-rơi (anti-pattern #3). + +## CỤM 2 — S137 light#2 (counter 11, OVERDUE 8/6 paid; backfill @S140) +- **task/verdict:** 1 FLAG MED gap-decision-sunk repeat-2 — dangling-head candidate-fix sống 8-10 phiên CHỈ trong counter-history (S127/S133 cùng class) → resolve = tách `[carry:dangling-head]` (anh chọn 1a @S139). +- **surprise/guard:** consent-gate DP-3 exercised LẦN ĐẦU post-wire · closeout re-stamp carry đọc TỪ HANDOFF-segment mới nhất, KHÔNG từ WAL-line · +INFORM cụm 7-carry đồng-tuổi S117/S118. +- **refs:** `.session-counter.json` last_audit._note S137 · runs/2026-07-17-S137-h24-light-audit/ · tag `[s137-backfill, light#2, gap-decision-sunk-2, consent-gate-first]`. + +## CỤM 3 — S140 light#3 (counter 14, force-fire-debt S139 P=3) +- **task/verdict:** 1 FLAG MED gap-owner-specifics — direction owner "đóng 5 vòng + session-model đồng-bộ" có 4 vòng-items CÓ nhưng **session-model VẮNG work-state** (grep=0 HANDOFF/STATUS/governance/session-log; sống chỉ ở outbox/inbox + caveat có-điều-kiện). +- **surprise:** carry-age fire THẬT lần đầu since S121 (hook-vs-budget-cap streak 9≥M6) · 7-cluster S117/S118 GIÀ HƠN nhưng VÔ HÌNH với detector (chỉ đo NEXT-tagged carry-line mới nhất) ⇒ oldest-escape-aging coverage-gap. +- **guard:** jump-sensitive re-class phải CÓ-Ý-THỨC khai rõ (gap-decision-sunk@2 → chọn owner-specifics = không né-jump) · unclassifiable → verbatim + route, CẤM bịa class. +- **refs:** META GAP-3 tái-diễn: S137-run chưa từng seed diary này (vai soi-thiếu bị thiếu chính diary mình). Tag `[s140, session-model-gap, carry-age-live-first, coverage-gap-oldest, jump-sensitive]`. + +## CỤM 4 — S143 deep#1 (counter 17, force-fire SỚM 1 nhịp) +- **task/verdict:** 3 FLAG + 3 INFORM. ⭐F1 MED-HIGH gap-carry-dropped: `[carry:session-model-adopt]` VẮNG khối re-stamp mà còn sống NEXT-anh — **số-học lộ: 13−1+2=14, khai 13; đường tính THỨ HAI độc-lập: union distinct tag :6+:7 = 15 − dangling = 14 (2 đường cùng ra 14 = chống-cãi); TỔNG KHÔNG ĐỔI (13→13) nên trông như đúng** · ⭐F2 MED gap-owner-specifics: lượt gật-2 "OK làm hết đi" 4 mục chỉ neo được 2 (chứng mtime WAL 12:31 < run-folder 12:55; đối-chứng: lượt gật-1 "OK làm đi" 6 mục ghi ĐỦ) · ⭐F3 MED-HIGH gap-decision-sunk: khối "Chờ-anh" `spec:68` 3 mục — grep 9 token × 4 bề-mặt owner (HANDOFF/STATUS/WAL/ACTIVE-MARKS) = 0-hit; 3 mục = ranh refine⟂lead-omission · 5-câu session-model (`session_ctx_kb`/Q4 van-ngưỡng) · consent-form trio. +- **surprise:** MÁY CORROBORATE MÙ — H24-2 in `[ok] streak=3` cho carry đã rớt ledger (grep tag ở NEXT-segment, không đọc tư-cách thành-viên) · đòn-bẩy song-sinh (pull_warn_days được cấp slot, session_ctx_kb cùng hình thì 0) = phân-biệt bỏ-sót ⟂ chủ-động-gác. +- **guard:** 3/3 sub garble #53 = 0-hit đĩa trong khi bề-mặt quảng-cáo "0-garble" ⇒ KHÔNG xếp được enum → verbatim + xin owner mở enum (thành `gap-incident-unrecorded` @S143). +- **refs:** spec-adap-dot-9-10:68 · `/tiep` 0 bước %-print ⇒ gap-underfill bất-khả-đo phiên-tiep. Tag `[s143, deep-1, count-unchanged-masks-drop, cho-anh-block-sunk, enum-extend-request]`. + +## CỤM 5 — S146 audit#4 (con-trỏ — GAP-3 lần 3) +- **task/verdict:** chạy THẬT (light force-fire P=8), 4 FLAG: gap-owner-specifics 2→**3 CHẠM JUMP** · gap-incident-unrecorded fire-đầu · gap-decision-sunk 1→2 · gap-carry-dropped 1→2. Diary KHÔNG có entry ⇒ GAP-3 lần 3 (S137→S140, nay S146→S148). +- **refs (verbatim gốc):** `runs/2026-07-22-S145-apply-hub-answers/sub-lead-omission-S146.md` (20.043B). Tag `[s146, backfill-pointer, gap-3-lan-3]`. + +## Refs bổ-sung (coverage-verify @S152 — token verbatim-có gist-thiếu) +- CỤM 1 tag đầy-đủ: `[s124, first-dogfood, carry-age-vacuous-escalated, honest-zero]`. +- CỤM 4 ranh đã-wire-trước-ratify: `harness-refine.md:22-30`; nguồn queue đối-chiếu S151: `harness-refine-return.md`. +- CỤM 5 file anh-em cùng vòng S146: `sub-lead-view-S146.md` · `sub-ring2-audit-S146.md` (cùng folder runs/S145-apply-hub-answers). +- Slot-số HANDOFF nhắc trong khối S137/S143: carry#11 (dangling-head) · carry#12 — là SỐ SLOT sổ chờ-anh THỜI ĐIỂM ĐÓ, KHÔNG phải gotcha #11/#12. 🔴 Slot-số TỰ ĐÁNH LẠI theo thời-gian (mục "5-câu session-model" từng là NEXT-anh#8 @S143, nay #11) — ĐỪNG đóng băng slot-số hiện-hành vào gist, neo bằng TÊN mục. + +## N/A khai (coverage-gate) +- Chuỗi file:line chi-tiết của từng lệnh grep trong khối gốc = giữ ở VERBATIM (Ctrl-F qua `_INDEX.md` substring) — gist giữ ref-đích chính, không chép lại từng block lệnh (đúng khuôn "inject bản-đồ, không inject lãnh-thổ"). diff --git a/.claude/agent-memory/lead-gap-auditor/archive/2026-07.md b/.claude/agent-memory/lead-gap-auditor/archive/2026-07.md new file mode 100644 index 0000000..47b0eb7 --- /dev/null +++ b/.claude/agent-memory/lead-gap-auditor/archive/2026-07.md @@ -0,0 +1,25 @@ +# archive 2026-07 — lead-gap-auditor (L2 verbatim, ADDITIVE-only) + +> Dựng @S152 (A1 queue memory-ops — spec `runs/2026-07-25-S151-trio-memory/harness-refine-return.md:14`). +> 5 khối dưới = MOVE VERBATIM từ L1 `MEMORY.md` (byte-exact, md5-verified @S152). FROZEN — NEVER rewrite; append cuối file only. + +## 📅 Runs S124–S146 (drained từ L1 @S152) + +- **S124 (2026-07-15) FIRST real run / dogfood [fable-clone wave · counter=3 · retro-harvest @S132]:** **4 FLAG + 1 mechanism-INFORM-escalate.** gap-decision-sunk ×2: (HIGH) fable-escalation-risk sống CHỈ trong code-comment hmw.js:49-51 ("nếu frontmatter thắng ⇒ /fable-real NO-OP") không surface owner · (MED) 4 owner-decisions S124 không durable-record + H8-supersession chưa stamp (run.md còn nói "sẽ surface KHÔNG apply" — STALE vs applied-reality). gap-carry-dropped ×2: (MED-HIGH) usermem-R6 relocated-on-disk nhưng carry còn "chờ hub/cố-ý-không-dời" (false ×2) + auto-memory UNTRACKED chưa đạt goal 0-git · (MED) carry "2 vai chưa chạy" FALSIFIED bởi chính run này. gap-carry-aged 0-fired NHƯNG mechanism-INFORM: HANDOFF tiering 2-3 session < M=6 ⇒ carry-age **structurally-vacuous VẪN CÒN sau W3 re-stamp** (49 segment, carry-lines=5, streak≡1) → escalate owner: hạ M / miễn-tiering carry-history / đếm từ persistent-ledger. **Honest-zero ×2:** gap-owner-specifics 0 ("Opus 4.8 MAX" captured đủ = model+effort) · gap-underfill 0 — tránh task-hypothesized FP. INFORM: 6 product-carries owner-held = vắng-vì-GIỮ ≠ bỏ-rơi (anti-pattern #3); re-stamp đủ 8 khi closeout. **Lesson:** (1) blind-re-stamp lan trạng-thái stale — re-stamp PHẢI đi kèm re-verify từng carry; (2) risk trong code-comment = quyết-định chìm nếu không surface; (3) "0 flag" phải là honest-zero có disk-touch, không phải chưa-soi. Tag `[s124, first-dogfood, carry-age-vacuous-escalated, honest-zero]` +- **[Post-S124 resolution @S132 retro-note]:** fable-escalation ĐÃ ĐO S126 (spawn-model-audit: spawn-param THẮNG frontmatter ⇒ /fable-real SỐNG — flag HIGH resolved, carry h23-precedence đóng); worker-tier-pin đã stamp vào project-memory + hmw.js; carry-age tiering-vs-M escalation → thành direction "closure-cadence" đang bàn với anh + email hub 641bf8ca (S131). Lần chạy kế đọc baseline này. + +## S137 light-audit #2 [BACKFILL on-behalf @S140 closeout — GAP-3 META chính vai khai @S140; nguồn: .session-counter.json last_audit._note S137 + runs/2026-07-17-S137-h24-light-audit/] + +- **S137 (2026-07-17) light-audit #2 @counter 11 (OVERDUE 8/6 paid — consent-gate DP-3 exercised LẦN ĐẦU post-wire: probe in OVERDUE:light ngay cửa `/tiep` → anh gật → cặp H24 spawn):** **1 FLAG MED `gap-decision-sunk` repeat-2** — dangling-head candidate-fix sống 8-10 phiên CHỈ trong history counter-file (S127/S133 cùng class), chưa từng thành carry-named → resolve: closeout S137 tách `[carry:dangling-head]` (đã land; anh chọn 1a @S139, chờ hub khuôn chung). **+2 INFORM:** cụm 7-carry đồng-tuổi S117/S118 để anh close-sweep · closeout re-stamp carry TỪ HANDOFF-S134 KHÔNG từ WAL-line. 0-garble, verdict 2-vai coverage. class_repeat: gap-decision-sunk 1→2 (jump@3 chưa chạm). Tag `[s137-backfill, light#2, gap-decision-sunk-2, consent-gate-first]` + +## S140 light-audit #3 (2026-07-18, counter 14, force-fire-debt S139) + +- **S140 light-audit #3 [counter 14, force-fire consent S139 P=3 pause gộp]:** **1 FLAG + 2 INFORM + 3 honest-zero.** FLAG MED `gap-owner-specifics`: owner S140 "đóng 5 vòng + session-model/nghi-thức-mới đồng-bộ cross-project" — 4 vòng-items CÓ (sleep NEXT#5·force-fire#6·phép-8#8·bộ-ba-SUB carry#12) + frame đồng-bộ (HANDOFF:5) NHƯNG **session-model VẮNG work-state** (grep=0 HANDOFF/STATUS/governance/session-log; sống CHỈ outbox `21b71a1e` intro + inbox 17-07 + caveat có-điều-kiện session-start §2.1.8 "chưa adopt session-logic 9234a7aa"). Chọn owner-specifics (không gap-decision-sunk) vì trigger=S140 owner-ask mất specific + non-adoption ĐÃ recorded; **jump-sensitive: gap-decision-sunk@2 jump@3 — em-main re-class ⇒ jump, quyết có-ý-thức**. Resolve: closeout thêm tracker HOẶC owner defer. INFORM-1: H24-2 (ĐỌC không recompute) M=6 **hook-vs-budget-cap streak=9≥M FIRES = carry-age non-vacuous LẦN ĐẦU** since S121 (W3 re-stamp landed: freeze=5/luyke=3/hook=9); owner-held NEXT#4 ⇒ INFORM; carry#1 carry-age-vacuous premise NAY SAI=view-stale (lead-view turf). INFORM-2: detector age chỉ 3 NEXT-tagged carry; **7-cluster S117/S118 GIÀ HƠN nhưng VÔ HÌNH với carry-age** (chỉ "Carry MỞ" block, design line811=chỉ newest carry-line age) ⇒ oldest escape aging; unclassifiable→verbatim route H1/enum-extend, CẤM bịa. Honest-zero: carry-dropped 0 (carry 10→12 intact + S139 pendings→NEXT-em) · decision-sunk 0 (dangling→named#11, D1#3, 4a#12 traceable; KHÔNG né-jump, genuinely no clean sunk) · underfill 0 (no %-print evidence). **META: S137 run-#2 CHƯA TỪNG seed vào diary này (GAP-3 tái-diễn — vai soi-thiếu bị thiếu chính diary; task S140 bảo tự-ghi = chống #53).** Tag `[s140, session-model-gap, carry-age-live-first, coverage-gap-oldest, jump-sensitive]` + +## S143 DEEP-audit #1 (2026-07-22, counter 17, force-fire SỚM 1 nhịp — ngưỡng deep = 3+15 = 18) + +- **S143 deep #1 [vào bằng `/tiep`, owner "OK làm hết đi"; 3 lane: reviewer + 2 vai H24]:** **3 FLAG + 3 INFORM.** ⭐ FLAG-1 MED-HIGH `gap-carry-dropped`: `[carry:session-model-adopt]` VẮNG khỏi khối `Carry MỞ re-stamp (13)` (HANDOFF:6) nhưng còn sống ở NEXT anh (:7 mục 8) + KHÔNG có dòng `✅ ĐÓNG`. **Số-học lộ ra: 13−1(đóng dangling-head)+2(🆕)=14, khai 13**; union distinct tag :6+:7 = 15 − dangling = **14 carry sống**. Nguy hiểm vì tổng KHÔNG ĐỔI (13→13) nên trông như đúng, và closeout re-stamp đọc TỪ khối carry mới nhất ⇒ mất hẳn lượt sau. **MÁY CORROBORATE mù:** H24-2 in `[ok] session-model-adopt streak=3` (detector grep tag trong NEXT-segment, KHÔNG đọc tư-cách thành-viên ledger) ⇒ chứng sống cho §2(1) "máy im là ĐÚNG". ⭐ FLAG-2 MED `gap-owner-specifics`: 2 lượt gật — lượt-1 "OK làm đi" 6 mục ghi ĐỦ (HANDOFF:5 + WAL:16/17), lượt-2 "OK làm hết đi" **4 mục chỉ neo được 2** (run.md:3 "2 việc"; WAL/HANDOFF/STATUS = 0 dòng; WAL mtime 12:31 < run-folder 12:55 ⇒ mạch H22 chưa có dòng nào cho lượt-2). ⭐ FLAG-3 MED-HIGH `gap-decision-sunk`: **tìm được NGUỒN CAM-KẾT gọn** = `spec-adap-dot-9-10:68` khối *"Chờ-anh (không block implement)"* 3 mục → grep 9 token × 4 bề-mặt owner (HANDOFF/STATUS/WAL/ACTIVE-MARKS) = **0/0/0/0**: (1) ranh refine⟂lead-omission ratify (ĐÃ WIRE `harness-refine.md:22-30` TRƯỚC khi ratify) · (2) 5-câu session-model chỉ 1/5 lên NEXT anh#8, `session_ctx_kb`/Q4 van-ngưỡng 0-hit · (3) consent-form trio dài hạn. **Đòn bẩy phân-biệt bỏ-sót⟂chủ-động-gác: ngưỡng song sinh `pull_warn_days` CÙNG PHIÊN được cấp carry#12 + NEXT anh#2 với đúng lý-lẽ "quyền anh", còn `session_ctx_kb` cùng hình thì 0 cả hai** ⇒ bất-đối-xứng = omission. INFORM: (1) carry-age FIRE 3 (luyke 7·freeze 9·hook 13 ≥M6) đều owner-held NEXT anh ⇒ INFORM; coverage-gap S140 còn nguyên (máy đo 6/14 carry) — repeat không báo mới. (2) `/tiep` KHÔNG có bước §2.1.6 ⇒ ngân-sách hot-feed **bất-khả-đo** phiên `/tiep`; backfill 210K owner-set S115 không vết ở 2 log closeout gần nhất. (3) 3/3 sub garble #53 phiên này = 0 hit đĩa, mà bề-mặt đang quảng-cáo "0-garble" (S142); sổ đếm class dừng "×20 qua S118" commit cuối 2026-07-15 ⇒ rủi ro biến mất CÓ TIỀN-LỆ; **KHÔNG xếp được vào enum ⇒ verbatim + xin owner mở enum, CẤM bịa**. Honest-zero: `gap-underfill` 0 có lý-do + ghi rõ ứng-viên "spawn-prompt mỏng vs 60K" đã cân-nhắc RỒI BÁC. class_repeat: carry-dropped 0→1 · owner-specifics 1→2 · decision-sunk 0→1, jump@3 KHÔNG chạm. Tag `[s143, deep-1, force-fire-som, count-unchanged-masks-drop, cho-anh-block-sunk, enum-extend-request]` + +## S146 audit #4 — CHƯA CÓ ENTRY (GAP-3 lần 3, con-trỏ tạm @S148) + +- **S146 (2026-07-22/23) light force-fire P=8, chạy THẬT** — bằng-chứng đĩa `.claude/workflows/runs/2026-07-22-S145-apply-hub-answers/sub-lead-omission-S146.md` (20.043B) + `sub-lead-view-S146.md` + `sub-ring2-audit-S146.md`; HANDOFF:10 khai "3 vai, cả 3 garble #53, 7 FLAG → vá hết". **Vai tao ra 4 FLAG**: `gap-owner-specifics` (tally 2→**3 = CHẠM JUMP**) · `gap-incident-unrecorded` (fire lần đầu từ khi owner mở enum @S143) · `gap-decision-sunk` (1→2) · `gap-carry-dropped` (1→2); carry-aged 0-fire (3 hit đều owner-held ⇒ INFORM) · underfill 0 (bất-khả-đo). **Diary này KHÔNG có entry S146** ⇒ GAP-3 tái-diễn lần 3 (S137 → S140 phát-hiện; nay S146 → S148 phát-hiện). Đọc verbatim ở file trên trước khi kết-luận repeat. Tag `[s146, backfill-pointer, gap-3-lan-3]` diff --git a/.claude/agent-memory/lead-gap-auditor/archive/_INDEX.md b/.claude/agent-memory/lead-gap-auditor/archive/_INDEX.md new file mode 100644 index 0000000..029918f --- /dev/null +++ b/.claude/agent-memory/lead-gap-auditor/archive/_INDEX.md @@ -0,0 +1,9 @@ +# _INDEX — lead-gap-auditor archive (map, dựng @S152 A1) + +> Con-trỏ substring (mở file archive rồi Ctrl-F chuỗi trong substring:"..."). KHÔNG line-hint (additive append dịch dòng). + +- 2026-07.md · S124 first-dogfood 4-FLAG + carry-age-vacuous-escalate + retro-resolution S132 · substring:"[s124, first-dogfood" +- 2026-07.md · S137 light#2 backfill (dangling-head 8-10 phiên chỉ sống trong counter-history → carry-named) · substring:"[s137-backfill" +- 2026-07.md · S140 light#3 (session-model VẮNG work-state + carry-age fire THẬT lần đầu streak-9) · substring:"[s140, session-model-gap" +- 2026-07.md · S143 deep#1 (tổng-không-đổi che carry-rơi 13→13 · khối Chờ-anh 0-hit 4 bề-mặt · 3/3 garble) · substring:"[s143, deep-1" +- 2026-07.md · S146 audit#4 con-trỏ GAP-3 lần-3 (verbatim gốc runs/2026-07-22-S145-apply-hub-answers/sub-lead-omission-S146.md 20.043B) · substring:"[s146, backfill-pointer" diff --git a/.claude/agent-memory/lead-stale-auditor/MEMORY.md b/.claude/agent-memory/lead-stale-auditor/MEMORY.md index 4a9742c..d60ca3a 100644 --- a/.claude/agent-memory/lead-stale-auditor/MEMORY.md +++ b/.claude/agent-memory/lead-stale-auditor/MEMORY.md @@ -19,9 +19,19 @@ H24 §2(1) vai-STALE — soi VIEW LỆCH SOURCE của cái LEAD surface. Class - **S148 (2026-07-24) light-audit #4 [counter 22 · light 5/6 CHƯA tới hạn ⇒ FORCE-FIRE theo P=1 closeout-gộp, owner-direction — KHÔNG phải nhịp tự nhiên]** `[diary ghi TRONG lúc làm, anti-#53]` — Machine baseline TOTAL **46** (S143=47 → 46; canonical resolve mig=67 test=528 gotcha=83 table=89 menu=54 policy=216). **5 FLAG.** 🔴 **Ca nặng nhất = CANONICAL-POISON:** `STATUS.md:448` row `| Tests | **528 PASS** | 45 Domain + 483 Infra` NHƯNG `STATUS.md:6` cùng file + `changelog/sessions/2026-07-23-1730-S147…:38` đều ghi **532 (45D+487I, was 483I → +4)** ⇒ closeout S147 vá header quên ô canonical; hệ-quả: detector đọc canonical=528 nên **mọi flag C2/B3 test đo bằng thước sai**, `[OK] canonical matches disk` chỉ cross-check mig+gotcha, **KHÔNG** cross-check test ⇒ mù đúng chỗ. Cặp **BẤT-ĐỐI-XỨNG NGƯỢC CHIỀU** cùng 1 cặp file: `STATUS:6` ghi "gotcha 82" trong khi `STATUS:449`=83 VÀ `docs/gotchas.md` max anchor `### 83.`=83 ⇒ một file, hai row, mỗi row stale MỘT chiều khác nhau. **Lesson:** khi canonical-row và header-line cùng sống trong 1 file, closeout dễ vá 1-trong-2 → *đừng giả định canonical luôn đúng chỉ vì nó tên là canonical*; và **cross-check của máy phủ tới đâu thì mới tin tới đó** (mig+gotcha có, test/table/menu/policy KHÔNG). Tag `[s148, light#4, canonical-poison-test-count, header-vs-canonical-row, cross-check-coverage]` -- **S150 (2026-07-25) BOOKEND @close lượt ĐẦU (hình B — vô-điều-kiện, KHÔNG theo counter) · phiên-logic 3 (S149+S150) · counter 24** `[🔸 SELF-WRITTEN trong lúc làm, anti-#53 — chờ em-main VERIFY per B3]` — Machine TOTAL **46**. **6 FLAG**, và 5/6 nằm trên **cùng 1 file** `docs/HANDOFF.md`. 🔴 **Gốc chung, không phải 5 lỗi rời:** cả phiên-logic chạm HANDOFF đúng **4 dòng-diff** (toàn sweep rename) — mọi quyết-định S149 (O-2 posture-A · O-3 tập-rỗng · O-7 cap 20 · thư model `59ce1d0f` · rename 5 vai) đổ vào `WAL`+`_context-s-3`+`budget.json`+`hmw.js` nhưng **KHÔNG đổ vào sổ owner-facing** ⇒ anh vẫn đang đọc 3 mục "chờ anh chốt" mà chính anh đã uỷ-quyền chốt hôm qua. **Lesson-1 (mới):** *khi quyết-định đi qua đường UỶ-QUYỀN (anh nói "Trả lời 4 câu") thay vì owner-gõ-từng-số, nó land ở nơi lead làm việc chứ không ở nơi owner đọc* — bookend phải soi đúng cái khe đó. **Lesson-2 (đo được, đắt):** trục H24-3 session-label **hiện 0 file có hiệu-lực** — `STATUS.md` có **0** chuỗi `Last updated` (anchor bị đổi hình thành `CURRENT`, đúng thứ comment `:592-595` của chính detector cấm) và `HANDOFF:5` viết `(**S147**` nên regex `\(S` trượt ⇒ nhãn S147 sống trên thân S148/S149 mà máy im. **Không sửa detector (khác turf), nhưng "0 flag" ở trục này KHÔNG đọc thành sạch.** Bẫy tránh được: `grep -c "public const string"` MenuKeys ra **51**, đếm PHẦN-TỬ `All` mới ra **54** = khớp canonical (bài S143 lặp lại nguyên si). Tag `[s150, bookend-close-lan-dau, uy-quyen-land-sai-so, h24-3-anchor-reshape-blind, handoff-1-goc-5-la]` +- **S150 (2026-07-25) BOOKEND @close lượt ĐẦU (hình B — vô-điều-kiện, KHÔNG theo counter) · phiên-logic 3 (S149+S150) · counter 24** `[🔸 SELF-WRITTEN trong lúc làm, anti-#53 — chờ em-main VERIFY per B3]` — Machine TOTAL **46**. **6 FLAG**, và 5/6 nằm trên **cùng 1 file** `docs/HANDOFF.md`. 🔴 **Gốc chung, không phải 5 lỗi rời:** cả phiên-logic chạm HANDOFF đúng **4 dòng-diff** (toàn sweep rename) — mọi quyết-định S149 (O-2 posture-A · O-3 tập-rỗng · O-7 cap 20 · thư model `59ce1d0f` [nay = pre-re-stamp; published `9c909007` @S152] · rename 5 vai) đổ vào `WAL`+`_context-s-3`+`budget.json`+`hmw.js` nhưng **KHÔNG đổ vào sổ owner-facing** ⇒ anh vẫn đang đọc 3 mục "chờ anh chốt" mà chính anh đã uỷ-quyền chốt hôm qua. **Lesson-1 (mới):** *khi quyết-định đi qua đường UỶ-QUYỀN (anh nói "Trả lời 4 câu") thay vì owner-gõ-từng-số, nó land ở nơi lead làm việc chứ không ở nơi owner đọc* — bookend phải soi đúng cái khe đó. **Lesson-2 (đo được, đắt):** trục H24-3 session-label **hiện 0 file có hiệu-lực** — `STATUS.md` có **0** chuỗi `Last updated` (anchor bị đổi hình thành `CURRENT`, đúng thứ comment `:592-595` của chính detector cấm) và `HANDOFF:5` viết `(**S147**` nên regex `\(S` trượt ⇒ nhãn S147 sống trên thân S148/S149 mà máy im. **Không sửa detector (khác turf), nhưng "0 flag" ở trục này KHÔNG đọc thành sạch.** Bẫy tránh được: `grep -c "public const string"` MenuKeys ra **51**, đếm PHẦN-TỬ `All` mới ra **54** = khớp canonical (bài S143 lặp lại nguyên si). Tag `[s150, bookend-close-lan-dau, uy-quyen-land-sai-so, h24-3-anchor-reshape-blind, handoff-1-goc-5-la]` ## S151 (2026-07-25) — bookend @open hình B [M9 lead on-behalf, verify từ sub-file] - {task: soi view-lệch-source 5 surface · nấc: verified (ring2 8/8 ĐẠT) · evidence: runs/2026-07-25-S151-h24-open-bookend/sub-lead-stale-S151.md 14.636B} - 5 FLAG (role-desc README:249 tự-niêm-phong · stale-count thước-RAG ~3076 + counter-24 · residual-asym sha-977ba18 E-012-tái + bảng-cổ :302) — TẤT CẢ đã vá @S151 batch doc-fix. - #53 first-return + skeleton-THUẦN (file 12-dòng lúc chết) → resume đổ trọn. Bài: append TỪNG finding ngay khi thấy, đừng dồn cuối; VERIFIED-CLEAN phải KÈM LỆNH (ring2 BROKE đúng dòng thiếu lệnh rename-residue). + +## S151-deep (2026-07-25 @close S151) — deep-sweep 5-trục [bổ-ghi hồi-tố @S152 M9 — harvest-close FLAG-A: lượt này 0 sổ nào ghi tới nay] +- {nấc: executed · evidence: runs/2026-07-25-S151-h24-open-bookend/sub-lead-stale-deep-S151.md 22.056B @`1b85713`} +- Ruột đầy đủ = file trên (bổ-ghi pointer sau sự-kiện, nguồn = đĩa, KHÔNG tái-dựng thêm từ trí nhớ). + +## S152 (2026-07-25→26) — bookend hình B @open + @close [M9 on-behalf] +- {nấc: verified (ring2-close: 3+6 FLAG ĐẠT 9/9 nội-dung; D-1/D-2 khuyết-tật đo) · evidence: sub-lead-stale-S152.md 22.284B + sub-lead-stale-close-S152.md 30.195B} +- @open 3 FLAG (HANDOFF(29) bộ-số ma · STATUS:455 bundle S134 · README:5 owner-choice) — vá trong phiên, @close VC-1/2/3 xác nhận vá đúng. @close 6 FLAG, ⭐F1 HIGH: adap-report khai "thư vắng cả hub" trong khi thư PUBLISHED re-stamp `9c909007` — lead vá 6/6 @closeout (sha-sweep 13 bề-mặt LIVE). +- 🔴 D-1 (ring2): lead PIN file lúc 16.911B đang-ghi → 3 FLAG cuối ngoài tầm quyết-định; tally thoát NHỜ MAY (class đã fire @open). Mọi section kết `---` làm bản-cắt trông hoàn-chỉnh → đề-xuất dòng chốt `END+TOTAL` (chờ anh). D-2: 4/4 offset `:55` số-gõ-tay không tái-dựng — output dán từ terminal, đừng gõ lại. +- #53 return-slice ×2 (first + completion) — file đĩa cứu trọn. diff --git a/.claude/agent-memory/memory-budget.json b/.claude/agent-memory/memory-budget.json index 199fefe..7b933d6 100644 --- a/.claude/agent-memory/memory-budget.json +++ b/.claude/agent-memory/memory-budget.json @@ -1,7 +1,7 @@ { "_note": "Harness-9 (S70, 2026-06-17) memory budget. Caps SEEDED BY MEASUREMENT (scripts/measure-agent-memory.ps1), NOT imagined headroom. Budget-audit @session-start (session-start.md §2.1.2): if curate-to-fit is dropping important markers, BUMP the relevant cap rather than cut markers. Re-measure with the script; never hand-edit measured_bytes.", "seeded_date": "2026-06-18 (S71 re-measure after G1 curate — reviewer 36.7KB + investigator 29.8KB over-cap from S71 same-role race, curated L1->L2 back under auto-inject cap)", - "last_sleep_at": "2026-07-18", + "last_sleep_at": "2026-07-26", "_last_sleep_at_note": "Harness-10b sleep-recovery (S72): timestamp lan cuoi chay /sleep-recovery-memory-l2. null = chua tung. session-start §2.1.2 + session-end §L.b(c) doc field nay -> INFORM goi-y nen L2 neu null hoac today-last_sleep_at>=7 ngay. Lead=single-writer (chi command sleep set field nay).", "session_ctx_kb": 64, "_session_ctx_kb_owner_set": "🔴 OWNER-SET TUONG-MINH @S146 2026-07-22 — anh chot '1 -> tuong minh' sau khi lead surface DAY DU 2 ly-do phan-bien (K6.2 muon-so-chua-do + H18 ghost-wire). Quyet-dinh cua owner co concern trong tam nhin => THUC THI, khong hoi lai. Don vi = KB; code doc PHAI nhan 1024 (khop manifest hub 101e69d6 'session_ctx_kb: 64'). Nguon so 64 = manifest hub, KHONG phai SE tu do.", diff --git a/.claude/agent-memory/reviewer/MEMORY.md b/.claude/agent-memory/reviewer/MEMORY.md index fcf7b7d..bf1abea 100644 --- a/.claude/agent-memory/reviewer/MEMORY.md +++ b/.claude/agent-memory/reviewer/MEMORY.md @@ -101,3 +101,13 @@ Adversarial pre-commit reviewer SOLUTION_ERP. Read-only verify + live curl prod ## S149 (2026-07-24) — gate hội-tụ-bookend [LEAD GHI ON-BEHALF @S150 — M9/B3 theo H2-F4 (1 invocation thật → 0 entry); nguồn: `runs/2026-07-24-S149-hoi-tu-bookend/sub-reviewer-hoi-tu.md` 15.733B] - `/fable-real reviewer` gate spec hội-tụ-bookend: **GO-WITH-FIXES 1C/6M/4m** (CLEAN 218K, 0 garble) — spec v1→v2 trước wave implement 5-lane Opus (5/5 done 946K 0-garble). Lưu ý sổ: lượt gate adap-backlog `wf_f4e4c006` KHÔNG tính invocation vai này (reviewer-lane **skeleton-ruột-rỗng** — khung 274B, 0 append, return+resume đều fail → em-main-solo re-do; xem sổ garble sub-class @S150). + +## S152 (2026-07-26) — D2 Fidelity-gate 6 gist "CỤM BỔ SUNG" (coverage-diff) — **PASS_WITH_FIXES** (A/B/C/D PASS · E FAIL) +- **Census thay spot:** 307/307 trích có trong verbatim CẶP (275 exact + 32 sau khi hoàn `'`→`"`), 307/307 chứa ĐÚNG token gắn nhãn, 307/307 token thật-sự VẮNG khỏi gist tiền-append (0 gap thổi-phồng). `ref`=46 khớp đúng claim lead. Trích = cửa-sổ ~150 ký-tự cố-định, token ở ~27% → cắt giữa từ ở 2 biên nhưng payload (file:line/finding) còn nguyên ⇒ điều-hướng được, KHÔNG rác. +- 🔴 **E FAIL — class-gap hệ-thống, chữ-ký sạch:** máy-trích emit file-ref CHỈ cho `{.cs 101/.tsx 45/.ts 16/.ps1 8}` = 170 token, **ZERO cho `{.yml,.json,.slnx,.csproj,.sql,.config}`** ⇒ 13 token infra vắng ở 5/6 cặp. Nặng nhất: `deploy.yml` (chính file pipeline, trong gist của vai CI/CD!) · `appsettings.Production.json` (16 lần trong verbatim) · 2× `s59-*.sql` (chạy TAY prod ngoài pipeline) · `memory-budget.json` (single-source canonical CLAUDE.md). Header cụm TỰ đặt chuẩn "file-ref phải sống trong gist" mà KHÔNG khai N/A ⇒ trượt bằng chính thước mình. +- 🔴 **3 THƯỚC-HỎNG (bug ở phép đo, không ở vật):** (1) md5 disk vs `git show` — spec gate ghi vậy — báo FAIL GIẢ 3/6 verbatim do worktree CRLF ⟂ blob LF (autocrlf=true + 188 file legacy `i/lf w/crlf`); đúng phải `git diff HEAD --quiet` hoặc strip-CR 2 phía. (2) `grep -c distill-gen` vô-dụng vì CHÍNH header cụm chứa chữ "distill-gen giữ" (citation-trap nhẹ) → phải so VALUE `distill-gen:\s*\d+`. (3) `grep -iF` trên MSYS trả **0-hit im-lặng** cho pattern ASCII trong file UTF-8 (`Mig42`: `-F`=1 nhưng `-iF`=0) = bẫy vắng-mặt-trông-giống-sạch S146 — thoát nhờ đối-chiếu Python. +- **Tự bắt 2 lỗi của CHÍNH mình trước khi báo:** "Mig 47/50/42/46 MISS" = artifact chuẩn-hoá của tao (`Mig42` liền không dấu cách, có ĐỦ 2 phía) · context-regex `.{70}` trả RỖNG đọc nhầm thành sạch → phải `.{0,70}`. ⇒ **LUẬT: mọi MISS phải literal-grep XÁC-NHẬN 2 phía bằng công-cụ THỨ HAI trước khi vào report.** +- D re-ground từ đĩa: `docs/gotchas.md` count=83/max=83 ⇒ 0 nhãn `gotcha #N>83`; soi NGƯỢC 24 dòng gotcha ≤83 tìm mirror-error (run-number đội lốt gotcha) → 0 ca, mọi #N đều là gotcha thật trong ngữ-cảnh nguồn. Tag `[s152, d2-fidelity-gate, coverage-diff, extractor-ext-blindspot, thuoc-hong-x3]` + +## S152 (2026-07-25) — R1 retention-note ranh NEVER [M9 on-behalf lead] +- **NEVER Edit/Write vào code-tree, NEVER commit, NEVER push** — vai = verdict-only (PASS/FAIL + issue file:line), sửa là việc em-main/implementer. KHAI THẬT 2 nấc: (a) ranh commit/push/code-tree **chưa từng vỡ**; (b) Write/Edit runtime CÓ cấp và ĐÃ dùng hợp lệ cho sub-file run-folder + diary-self-write (AS-10 VERIFY-KEEP, nhân-chứng S143) — tức "NEVER" áp cho ĐÍCH (code/commit/push), không phải cho tool-tồn-tại; containment thật = git-diff lead. Tag `[s152, r1-retention, never-edit-write-commit-push-target-scoped]` diff --git a/.claude/agent-memory/reviewer/archive/2026-06.gist.md b/.claude/agent-memory/reviewer/archive/2026-06.gist.md index 1b38b86..8feb715 100644 --- a/.claude/agent-memory/reviewer/archive/2026-06.gist.md +++ b/.claude/agent-memory/reviewer/archive/2026-06.gist.md @@ -32,3 +32,58 @@ - [thấp] VIỆC: 6 routine pre-commit gate cũ S33-S49 (S33 Plan B G-H1 Mig 34 SF-6× · S35 G-H2 BE CRUD 16-endpoint SF-8× · Smart-Friend-cumulative-8×-CLEAN · S40 archive-pointer S29-S33 · S43 P11-B LeaveBalance Max-no-truncate · S49 Harness-1/2/3 governance Max-clean). KẾT-LUẬN: tất cả PASS/CLEAN, 0 unique gotcha#/root-cause mới (gate áp-dụng-lặp). BÀI-HỌC: foundation 5-category + Smart-Friend đã ở L1 — các gate này không sinh marker mới. BẤT-NGỜ: N/A (routine). substring:"S33 Plan B G-H1" / "S35 G-H2 BE CRUD" / "S43 P11-B LeaveBalance" / "S49 Harness 1/2/3" → 2026-06.md - [vừa] VIỆC: 2 die-meta non-deliver (S57bis product-gate die-0-byte ×2 · S60 đợt1 PE submit-guard die mid-run 3rd). KẾT-LUẬN: reviewer chết giữa task → em-main on-behalf gate. BÀI-HỌC: recovery-path = [[feedback_agent_kill_recovery]] (canonical user-memory — marker survive ở đó). BẤT-NGỜ: die-0-byte ×2 cùng điểm. substring:"S57bis product gate" / "S60 đợt1 PE submit-guard" → 2026-06.md - [vừa] VIỆC: 2 Harness-10 adap-review R2(hmw.js engine)/R3(floor C1-C8) — REDUNDANT (dupe S71 entry giữ L1-top). KẾT-LUẬN: cùng catch C5 L1 over-claim (doc nói hmw.js prompt-builder emit L1, engine no-fs → grep=0 → fixed em-main convention). BÀI-HỌC: marker survive ở L1 S71 + [[feedback_harness10_run_trace]]. BẤT-NGỜ: R2+R3 độc-lập cùng kết luận = high-conf. substring:"Harness-10 adap R2-lens hmw.js" / "Harness-10 adap run-trace folder R3-floor" → 2026-06.md + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-06.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. *(Đính-chính nhãn @lead-review: `#N > 83` = Run/PR-ref CI, KHÔNG phải gotcha — repo max #83; đổi nhãn `ref`.)* + +- ref **#283** · trích: "e-checklist PASS 0 blocker') → ship Run #283 PASS prod-verified, bundle rotate both. LEARNED: self-gate em main đứng vững lần 2 (sau S57bis) — checkli" +- ref **#291** · trích: "ual ctor — KHÁC CreateDepartmentCommand #291 CS7036 vì positional-required vs trailing-optional); mirror fe-user==fe-admin SHA256 IDENTICAL (PeDetailT" +- ref **#293** · trích: "`null` backward-compat phiếu thật (Run #293 GET 200); Create/Update +trailing-optional `HoSoLink=null` KHÔNG vỡ call-site (grep 0 manual ctor — KHÁC" +- gotcha **#30** · trích: "k sound (mig 3-file OK pure-ASCII gotcha#30-respect, PUT wired real not-mock). **🟡 MAJOR race STILL PRESENT (carry-over Part1, line 64 entry):** PeDet" +- ref **#313** · trích: "authz) on commit 1d86abc (deployed Run #313) + 1 uncommitted FE-fix. **Uncommitted diff = 2 LOC product only** (`priceMissing` both apps, SHA-identic" +- ref **#381** · trích: "49 Up/Down reversible + 240 test + Run #381 + prod smoke 401/404-control. LEARNED: output-file size=0 + im >5 phút = chết, KHÔNG đợi thêm; KHÔNG re-s" +- gotcha **#42** · trích: "> Foundation (role + bug patterns #42/#43/#44/#47 + 6-category checklist + Smart Friend guard + review essentials) + 6 newest activity entries + S49/S" +- gotcha **#43** · trích: "> Foundation (role + bug patterns #42/#43/#44/#47 + 6-category checklist + Smart Friend guard + review essentials) + 6 newest activity entries + S49/S" +- gotcha **#47** · trích: "dation (role + bug patterns #42/#43/#44/#47 + 6-category checklist + Smart Friend guard + review essentials) + 6 newest activity entries + S49/S43/S35" +- gotcha **#48** · trích: "EAN:** (1) S22 #44 silent-403 · (2) S25 #48 SQLite tie-break · (3) S29 password ≥12 · (4) S29 ApplicableType cross-module · (5) S33 BW test · (6) S33" +- gotcha **#51** · trích: "plete 3 HRM, DbInitializer idempotent + #51 infra-gated, SHA256 mirror, no copy-paste Driver↔Vehicle). **Learned:** parallel fan-out (BE∥FE file-disjo" +- gotcha **#66** · trích: "full 50-900 so brand-800 valid); gotcha #66 — 0 gradient/dark-bg headings added (all headers on light surface use accent-ink text-brand-800/{accent}-7" +- Mig **Mig 43** · trích: "th cumulative gotcha #57 (after Holiday Mig 43 S45 + HRM ×3 Mig 45 S51). 3 Master configs (Department:18/Project:19/Supplier:24) Code unique index `.I" +- Mig **Mig 49** · trích: "thz key-set + role-string vs AppRoles + Mig 49 Up/Down reversible + 240 test + Run #381 + prod smoke 401/404-control. LEARNED: output-file size=0 + im" +- Mig **Mig 54** · trích: "- **2026-06-18 (S72ter-WIRE Mig 54 cross-stack-wire + verify-fix lane — uncommitted priceMissing, PASS no-new-deadlock):** Complement to S72ter-AUTHZ" +- Mig **Mig 56** · trích: "6-19 (S76 Part1 PE budget MA-TRẬN 3 cột Mig 56 — uncommitted, PASS w/ 1 MAJOR race + 2 MINOR):** Form ngân sách 1-cột→ma-trận [Dự án|PRO|CCM]. Entity" +- Mig **Mig42** · trích: ":** 14 file (LeaveBalance entity+config+Mig42 + Features + Controller + deduction hook + Create/Update LeaveType guard + embed balance + FE×4 + tests)" +- Mig **Mig46** · trích: ", no stray. Mig 47 latest in seq (after Mig46 ItTicket SLA). **Learned:** cookie-cutter EXT of proven pattern → discriminator = byte-compare filter st" +- Mig **Mig47** · trích: "status = exactly 3 configs + snapshot + Mig47 (2 untracked) + 1 test + 2 MEMORY; no FE, no extra mig, no stray. Mig 47 latest in seq (after Mig46 ItTi" +- Mig **Mig54** · trích: "ad); type files differ pre-existing BUT Mig54 fields diff-identical. Setter handlers fail-closed Forbidden-before-side-effect, PRO Min<=Max validator," +- Mig **Migration 3** · trích: ". priceMissing disable Xác nhận đúng. **Migration 3-file OK** (Mig 54 additive-nullable, Designer 5 col, snapshot). **Tests 334 PASS** (45 Dom+289 Inf" +- guard-kw **cascade** · trích: "*3 excluded keys STAY HIDDEN — decisive cascade check:** `Off` is NOT one of the 4 inherit-roots in GetMyMenuTreeQuery (:56-59,:70-73,:80-83 = Contrac" +- guard-kw **Cascade** · trích: "eeProfiles` 7 table UNIQUE indexes + FK Cascade. SeedDemoEmployeeProfiles NOT gated DemoSeed (gotcha #51 ✓). gotcha #50 Layout staticMap mirror ✓. **3" +- guard-kw **lost-update** · trích: "dmin)]`. **2 MINOR defer:** concurrency lost-update UsedDays (no RowVersion — human-sequential accept) · stale line-num comment. Verdict PASS. Tag `[s" +- guard-kw **RowVersion** · trích: "** concurrency lost-update UsedDays (no RowVersion — human-sequential accept) · stale line-num comment. Verdict PASS. Tag `[s43, p11b-leavebalance, ma" +- guard-kw **Serializable** · trích: "on-failure — codegen commits seq in own Serializable tx BEFORE `Add(e)+SaveChanges`; ticket-insert fail → burned IT/2026/NNN gap. NOT new defect = ide" +- guard-kw **SERIALIZABLE** · trích: "✓. **3 MINOR defer:** EmployeeCode race SERIALIZABLE low-risk · Update 3 bool not nullable (partial reset) · Delete DateTime.UtcNow direct. Verdict PA" +- file-ref **ApprovalWorkflowV2AdminFeatures.cs** · trích: "/ `ccmBudgetEditors=CostControl∪Admin` (ApprovalWorkflowV2AdminFeatures.cs:155-157 + PurchaseEvaluationFeatures.cs:976-978) đảo-chiều set-lookup 3-que" +- file-ref **DbInitializer.cs** · trích: "prod files: MenuKeys.cs (const+All[]), DbInitializer.cs (1 seed tuple), fe-admin {menuKeys.ts, Layout.tsx staticMap, ItTicketsPage.tsx}. **Independen" +- file-ref **HrmConfigFeatures.cs** · trích: ", Smart Friend 8× CLEAN):** 2 NEW file `HrmConfigFeatures.cs` 439 + Controller 137. build clean, 130/130 PASS. Cat1: 0 mock, 8 ConflictException (Holi" +- file-ref **ItTicketsPage.tsx** · trích: "min {menuKeys.ts, Layout.tsx staticMap, ItTicketsPage.tsx}. **Independent re-verify GREEN:** `dotnet build SolutionErp.slnx` 0-warn/0-err · `npm run b" +- file-ref **Layout.tsx** · trích: "(1 seed tuple), fe-admin {menuKeys.ts, Layout.tsx staticMap, ItTicketsPage.tsx}. **Independent re-verify GREEN:** `dotnet build SolutionErp.slnx` 0-w" +- file-ref **PeApprovedPriceFinalizeTests.cs** · trích: "lt-finalize bypass price). Test header `PeApprovedPriceFinalizeTests.cs:27-31` tự-ghi OBSERVATION report-em-main KHÔNG-fix + reflection-invoke isolati" +- file-ref **PeSuggestedPriceFeatures.cs** · trích: "luật chỉ-touch-2-file. **(a) PASS** — `PeSuggestedPriceFeatures.cs` cả 2 setter ForbiddenException TRƯỚC mọi mutate+SaveChanges (load+NotFound→role-g" +- file-ref **Permission.cs** · trích: "→read+create=true, update/delete=false (Permission.cs defaults false anyway). (4) **3 excluded keys STAY HIDDEN — decisive cascade check:** `Off` is N" +- file-ref **PurchaseEvaluationFeatures.cs** · trích: "valWorkflowV2AdminFeatures.cs:155-157 + PurchaseEvaluationFeatures.cs:976-978) đảo-chiều set-lookup 3-query/req no-N+1; khớp 1:1 gate thật canEditPro/" +- file-ref **PurchaseEvaluationWorkflowService.cs** · trích: "NO deadlock — decisive:** submit-guard `PurchaseEvaluationWorkflowService.cs:174-216` enforces (ALL paths incl Admin/system) winnerQuoteTotal>0 (line1" +- file-ref **memory.ps1** · trích: "apshot) → re-run `scripts/measure-agent-memory.ps1` + curate L1→L2 (additive, archive/ + _INDEX exist). (G2 MED) **stale memory claims** — Harness-9 u" +- file-ref **menu.ts** · trích: "ub) — Layout maps to REAL route. `types/menu.ts` correctly NOT mirrored (`key:string` not typed union). admin auto-perm via `SeedAdminPermissionsAsync" +- file-ref **realtime.ts** · trích: "00KB chunk + INEFFECTIVE_DYNAMIC_IMPORT realtime.ts — git-confirmed none introduced, @import lines untouched in diff). **Regression Cat1 ALL preserved" +- file-ref **types.ts** · trích: "256 page 4bcaf2f IDENTICAL both apps** (types.ts correctly NOT identical — admin AttendanceReportDto vs user HrDashboardDto diverge below; added Assig" + +### BỔ-SUNG-2 [F1/F2 sau Fidelity-gate @S152 — mở đuôi infra {yml,yaml,json,slnx,csproj,sql,config} + guard IsUnique/optimistic. N/A CỐ-Ý (F5): bundle-hash xoay #69 · tên-giả phép-thử ZZfakehash* · đuôi .md] + +- guard-kw **IsUnique** · trích: "ect:19/Supplier:24) Code unique index `.IsUnique()` → `+.HasFilter('[IsDeleted] = 0')` + Mig 47 (3-file) + 3 new tests. **Independent re-verify ALL GR" +- guard-kw **optimistic** · trích: "ll Save khi mut.isPending HOẶC onMutate optimistic-merge HOẶC await invalidate. **🔵 MINOR:** (a) `parseVnd` strip `.` → '1.5'→15 (input cho `.` nhưng" +- file-ref **budget.json** · trích: "or-codebase **29819B** (>25600). memory-budget.json `measured` STALE (reviewer 24795/inv 24052 = S70 snapshot) → re-run `scripts/measure-agent-memory." +- file-ref **memory-budget.json** · trích: "estigator-codebase **29819B** (>25600). memory-budget.json `measured` STALE (reviewer 24795/inv 24052 = S70 snapshot) → re-run `scripts/measure-agent-" +- file-ref **package.json** · trích: "tracked `runs/`. NO product/test/csproj/package.json/migration → test baseline 306 untouched, deps N/A. **Spec path trap:** spec said `runs/...` but a" +- file-ref **tsconfig.app.json** · trích: "m exactly) · fe-admin + fe-user `tsc -p tsconfig.app.json --noEmit` BOTH exit 0 clean. **#2 CHÍ MẠNG role-string 'Admin' CONFIRMED REAL (full chain tr" diff --git a/.claude/agent-memory/reviewer/archive/2026-07.gist.md b/.claude/agent-memory/reviewer/archive/2026-07.gist.md index 90291fc..1d50fae 100644 --- a/.claude/agent-memory/reviewer/archive/2026-07.gist.md +++ b/.claude/agent-memory/reviewer/archive/2026-07.gist.md @@ -48,3 +48,27 @@ fields-per-line: VIỆC · KẾT-LUẬN(+file:line/commit) · BÀI-HỌC · BẤ ## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của reviewer) **Gotcha:** #50(bẫy `"gotcha #50"≠"gotcha#50"`) · #53(S101-LaneC/S123/S124/S128/S129) · #69 · #70 · #73 · #81(S117 · indirect-assignment S133). **Mig:** 54 56 59 60+61(wrong-table→fix) 62/63(`778fc98`) 67. **SHA/hash/wf:** `f229b07` `5ee32c0` `e350660` `b7abbc2f` `bcf812fd` `DxUomy4C`/`DkyQ0xCd`/`l_kwCZIF` `wf_31ea3985-92c` `wf_955643c3-f7d` `wf_5f308fd8-744` `6909299a`/`ee00d253`/`a7ff304b`/`eed277f7` `5f511fe5→5f8b8504` `wf_13e3d35a` `88bd8e6` `382713B` `wf_8a0249f6` `ef bb bf` `c0ac7486447e` `181a6d19`/`f29247cf` `bf93abd` `945cf3ad` `58f5afd8` `wf_f9c0b939-181` `e46863c8` `778fc98`. **file:line:** backup-L73/74==archive-L7/8 · STATUS 9412/11090 · HANDOFF 6147/7775 · PE-service 671/873/911/943/1049 · projections :1153/:647/:767 · workflows/README:51 · budget.json:35-37 · hmw.js:31-32 · PurchaseEvaluationDetailFeatures.cs:282-366 · ContractFeatures.cs:46 · CreateContractFromEvaluation:88-90 · FE:201/BE:206 · ExpectedHeaderTokens:37-66 · RealFileHeaderTokens:420-451 · NormalizeHeader:306/:313 · SVC:53/:66/:92/:265/:290 · ultra-on:21/README:208 · WorkflowService:308 · DbInitializer:1323 · mfe-eval.ps1:193 · rag.json:26. **Guard:** fail-closed BEFORE Phase=DaDuyet · server-recompute no-trust-client · EDGE-5 TOP-of-method · byte-mirror bit-exact · all-or-nothing gate:137-152 · upgrade-path MUTATE row · UpsertQuote 0-budget-field · backfill LIKE marker · fingerprint-Ordinal + FormC · node --check · archive-gate 12/12 + A7 246/246 · fault-inject `-RepoRoot` 4/4. **Root-cause:** cut-not-moved `f229b07` · fabrication-by-merge · single→multi-stops-at-display · echo-siblings-rots · #81 via-BIẾN · sibling-guard under-restrict · terminal-rải-per-branch · mirror-a-toggle drops-reader · exact-token misses-paraphrased · fencepost/hero-ratio · session-cumulative · Goodhart-rời-tập-đo · do-token mislabel-chunk-as-whole · heuristic-cận-trên≠real · P1 writer-only reader-thiếu-UTF8 · Get-FileHash SAI-LOẠI · Get-Content-Raw ANSI-mojibake · NFC-literal≠external. **Surprise:** honest-empty>bịa · spec-KHÔNG-migration-FALSE · drift-note-chỗ-duy-nhất-sai · marker-WRITE-ONLY-dead · joint-winner-FE-hiện-BE-block · accent-800-silent · A1-UAT-behavior-change · fencepost-2×-dù-atomic-đúng · do-token-bẫy-lúc-adopt · notice-N-content-independent · acceptance-grep-mù-deliverable-mình. **Verdict-phổ:** FAIL ×2 · PWC/PWF/GWF ~14 · PASS ~17. **Drop `thấp`:** 0 cụm. + +## CỤM BỔ SUNG [coverage-diff @S152 D2 — máy-trích nguyên-văn + lead-review; KHÔNG phải re-distill, distill-gen giữ] + +> Token load-bearing có trong verbatim `2026-07.md` mà gist thiếu — mỗi dòng = token + TRÍCH NGUYÊN-VĂN dòng chứa nó (Ctrl-F token trong verbatim để đọc trọn). Chuẩn gate: gotcha#/Mig/file-ref/guard phải sống trong gist. + +- Mig **Mig 54** · trích: "- **S72* (2026-06-18) Mig 54 PE giá-đề-xuất + CCM-finalize OPT-IN — financial go-live PASS:** fail-closed guard throw BEFORE set Phase=DaDuyet; finali" +- Mig **Mig 56** · trích: "- **S76 (2026-06-19) PE budget 3-cột Mig 56 + badge — PASS:** MAJOR race fixed gotcha #70 (useIsFetching gate). Badge role-set MUST mirror gate bit-fo" +- Mig **Mig 59** · trích: "6-24) PE Section B 3-cột Dự-án|PRO|CCM (Mig 59) — PASS:** authz byte-mirror UpdatePeSuggestedPriceCcm (NotFound→Forbidden, fail-closed); FE `canEditCc" +- Mig **Mig 60** · trích: "7-01) PE EndsBeforeCeo CONFIG→RUNTIME + Mig 60 backfill (bug anh Kiệt FDC, cross-stack+mig, live UAT) — PASS (0 issue):** field `EndedByLevelFinalize`" +- Mig **Mig 61** · trích: "pattern nào khác ngoài Mig 60 — đã fix Mig 61). *(addendum on-behalf H2-proposed @S98)*" +- Mig **Mig 62** · trích: "additive (prod-safe, expansion-cols từ Mig 62 `778fc98` deployed per 4-NCC-in-prod). **Nice-to-have (KHÔNG block)**: (a) test comment :31-37 + svc :3" +- Mig **Mig 63** · trích: "aw:290 +fingerprint-Ordinal-reject:223, Mig 63 reversible+3-file+snapshot:3330, col→field 30/30 OK (Code=col4 viết-tắt, Name=col5 tên-cty). REQUIRED a" +- Mig **Mig 67** · trích: "fresh-DB migrate-trước-seed → backfill Mig 67 no-op trên bảng rỗng). **Bài: RULE 'mọi nhánh set X' phải grep CẢ assignment-qua-BIẾN, không chỉ token" +- Mig **Migration 3** · trích: "d direct field (filter DaDuyet :176). **Migration 3-file OK** (Designer+Snapshot có bit-NOT-NULL-default-false); backfill marker `LIKE N'%Duyệt KẾT TH" +- guard-kw **race** · trích: "et 3-cột Mig 56 + badge — PASS:** MAJOR race fixed gotcha #70 (useIsFetching gate). Badge role-set MUST mirror gate bit-for-bit. SURPRISE: spec 'KHÔNG" +- file-ref **PeSuggestedPriceFeatures.cs** · trích: "slabel self-target(thật 17.1) · AREA-2 `PeSuggestedPriceFeatures.cs:153-199` dropped." +- file-ref **detectors.ps1** · trích: "I CHỖ trước khi quyết TOTAL (governance-detectors.ps1:65-68 'brand-new net → INFORM-sink day-one' — spec quyết ngược không reconcile). ⭐ M7-class: sửa" +- file-ref **probe.ps1** · trích: "i bước cuối** — lòi ` M scripts/nhip-no-probe.ps1` (+55/-2, mtime SAU push) làm SAI câu '**Chưa làm**, chờ owner' trong THƯ ĐÃ STAMP. ⭐ **Số publish p" +- file-ref **purchaseEvaluation.ts** · trích: "nalizeStepName/LevelName: string|null` (purchaseEvaluation.ts:149-150) → `??`-chain TS-safe. 0 BE/test/mig leak. Build fresh ~17:55 ×2 (fe-user hash `" + +### BỔ-SUNG-2 [F1/F2 sau Fidelity-gate @S152 — mở đuôi infra {yml,yaml,json,slnx,csproj,sql,config} + guard IsUnique/optimistic. N/A CỐ-Ý (F5): bundle-hash xoay #69 · tên-giả phép-thử ZZfakehash* · đuôi .md] + +- file-ref **distill-shard-probe.ps1** · trích: "obe.ps1`**: thấy session-start/end gọi `distill-shard-probe.ps1` (ĐÚNG, sleep-check `session-start:135`) → suy sai '⇒ KHÔNG gọi nhip-no-probe' (gọi CẢ" +- file-ref **mfe-state.json** · trích: "+ READ-ONLY-budget proof (1 write-op `.mfe-state.json`); WF1-reviewer caught BLOCKING vocab-fork (memory-fidelity H6.7≠H16 → MFE+alias-map §H). Detai" diff --git a/.claude/agent-memory/ring1-audit/MEMORY.md b/.claude/agent-memory/ring1-audit/MEMORY.md index 2a6661f..351a16c 100644 --- a/.claude/agent-memory/ring1-audit/MEMORY.md +++ b/.claude/agent-memory/ring1-audit/MEMORY.md @@ -29,3 +29,9 @@ - {nấc: verified-self · evidence: sub-ring1-S151.md 21.722B · 33Đ/3T/2KC · falsify 9} - 2/9 phép phá = lỗi CỦA CHÍNH TAO tự bắt (citation-trap U+FFFD use⟂mention suýt nộp HIGH oan + awk mù mega-line) — falsify chạy 2 chiều cả vào mình. Tái-dựng: RAG 2447 tự gọi · gotchas 111.616B chứng hộ F-6. thách-CLEAN BROKE ef-core-Mig-66 = dương-THẬT máy treo. - #53 chết lúc ghi → resume. + +## S152 (2026-07-25→26) — KIỂM H1+H2 @open + @close [M9 on-behalf] +- {nấc: verified-self · evidence: sub-ring1-S152.md 18.444B + sub-ring1-close-S152.md 34.496B · @close 59 claim 48Đ/5T/6KC · falsify 10 (6H/4B) · tái-dựng 15 số (13 khớp) · thách-CLEAN 6 lens (2 THỦNG đều ở ô 🟢)} +- Ăn tiền nhất: BROKE-1 site-6 consent nằm TRONG persona CHÍNH TAO (`ring1-audit.md:24`, mồi KHÁC "gật mới chạy") — no-self-exempt = NÊU không tự sửa; lead vá + error-ledger E-013 EXT. 2 lens THỦNG (Placement + Corruption H2) đều ở ô PASS — soi CLEAN mới ra ăn. +- 3 lần suýt phạt OAN cứu bằng đo-tại-PIN-của-con-đo (commit 18-vs-19 · stackdump-ignore · -Ack-doc; 2/3 vì lead VỪA thi-hành đúng đề-xuất H1 — phạt nó vì nó đúng VÀ được nghe theo) · 1 suýt minh-oan nhầm (đếm `|` vs đếm tên-đoạn — pipe nội-bộ ``). +- #53: @open ngược-#53 resume-1 (chạy-không-ghi) → resume-2 "đổ-ruột-TRƯỚC" + CLI-restart cắt đuôi (lead derive on-behalf, khai tại bookend-synthesis); @close return-slice — file 34.496B tự đủ, 0 mất. diff --git a/.claude/agent-memory/ring2-audit/MEMORY.md b/.claude/agent-memory/ring2-audit/MEMORY.md index ee71b3c..d8b3c4b 100644 --- a/.claude/agent-memory/ring2-audit/MEMORY.md +++ b/.claude/agent-memory/ring2-audit/MEMORY.md @@ -53,3 +53,12 @@ C4/C4b vai-KIỂM vòng **soi-lead (H24)** — adap đợt-11 khoản ①, owner - {nấc: verified-self · evidence: sub-ring2-S151.md 18.785B · 8/8 ĐẠT · falsify 5} - Kỹ thuật ăn tiền: RE-IMPLEMENT detector H24-2 bằng Python độc lập (67seg/20carry/∩=∅) → FLAG HIGH của gap thành CONFIRMED-máy. thách-CLEAN BROKE đúng dòng không-kèm-lệnh. D-2 escalated: counts 10-key/enum-11 thiếu gap-underfill. - #53 chết đúng lúc 'Writing to disk now' → resume. Bài: verdict phải dán ra đĩa THEO TỪNG mục. + +## S151-deep (2026-07-25 @close S151) — KIỂM deep-sweep [bổ-ghi hồi-tố @S152 M9 — harvest-close FLAG-A] +- {nấc: executed · evidence: runs/2026-07-25-S151-h24-open-bookend/sub-ring2-deep-S151.md 22.843B @`1b85713`} +- Ruột đầy đủ = file trên (pointer hồi-tố, nguồn = đĩa; file tự mang guard AS-17 "APPEND TỪNG VERDICT trong lúc làm"). + +## S152 (2026-07-25→26) — KIỂM cặp H24 @open + @close [M9 on-behalf] +- {nấc: verified-self · evidence: sub-ring2-S152.md 37.944B + sub-ring2-close-S152.md 25.294B · @open 5/5 + @close 8/8 ĐẠT · @close falsify 6 (3H/3B) · tái-dựng 7 số (3 lệch-ĐÚNG: 5→8 FLAG · 16.911→30.195B · 24.728 ×1→×2)} +- ⭐Phát hiện lớn @close (4-A): pin lead = BẢN-CẮT 16.911B của file 30.195B — kỷ-luật anti-#53 "append từng finding + mọi section kết `---`" làm file LUÔN hợp-lệ giữa chừng ⇒ bản cắt không có dấu cụt ⇒ 3 FLAG ngoài tầm lead; tally thoát NHỜ MAY. Đề-xuất dòng chốt `` + lead chỉ nhận pin khi grep-count == TOTAL (chờ anh/hub duyệt). F-4 BROKE lead-gap tráo-tập-đo · F-3 BROKE offset-gõ-tay lead-stale · M-1 sót `24.728` ×2 · F-1 time-drift cứu bằng `git log -p` (đường thứ 2). +- @open: M-1 tally-#53 50-vs-53 (commit-subject sai) + đề luật turf-handoff "→ lead chuyển phiên sau". #53: @open ×2 (first + resume mô-tả-ý-định, file 37.9KB cứu); @close return CLEAN khuôn STRICT 4-dòng ×1 lượt — datum: khuôn-cứng return sống tốt hơn return tự-do. diff --git a/.claude/agent-memory/ring4-audit/MEMORY.md b/.claude/agent-memory/ring4-audit/MEMORY.md index ffa946f..7cb32f5 100644 --- a/.claude/agent-memory/ring4-audit/MEMORY.md +++ b/.claude/agent-memory/ring4-audit/MEMORY.md @@ -5,4 +5,9 @@ ## Seed (2026-07-25 S150 — lead ghi on-behalf, M9/B3) - **Nguồn seed:** H2 `harvest-curator` FLAG-F2 @S150 ("dựng nhà trước lần chạy đầu" — tránh tái-phát lớp dir-rỗng-git-mù F1/m#13). Vai CHƯA chạy audit-round nào (vòng nén gần nhất @S140 2026-07-18, TRƯỚC khi vai land S145b; kỳ 2026-07 đã gist, chưa-gist hiện = 0B đo @S150). -- **Lần chạy đầu dự-kiến:** lượt `/sleep-recovery-memory-l2` kế tiếp (INFORM 7-ngày đang fire nhưng 0B pending ⇒ chưa có gì để nén/kiểm). +- **Lần chạy đầu dự-kiến:** lượt `/sleep-recovery-memory-l2` kế tiếp (INFORM 7-ngày đang fire nhưng 0B pending ⇒ chưa có gì để nén/kiểm). *(🧊 seed-note đúng tới S150 — lượt đầu THẬT = S152, entry dưới.)* + +## S152 (2026-07-26) — audit-round ĐẦU-ĐỜI: KIỂM gist V4 AUTO-sleep [lead scribe on-behalf — vai return-only, nguồn + giới-hạn khai trong sub-file] +- {nấc: executed (verdict áp trọn — 4 fix vào gist cùng phiên) · evidence: runs/2026-07-25-S152-h24-open-bookend/sub-ring4-close-S152.md (SCRIBE-BY-LEAD; vật-chứng độc-lập = 4 fix SỐNG trong lead-gap-auditor/archive/2026-07.gist.md:9,:11,:25,:38 + additive HELD: gốc 9.306B 0-diff HEAD)} +- **TRƯỢT-4/5** trên gist đầu-đời lead nén (claim "0-MISS" SAI): thiếu kết-cục-thật closure-cadence/`641bf8ca` · thiếu đường-tính-thứ-2 union-distinct=14 · thiếu ref H8-supersession · slot-số HANDOFF đóng-băng tự-lão-hoá (kèm 1 attribution đảo-thời-gian). ĐẠT-1: bất-biến ADDITIVE. Lượt đầu-đời có RĂNG — thách-CLEAN trên chính sản-phẩm nén của lead. +- 🔴 Lỗ vận-hành tự lộ: return-only ⇒ verdict BỐC HƠI nếu lead không scribe (gap-close G-F1 + harvest-close cùng bắt; ring2 caveat "chạy THẬT chỉ suy được từ mtime") — cân nhắc cho vai ghi-đĩa như các ring khác = quyền anh/hub. diff --git a/.claude/agent-memory/test-specialist/archive/_INDEX.md b/.claude/agent-memory/test-specialist/archive/_INDEX.md new file mode 100644 index 0000000..87c3912 --- /dev/null +++ b/.claude/agent-memory/test-specialist/archive/_INDEX.md @@ -0,0 +1,24 @@ +# _INDEX — test-specialist archive (map, dựng @S152 A2) + +> Con-trỏ substring — mở file archive tương-ứng rồi Ctrl-F chuỗi trong substring:"...". KHÔNG line-hint (additive append dịch dòng). +> Dựng @S152 theo queue memory-ops (refine S151 A2); mọi substring verify count==1 lúc ghi. + +- activity-s51-s52.md · 2026-06-08 (S52 P11-D Master gotcha #57 EXT) [test-before · 3 RED LIVE]: · substring:"- **2026-06-08 (S52 P11-D Master gotcha #57 EXT) [test-before · 3 RED LIVE]:" +- activity-s51-s52.md · 2026-06-08 (S52 P11-E + P11-F WorkflowApps/Attendance test-after · substring:"- **2026-06-08 (S52 P11-E + P11-F WorkflowApps/Attendance test-after" +- activity-s51-s52.md · 2026-06-08 (S51 P11-C HMW Wave2 filtered-unique gotcha #57 · substring:"- **2026-06-08 (S51 P11-C HMW Wave2 filtered-unique gotcha #57" +- baseline-history.md · Count progression (one-line chain) · substring:"Count progression (one-line chain)" +- baseline-history.md · D2 — PE Mig 58 multi-winner (test-after + EF translation-smoke), +6 → 419 · substring:"D2 — PE Mig 58 multi-winner (test-after + EF translation-smoke), +6 →" +- baseline-history.md · S87 — PE Mig 59 CCM-budget-period setter (test-after authz), +7 · substring:"S87 — PE Mig 59 CCM-budget-period setter (test-after authz), +7" +- baseline-history.md · S86 — PE drafter-notify-exclusion REGRESSION (bug-fix test-alongside), +3 · substring:"S86 — PE drafter-notify-exclusion REGRESSION (bug-fix test-alongside)," +- baseline-history.md · S85b — PE UpdateDraft WF-preserve ROOT-FIX bug-class S42 (test-after bug-fix), +3 · substring:"S85b — PE UpdateDraft WF-preserve ROOT-FIX bug-class S42 (test-after b" +- baseline-history.md · S85 — PE urgent DRAFTER-self-unset (test-after authz), +5 · substring:"S85 — PE urgent DRAFTER-self-unset (test-after authz), +5" +- baseline-history.md · S77c — urgent-toggle SYMMETRIC→ASYMMETRIC CORRECTION · substring:"S77c — urgent-toggle SYMMETRIC→ASYMMETRIC CORRECTION" +- baseline-history.md · S77 — PE Mig 57 suggested-price NOTE (test-after, mirror CcmNote), +7 · substring:"S77 — PE Mig 57 suggested-price NOTE (test-after, mirror CcmNote), +7" +- baseline-history.md · S76 — PE Mig 56 PRO-column-split (spec-change + compile-fix arity), +5 · substring:"S76 — PE Mig 56 PRO-column-split (spec-change + compile-fix arity), +5" +- baseline-history.md · S74 — PE Mig 55 CcmNote (compile-fix arity + test-after), +5 · substring:"S74 — PE Mig 55 CcmNote (compile-fix arity + test-after), +5" +- baseline-history.md · S72 — PE Mig 54 anh Kiệt FDC (spec-change + 2 test-after FINANCIAL), +28 · substring:"S72 — PE Mig 54 anh Kiệt FDC (spec-change + 2 test-after FINANCIAL), +" +- baseline-history.md · S69b — PE 2 feature anh Kiệt FDC (test-before-merge SECURITY+FINANCIAL), +14 · substring:"S69b — PE 2 feature anh Kiệt FDC (test-before-merge SECURITY+FINANCIAL" +- baseline-history.md · S69 — Office golive permission-seed regression (test-after SECURITY), +6 · substring:"S69 — Office golive permission-seed regression (test-after SECURITY)," +- baseline-history.md · S60 — UAT anh Kiệt 2 feature PE submit branch (test-after), +14 · substring:"S60 — UAT anh Kiệt 2 feature PE submit branch (test-after), +14" +- baseline-history.md · S57bis / S56 (notes kept) · substring:"S57bis / S56 (notes kept)" +- baseline-history.md · S54 — ItTicket reassign authz (test-before-merge SECURITY), +13 · substring:"S54 — ItTicket reassign authz (test-before-merge SECURITY), +13" diff --git a/.claude/agent-memory/tooling-auditor/MEMORY.md b/.claude/agent-memory/tooling-auditor/MEMORY.md index 77f6b13..f357495 100644 --- a/.claude/agent-memory/tooling-auditor/MEMORY.md +++ b/.claude/agent-memory/tooling-auditor/MEMORY.md @@ -61,3 +61,8 @@ H1 tooling-freshness auditor **SOLUTION_ERP-self**. Read-only + **propose-only** - {nấc: verified (ring1 33Đ/3T — TRƯỢT-1 CỦA TAO: ①SKILL PASS sai, ef-core thiếu row Mig 67) · evidence: sub-tooling-S151.md 17.702B} - F-6 BÁC MÁY: flag #111 = dương-giả C1 nhánh no-# nuốt 'gotchas 111.616B' — đã vá + pin-backtrack. F-2 HIGH README:249 lập-luận tự-niêm-phong → vá = XÓA lập-luận. Bài tự-soi: acceptance 2 CHIỀU (đếm-phần-tử VÀ grep-số) — F-4 sót prose '17/17' trong đúng file vừa đếm. - #53 → resume sạch. + +## S152 (2026-07-25→26) — H1 @open + @close [M9 on-behalf] +- {nấc: verified (ring1-close: 28Đ/2T/5KC trên 35 claim) · evidence: sub-tooling-S152.md 20.435B + sub-tooling-close-S152.md 26.451B} +- @open PASS_WITH_FLAGS 4-LOW (nợ Mig-67 ĐÓNG verified · roster 20=20=20=20 · C2 15/15 tái-lập — ring1 H1-6 hạ 13/15, ef-core :109/:117 khối Budget-chết → lead gắn bia-mộ @S152). @close: FLAG-C1 lô consent 5-site + restart-persona B3 ĐÃ THOẢ (self-observation measured 1/5) + C3 `-Detail`/`-Ack` 0-doc → lead đóng ngay 01:17 (`eval/mfe/README.md`, -Ack = owner-action). +- 🔴 TRƯỢT-2 (ring1-close): C1 "đúng 5 site" = ĐẾM-THIẾU — site-6 `ring1-audit.md:24` núp ngoặc sau câu đúng (E-013(b) tái-phát; lô cuối 9 site sau khi lead grep cùng-lớp trio-persona) · ⑤ "0 file ngoài WAL" khai-sai-kết-quả-lệnh (kết-luận vẫn đúng). Bài: sweep theo LỚP-file (commands+agents+skills), đừng theo danh-sách-site; mồi grep ≥2 biến-thể. diff --git a/.claude/agent-memory/tooling-auditor/archive/_INDEX.md b/.claude/agent-memory/tooling-auditor/archive/_INDEX.md new file mode 100644 index 0000000..b3e52b6 --- /dev/null +++ b/.claude/agent-memory/tooling-auditor/archive/_INDEX.md @@ -0,0 +1,25 @@ +# _INDEX — tooling-auditor archive (map, dựng @S152 A2) + +> Con-trỏ substring — mở file archive tương-ứng rồi Ctrl-F chuỗi trong substring:"...". KHÔNG line-hint (additive append dịch dòng). +> Dựng @S152 theo queue memory-ops (refine S151 A2); mọi substring verify count==1 lúc ghi. + +- 2026-06.md · 2026-06-07 (CREATED · substring:"- **2026-06-07 (CREATED" +- 2026-06.md · 2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅ · substring:"- **2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅" +- 2026-06.md · 2026-06-08 (S51 `/session-end` CHỐT 4-mặt — RAG down, 0 file written · substring:"- **2026-06-08 (S51 `/session-end` CHỐT 4-mặt — RAG down, 0 file written" +- 2026-06.md · 2026-06-10 (S57-start RE-REPORT · substring:"- **2026-06-10 (S57-start RE-REPORT" +- 2026-06.md · 2026-06-10 (S57-RESUME @start RE-REPORT · substring:"- **2026-06-10 (S57-RESUME @start RE-REPORT" +- 2026-06.md · 2026-06-10 (spawn-test H4.8 — Harness-4 two-tier · substring:"- **2026-06-10 (spawn-test H4.8 — Harness-4 two-tier" +- 2026-06.md · 2026-06-11 (S57bis @start RE-REPORT + spawn-test post-restart ✅ · substring:"- **2026-06-11 (S57bis @start RE-REPORT + spawn-test post-restart ✅" +- 2026-06.md · 2026-06-11 (post-S57bis @start RE-REPORT — count-drift S57bis CHƯA flush docs · substring:"- **2026-06-11 (post-S57bis @start RE-REPORT — count-drift S57bis CHƯA flush doc" +- 2026-06.md · 2026-06-11 (S59 @start RE-REPORT — ALL-4-FRESH, 0 drift, tree clean · substring:"- **2026-06-11 (S59 @start RE-REPORT — ALL-4-FRESH, 0 drift, tree clean" +- 2026-06.md · 2026-06-15 (S63 start+end CHỐT 4-mặt — em-main-solo session · substring:"- **2026-06-15 (S63 start+end CHỐT 4-mặt — em-main-solo session" +- 2026-06.md · 2026-06-16 (S66 @start RE-REPORT + @end CHỐT — em-main-solo session · substring:"- **2026-06-16 (S66 @start RE-REPORT + @end CHỐT — em-main-solo session" +- 2026-07.md · 2026-07-02 (S98 @start RE-REPORT — Fable-restore evidence, on-behalf em main APPEND B3 · substring:"- **2026-07-02 (S98 @start RE-REPORT — Fable-restore evidence, on-behalf em main" +- 2026-07.md · 2026-07-02 (S99 @start RE-REPORT — ①②③ PASS, ④DOCS 3-flag · substring:"- **2026-07-02 (S99 @start RE-REPORT — ①②③ PASS, ④DOCS 3-flag" +- 2026-07.md · 2026-07-02 (S100 @start RE-REPORT — ALL-4 PASS, F1/F3 fix-verified, F2 carry · substring:"- **2026-07-02 (S100 @start RE-REPORT — ALL-4 PASS, F1/F3 fix-verified, F2 carry" +- 2026-07.md · 2026-07-03 (S101 @closeout CHỐT — on-behalf em-main APPEND B3 · substring:"- **2026-07-03 (S101 @closeout CHỐT — on-behalf em-main APPEND B3" +- 2026-07.md · 2026-07-06 (S102 @start RE-REPORT — ALL-4 PASS + FABLE VỀ LẠI, inherit-chain data-point #6 · substring:"- **2026-07-06 (S102 @start RE-REPORT — ALL-4 PASS + FABLE VỀ LẠI, inherit-chain" +- 2026-07.md · 2026-07-03 (S101 @start RE-REPORT — ALL-4 PASS + MODEL-DRIFT, on-behalf em-main APPEND B3 · substring:"- **2026-07-03 (S101 @start RE-REPORT — ALL-4 PASS + MODEL-DRIFT, on-behalf em-m" +- 2026-07.md · 2026-07-07 (S105 @closeout CHỐT — ALL-4 PASS, 0 sót · substring:"- **2026-07-07 (S105 @closeout CHỐT — ALL-4 PASS, 0 sót" +- 2026-07.md · 2026-07-11 (S110 @start RE-REPORT — ALL-4 PASS, 0 flag; Fable streak-4, data-point #13 · substring:"- **2026-07-11 (S110 @start RE-REPORT — ALL-4 PASS, 0 flag; Fable streak-4, data" +- 2026-07.md · 2026-07-15 (S123 @start — ALL-4 PASS + 1 MED + 2 LOW; FP-census lane tôi = 17/19 DƯƠNG-GIẢ · substring:"- **2026-07-15 (S123 @start — ALL-4 PASS + 1 MED + 2 LOW; FP-census lane tôi = 1" diff --git a/.claude/agents/README.md b/.claude/agents/README.md index b141f33..9493266 100644 --- a/.claude/agents/README.md +++ b/.claude/agents/README.md @@ -2,7 +2,7 @@ > 🔴 **Số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents. KHÔNG chép số vào file này** (B1 derived-trỏ-canonical). *Bản trước S122 cứng-hoá "12-agent" ở **8 chỗ** trong khi roster đã 14 — đó chính là class `view-stale-role-desc`, và `agents/README` bị lấy làm **ví-dụ minh-hoạ** cho class đó trong [`lead-stale-auditor.md`](lead-stale-auditor.md). Vá @S122 bằng cách **bỏ số**, không phải bằng cách **đổi số** — đổi số thì roster kế lại stale.* -> **Architecture:** sub-agents **worker-tier-pin `opus`+`effort:max` (owner-decision S124 2026-07-15 — thay thế all-inherit Harness-8, trước nữa two-tier Harness-4)** + em main **lead DEFAULT Opus 5 MAX** (thư `59ce1d0f` @S149; Fable = anh `/model`·`/fable-real` — 🧊 idiom "anh chọn per-session" superseded-VALUE) coordinator — **nhóm product/quality** (7 core S39 + frontend-designer pink S47 + database-agent read-advisory S52 + 📄 office-document S107) + **nhóm monitor INFORM-only** (H1 `tooling-auditor` + H2 `harvest-curator`, 2026-06-07 Harness 1 · H24 `lead-stale-auditor` + `lead-gap-auditor`, **S121 W2** · trio-memory `harness-eval` + `harness-refine` + `harness-audit`, **S141** · round-KIỂM ×3 `ring1-audit`/`ring2-audit`/`ring4-audit`, **S145** [C4/C4b TÁCH mỗi-vòng-1-con]). 🔴 **Liệt-kê NHÓM, KHÔNG tổng-số** — số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents (đúng luật dòng đầu file: vá bằng **BỎ số**, không **ĐỔI số**). Tier: **TOÀN BỘ sub `model: opus` + `effort: max`** (worker-tier-pin S124 — sub cố-định KHÔNG theo lead; **đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable = pin ăn runtime, và per-task `tier:'fable'` THẮNG pin trong lượt lệnh engine-đắt anh gõ. **Lead runtime = per-session owner-choice (Fable ↔ Opus); lịch-sử flip-chain lead = canonical [`docs/STATUS.md` §Sub-agents]** (🔴 S106 gộp 1-chain per anh-confirm — reader này KHÔNG enumerate/cập-nhật mỗi flip; BƯỚC 0.6 probe mỗi phiên xác-định runtime lead SỐNG) · effort **Max** (env machine-wide + frontmatter). SE KHÔNG có lớp helper/gopher rẻ (**mọi sub đều substantive memory-bearing → worker-tier = opus+max, KHÔNG hạ thấp hơn**). *(Lineage: two-tier H4 [4 promote inherit + 7 demote pin `claude-opus-4-8`] → all-inherit H8 S66–S123 → worker-tier-pin S124 — chi-tiết ở Upgrade 2026-06-10 + S66 dưới.)* +> **Architecture:** sub-agents **worker-tier-pin `opus`+`effort:max` (owner-decision S124 2026-07-15 — thay thế all-inherit Harness-8, trước nữa two-tier Harness-4)** + em main **lead DEFAULT Opus 5 MAX** (thư `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`); Fable = anh `/model`·`/fable-real` — 🧊 idiom "anh chọn per-session" superseded-VALUE) coordinator — **nhóm product/quality** (7 core S39 + frontend-designer pink S47 + database-agent read-advisory S52 + 📄 office-document S107) + **nhóm monitor INFORM-only** (H1 `tooling-auditor` + H2 `harvest-curator`, 2026-06-07 Harness 1 · H24 `lead-stale-auditor` + `lead-gap-auditor`, **S121 W2** · trio-memory `harness-eval` + `harness-refine` + `harness-audit`, **S141** · round-KIỂM ×3 `ring1-audit`/`ring2-audit`/`ring4-audit`, **S145** [C4/C4b TÁCH mỗi-vòng-1-con]). 🔴 **Liệt-kê NHÓM, KHÔNG tổng-số** — số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents (đúng luật dòng đầu file: vá bằng **BỎ số**, không **ĐỔI số**). Tier: **TOÀN BỘ sub `model: opus` + `effort: max`** (worker-tier-pin S124 — sub cố-định KHÔNG theo lead; **đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable = pin ăn runtime, và per-task `tier:'fable'` THẮNG pin trong lượt lệnh engine-đắt anh gõ. **Lead runtime = default Opus 5 MAX (thư `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`); Fable = anh `/model`·`/fable-real`); lịch-sử flip-chain lead = canonical [`docs/STATUS.md` §Sub-agents]** (🔴 S106 gộp 1-chain per anh-confirm — reader này KHÔNG enumerate/cập-nhật mỗi flip; BƯỚC 0.6 probe mỗi phiên xác-định runtime lead SỐNG) · effort **Max** (env machine-wide + frontmatter). SE KHÔNG có lớp helper/gopher rẻ (**mọi sub đều substantive memory-bearing → worker-tier = opus+max, KHÔNG hạ thấp hơn**). *(Lineage: two-tier H4 [4 promote inherit + 7 demote pin `claude-opus-4-8`] → all-inherit H8 S66–S123 → worker-tier-pin S124 — chi-tiết ở Upgrade 2026-06-10 + S66 dưới.)* > 🔍 **Đếm roster = ĐO ĐĨA, đừng tin số trong doc:** `ls -1 .claude/agents/*.md | grep -v README | wc -l`. ⚠️ **Glob thô `ls .claude/agents/*.md` bắt LUÔN `README.md`** ⇒ ra **thừa 1** — đây là bẫy số-học thật (R2-C1: acceptance cũ `=14` **FAIL trên implementation ĐÚNG**, và ép "sửa" bằng cách **xoá `README.md`** = catastrophic-Goodhart). > **Upgrade S52 (2026-06-08 — AI_INFRA broadcast `2026-06-08-Agent-database-codebase-agents`):** **+database-agent (read-advisory DB specialist, floor DB1–DB11)** — schema/query/migration-design-review/perf/concurrency (DB11 RowVersion vá lost-update S43). Tailor READ-tier (implementer-backend vẫn author) · color OMIT (8 standard hết) · `store_memory` strip. `codebase-agent` = **SKIP n-a** (investigator-codebase đã cover grep/audit + `csharp-lsp` Windows no-op). ✅ **verified-runtime** — spawned OK S53 (first real spawn, caught Mig 46 committed-but-unapplied-local drift) + S56 2× (pre-golive-verify schema-stream + golive-harden design+review). DB11 lost-update fix landed S56 (atomic ExecuteUpdate + Serializable tx, gotcha #58). > Pattern: Anthropic Building Effective Agents orchestrator-workers + Cognition "writes single-threaded" hybrid + post-deploy automated watchdog. @@ -36,7 +36,7 @@ │ • Synthesize cross-agent findings + commit/push (em main only)│ │ • Fallback solo nếu spawn fail (gotcha #53 truncate / 529) │ └──────────────────────────────────────────────────────────────┘ - ↓ spawn + keep-alive (worker-tier-pin S124: MỌI sub `model: opus`+`effort: max` = worker-tier; lead=default Opus 5 MAX per 59ce1d0f; Fable qua /model·/fable-real) + ↓ spawn + keep-alive (worker-tier-pin S124: MỌI sub `model: opus`+`effort: max` = worker-tier; lead=default Opus 5 MAX per 9c909007 (re-stamp; pre 59ce1d0f); Fable qua /model·/fable-real) ── RESEARCH (READ) ────────── ── IMPLEMENT (WRITE) ──────────── ── QUALITY ────────── ┌──────────────────┐ ┌───────┐ ┌─────────────────┐ ┌──────────┐ ┌────────┐ ┌─────────┐ ┌────────┐ │investigator- │ │invest-│ │implementer- │ │implement-│ │test- │ │reviewer │ │cicd- │ diff --git a/.claude/agents/database-agent.md b/.claude/agents/database-agent.md index eafdc6e..467d143 100644 --- a/.claude/agents/database-agent.md +++ b/.claude/agents/database-agent.md @@ -55,3 +55,11 @@ maxTurns: 25 - Schema/perf-claim đo qua introspection + query-plan THẬT (`sqlcmd`/`dotnet ef`), KHÔNG narrative trí-nhớ. - DB7 scope-DB-only + READ-advisory tier = PHÂN-VAI, KHÔNG "read-only enforced" (agent vẫn giữ `Bash` → write-channel qua shell mở; containment = em main single-writer + git-diff post-session, defense-in-depth). - Nấc: **verified-runtime (S53)** — spawn-test confirmed agent loads + DB1/DB10 introspection chạy thật (LocalDB connect + schema read). KHÔNG overclaim: DB2–DB11 floor (vd DB11 RowVersion concurrency) là in-file, exercised per-task khi phát sinh — chỉ DB1/DB10 ran lần spawn đầu. + +## 🚫 Anti-patterns (NEVER) — B3 @S152 (owner "thêm vào luôn"; distill từ floor DB1–DB11 + lịch-sử vai, KHÔNG rắc từ-khoá) + +1. **NEVER tự author entity/config/migration file** — read-advisory: THIẾT-KẾ/REVIEW/PERF/CONCURRENCY-advise, `implementer-backend` AUTHOR (split boundary DB7; double-touch phá coupling entity↔migration). +2. **NEVER khuyên schema từ trí-nhớ khi chưa introspect schema THẬT** — schema-read-first DB1/DB10 (bài S53: chính introspection bắt được Mig 46 committed-but-unapplied-local drift mà green-tests che). +3. **NEVER review write-path mà bỏ trục concurrency** — hỏi "2 request đua thì sao?" trước khi PASS (DB11; gap thật S43 LeaveBalance lost-update, fix S56 Serializable + atomic ExecuteUpdate, gotcha #58). +4. **NEVER cho qua migration không-reversible hoặc thiếu 3-file** — `Down` phải đúng (hoặc khai no-op có lý-do); Migration + Designer + ModelSnapshot commit đủ (DB6, khớp skill `ef-core-migration`). +5. **NEVER đề xuất lệnh destructive không kèm confirm + backup-note** — DROP/TRUNCATE/mass-UPDATE thiếu WHERE-scoped = dừng đề xuất, nêu rủi ro trước (DB2 tối thượng; prod backup chưa auto). diff --git a/.claude/agents/harness-audit.md b/.claude/agents/harness-audit.md index 1da7cba..88b808b 100644 --- a/.claude/agents/harness-audit.md +++ b/.claude/agents/harness-audit.md @@ -47,7 +47,7 @@ Trục của mày = **verify spec-conformance + re-dựng số memory-health**. ## 2 caveat (khai thẳng) 1. 🔴 **read-only = chặn-THIẾU-tool, KHÔNG sandbox:** không Write/Edit nhưng còn Bash = kênh-ghi-mở → lead soát `git status` sau lượt. Mày PHÁN, lead single-writer ghi verdict. -2. 🔴 **pin-based = phụ-thuộc lead truyền path đúng:** mày không tự-tìm run ⇒ nếu lead PIN sai folder, mày TRƯỢT-báo (không âm-thầm chấm nhầm). First-run bộ-ba chờ restart-CLI + spawn-probe + anh consent. +2. 🔴 **pin-based = phụ-thuộc lead truyền path đúng:** mày không tự-tìm run ⇒ nếu lead PIN sai folder, mày TRƯỢT-báo (không âm-thầm chấm nhầm). *(🧊 vế first-run "chờ restart-CLI + anh consent" hết hiệu-lực: bộ-ba chạy THẬT từ S151, AUTO @S151.)* ## Anti-pattern diff --git a/.claude/agents/harness-eval.md b/.claude/agents/harness-eval.md index ea7acd0..56a72c7 100644 --- a/.claude/agents/harness-eval.md +++ b/.claude/agents/harness-eval.md @@ -1,7 +1,7 @@ --- name: harness-eval description: | - Read-only INFORM-only MEMORY-HEALTH đo-số cho SOLUTION_ERP (bộ-ba đồng-kiểm memory-system, adopt AI_INFRA 2026-07-18 khuôn 5-câu `58e28bae`). Là con ĐO (nấc 1/3, TUẦN TỰ eval→refine→audit). ĐỌC OUTPUT của instrument (`scripts/measure-agent-memory.ps1` JSON `agents[].l1_hot_bytes`/`l2_*` · `scripts/mfe-eval.ps1` FIT/strikes/per-role-pct · `scripts/memory-archive-gate.ps1` strike+A7 · `scripts/crystallized-backfill.ps1` headroom · `scripts/nhip-no-probe.ps1` dòng NHIP-NO) + `memory-budget.json` baseline + nhật-ký vai mình. TRẢ SỐ NGUYÊN-VĂN từ instrument + so-baseline + verdict {HEALTHY|REGRESSION|MIXED} theo từng trục + đề-xuất-signal (tín-hiệu cho con ĐỀ-XUẤT bắt) — KHÔNG hành-động, KHÔNG tự sửa, KHÔNG chấm-spec. 🔴 CẤM số-từ-trí-nhớ (chỉ số máy vừa in). Propose-only, single-writer = lead. KHÔNG store_memory, KHÔNG Write/Edit. KHÔNG harvest-op (đó là harvest-curator H2) · KHÔNG chấm-spec (đó là harness-audit) · KHÔNG đề-xuất-action (đó là harness-refine) · KHÔNG soi lead-surface (đó là 2 vai H24). PHẢI dùng khi nghi-thức mở/đóng phiên chạy nấc ĐO của bộ-ba (consent anh gật mới chạy). + Read-only INFORM-only MEMORY-HEALTH đo-số cho SOLUTION_ERP (bộ-ba đồng-kiểm memory-system, adopt AI_INFRA 2026-07-18 khuôn 5-câu `58e28bae`). Là con ĐO (nấc 1/3, TUẦN TỰ eval→refine→audit). ĐỌC OUTPUT của instrument (`scripts/measure-agent-memory.ps1` JSON `agents[].l1_hot_bytes`/`l2_*` · `scripts/mfe-eval.ps1` FIT/strikes/per-role-pct · `scripts/memory-archive-gate.ps1` strike+A7 · `scripts/crystallized-backfill.ps1` headroom · `scripts/nhip-no-probe.ps1` dòng NHIP-NO) + `memory-budget.json` baseline + nhật-ký vai mình. TRẢ SỐ NGUYÊN-VĂN từ instrument + so-baseline + verdict {HEALTHY|REGRESSION|MIXED} theo từng trục + đề-xuất-signal (tín-hiệu cho con ĐỀ-XUẤT bắt) — KHÔNG hành-động, KHÔNG tự sửa, KHÔNG chấm-spec. 🔴 CẤM số-từ-trí-nhớ (chỉ số máy vừa in). Propose-only, single-writer = lead. KHÔNG store_memory, KHÔNG Write/Edit. KHÔNG harvest-op (đó là harvest-curator H2) · KHÔNG chấm-spec (đó là harness-audit) · KHÔNG đề-xuất-action (đó là harness-refine) · KHÔNG soi lead-surface (đó là 2 vai H24). PHẢI dùng khi nghi-thức mở/đóng phiên chạy nấc ĐO của bộ-ba (AUTO 1 vòng/phiên giữa 2 bookend — owner @S151, 🧊 consent-per-run retired). model: opus effort: max tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] diff --git a/.claude/agents/harness-refine.md b/.claude/agents/harness-refine.md index 27b6b77..8ef6c66 100644 --- a/.claude/agents/harness-refine.md +++ b/.claude/agents/harness-refine.md @@ -55,7 +55,7 @@ Trục của mày = **cải-thiện HỆ MEMORY per-role** (agent-memory corpus) ## 2 caveat (khai thẳng) 1. 🔴 **read-only = chặn-THIẾU-tool, KHÔNG sandbox:** không Write/Edit nhưng còn Bash = kênh-ghi-mở → lead soát `git status` sau lượt. Mày ĐỀ-XUẤT, lead single-writer thực-thi (B3 VERIFY→APPEND). -2. 🔴 **đề-xuất ≠ đã-làm:** mọi action là propose-only, owner/lead-gated. First-run bộ-ba chờ restart-CLI + spawn-probe + anh consent — chưa chạy lần nào ⇒ chưa có reinject-ledger entry của vai này. +2. 🔴 **đề-xuất ≠ đã-làm:** mọi action là propose-only, owner/lead-gated. *(🧊 vế first-run "chờ restart-CLI + anh consent — chưa chạy lần nào" hết hiệu-lực: bộ-ba chạy THẬT từ S151, AUTO 1 vòng/phiên @S151.)* Reinject-ledger entry của vai chỉ sinh khi có floor-rot thật — 0 entry ≠ chưa chạy. ## Anti-pattern diff --git a/.claude/agents/harvest-curator.md b/.claude/agents/harvest-curator.md index 4160574..5f35267 100644 --- a/.claude/agents/harvest-curator.md +++ b/.claude/agents/harvest-curator.md @@ -53,3 +53,11 @@ Verify + gom **harvest-MD toàn session** (agent-memory sub · run-folder `runs/ - 🏃 **Harness-10 run-trace audit (`runs/README.md` §Containment — 🧊 `_ledger.md` retired H18-B S100):** run-folder `runs//` được git **TRACKED** → mọi write HIỆN trong git-diff. Khi gom run-folder, VERIFY sub-workflow CHỈ ghi trong `runs//` (sub-md) + code-disjoint đã giao — phát-hiện tracked-change NGOÀI 2 vùng đó (`agent-memory/*` hay canonical) = **FLAG vi-phạm containment** cho em main (git-diff evidence). (Thay model Harness-2 B6 "mọi tracked-change = vi-phạm" — run-folder giờ tracked nên diff KHÔNG blind.) - 🔴 **G-015 KHÔNG overclaim:** sub này = propose-only. TRACKED ≠ read-only-enforced — `store_memory` strip (RAG-write không-gọi-được) NHƯNG giữ `Bash` = write-channel mở → KHÔNG "read-only enforced". Containment THẬT = em main single-writer + git-diff(in-repo) + chunk-count (RAG). - KHÔNG tự ghi memory kênh nào (return delta → em main APPEND B3). + +## 🚫 Anti-patterns (NEVER) — B3 @S152 (owner "thêm vào luôn"; distill từ 5-trục + lịch-sử vai, KHÔNG rắc từ-khoá) + +1. **NEVER đo coverage bằng TÊN file/vai mà bỏ NỘI DUNG** — "vai có mục Sxxx" ≠ "mọi lượt đã harvest" (bài S152: 9/9 vai PASS role-level mà TRỌN lượt DEEP 67KB mồ-côi — thước phải file-level; bài S122: orphan đo tên = 32% dương-giả). +2. **NEVER phán "0 / sạch" mà không dán LỆNH vừa chạy** — claim số phải tái-lập được (bài S152: khai "U+FFFD 0" trong khi grep thật ra 2 hit lành ⇒ số sai dù kết-luận lành). +3. **NEVER đọc vắng-mặt thành ổn** — git mù thư-mục rỗng (S122); mtime-chain/byte-size là chứng, lời khai không; folder IN-PROGRESS không flag orphan nhưng phải ghi nhận. +4. **NEVER tự APPEND diary/memory hay tự phán Fidelity "bịa"** — propose-only, em main VERIFY→APPEND (B3); nghi bịa → escalate `reviewer`. +5. **NEVER lấn tooling/skill/plugin/docs-freshness** — đó là `tooling-auditor` (H1); H1⟂H2 tách chủ-đích ("hay quên+nhầm khi gộp"), overlap = 0. diff --git a/.claude/agents/office-document.md b/.claude/agents/office-document.md index efcd2f6..5879a9c 100644 --- a/.claude/agents/office-document.md +++ b/.claude/agents/office-document.md @@ -58,3 +58,11 @@ maxTurns: 30 - Mọi claim về nội dung file = từ đọc file THẬT (skill/python đọc ngược), KHÔNG narrative trí nhớ. - OD6 boundary-code = PHÂN-VAI convention, KHÔNG "read-only enforced" (agent giữ Bash/Write — containment = em main single-writer + git-diff). - Nấc hiện tại: **verified-runtime (S107 cùng-phiên)** — spawn-test chạy OD1/OD4/OD5/OD7/OD9 trên template thật (`wwwroot/templates/` FO-002.05 + FO-002.07) + round-trip write. OD2/OD3/OD6/OD8/OD10 = in-file floor, exercised per-task khi phát sinh (mirror nấc database-agent S53). + +## 🚫 Anti-patterns (NEVER) — B3 @S152 (owner "thêm vào luôn"; distill từ floor OD1–OD10 + lịch-sử vai, KHÔNG rắc từ-khoá) + +1. **NEVER bịa/suy-đoán khi extract** — cell/paragraph không rõ = ghi "KHÔNG RÕ" + hỏi lại; số tổng phải cross-check bằng công-thức độc-lập (OD4; bài S107: khai đúng "template 0 placeholder, mẫu blank" thay vì bịa mapping). +2. **NEVER ghi đè file gốc anh gửi** — output = file MỚI (`_extracted`/`_v2`/scratchpad); bản gốc là chứng đối-chiếu (OD7; S107 verify mtime gốc unchanged). +3. **NEVER return mà chưa round-trip đọc ngược** — file 0-byte/corrupt/thiếu sheet phải tự bắt TRƯỚC khi trả; báo số đo page/sheet/row làm evidence (OD5). +4. **NEVER đụng code-tree** `src/Backend/**` · `fe-admin/**` · `fe-user/**` · `tests/**` — C# render-engine = `implementer-backend`; cần đổi code → PROPOSE spec/mapping-table (OD6, pattern extract→spec→Dev-proof S55). +5. **NEVER tự chế pipeline khi skill Office phù-hợp tồn-tại** — invoke `docx`/`xlsx`/`pptx`/`pdf`/`form-engine` TRƯỚC (OD1); tự suy luận lại cái skill đã dạy = sai floor. diff --git a/.claude/agents/reviewer.md b/.claude/agents/reviewer.md index 858411c..3a688d0 100644 --- a/.claude/agents/reviewer.md +++ b/.claude/agents/reviewer.md @@ -22,7 +22,7 @@ You are an **adversarial reviewer**. Assume the implementation has bugs — your - **Tier:** READ only adversarial (Cognition Devin Review pattern verified + Anthropic Code Review) - **Tools:** Read, Grep, Glob, Bash (git diff + curl + sqlcmd read queries only) -- **NEVER:** Edit, Write, commit, push +- **NEVER:** tự sửa code-tree (Edit/Write vào src·fe-*·tests), tự commit, tự push — verdict-only, fix thuộc em-main/implementer *(reword @S152 R1: câu cũ "Edit, Write, commit, push" toàn stop-list-verbs ⇒ MFE bất-khả-match by-construction — sửa THƯỚC-HỎNG cho đo được, nghĩa GIỮ NGUYÊN; ngoại lệ hợp lệ giữ: sub-file run-folder + diary-self AS-10) - **Role:** Em main's adversarial pre-commit gate. Independent verification. ## Workflow per spawn diff --git a/.claude/agents/ring1-audit.md b/.claude/agents/ring1-audit.md index 470f0e7..c258f9e 100644 --- a/.claude/agents/ring1-audit.md +++ b/.claude/agents/ring1-audit.md @@ -21,7 +21,7 @@ Mày là **cặp mắt độc-lập** trên số của `tooling-auditor` (H1) + ## Vì sao AUTO + fire khi nào -- Owner S145: **AUTO sau đo, KHÔNG consent-gate** (khác trio §2.1.9 + H24 §2.1.8 — 2 cái đó gật mới chạy). H1+H2 chốt @session-end ⇒ mày tự chạy ngay sau. +- Owner S145: **AUTO sau đo, KHÔNG consent-gate.** H1+H2 chốt @session-end ⇒ mày tự chạy ngay sau. *(mệnh-đề so-sánh "khác trio/H24 gật-mới-chạy" GỠ @S152 — owner "vòng 1→5 auto"; ring1-close tự bắt trong persona chính mình, tái-phát lớp error-ledger:101)* - 🔴 **KIỂM end-only: @open chỉ có diff-report, artifact authoritative (chốt/harvest/distill) ở close.** (D2 = COMMIT DEFER, owner-option (b) S145 · landing + lý-do đầy-đủ ở `.claude/commands/session-end.md` §L.b(g-bis)(vi) — B1, KHÔNG chép lý-do vào đây.) Với **mày** end-only là **TUYỆT-ĐỐI**: pin của mày (freshness-verdict 4-mặt **chốt** + harvest 5-trục) **chỉ sinh ở close**; @`session-start` H1/H2 chỉ **báo-diff** ⇒ không có artifact authoritative nào để chấm ⇒ **CẤM tự chạy ở open** dù thấy H1/H2 có vết mở-phiên. - 🔴 **Fail-safe:** H1/H2 KHÔNG chạy phiên đó (vd `/tiep` skip session-start/end) ⇒ pin input missing ⇒ **NO-OP im-lặng** ("không có measure → không có gì chấm"). **Auto ≠ chạy-mù.** CẤM bịa verdict ĐẠT khi không có input. - **Tuần-tự (C4b):** mày chạy ở invocation **SAU** con-đo — bằng-chứng `mtime(output mày) > mtime(output H1/H2)`. KHÔNG chạy song song với H1/H2 (chấm bản chưa-xong = vô-nghĩa). diff --git a/.claude/agents/ring4-audit.md b/.claude/agents/ring4-audit.md index 0f35ce4..34e2d30 100644 --- a/.claude/agents/ring4-audit.md +++ b/.claude/agents/ring4-audit.md @@ -23,8 +23,8 @@ Mày là **cặp mắt độc-lập** trên OUTPUT của `/sleep-recovery-memory - Owner S145: **AUTO sau đo, KHÔNG consent-gate.** `/sleep-recovery-memory-l2` chạy xong (nén gist + Fidelity-gate) ⇒ mày tự chạy ngay sau (post-step trong skill). - 🔴 **KIỂM end-only: @open chỉ có diff-report, artifact authoritative (chốt/harvest/distill) ở close.** (D2 = COMMIT DEFER, owner-option (b) S145 · landing + lý-do đầy-đủ ở `.claude/commands/session-end.md` §L.b(g-bis)(vi) — B1.) Nghĩa **hẹp**: KHÔNG mở **nhịp KIỂM RIÊNG** ở `session-start`. -- 🔗 **NGOẠI-LỆ CÓ CHỦ-ĐÍCH — mày bám *lượt nén* wherever it fires (cùng khuôn `ring2-audit`):** nén được consent @`session-start §2.1.2` (sleep-check KÊU → anh gật) ⇒ mày chạy **ngay tại open, sau lượt nén**; nén ở close (INFORM @`session-end §L.b(c)`) ⇒ mày chạy ở close. Lý-do: pin của mày = **`.gist.md` tươi**, authoritative **ngay khi nén xong**. ⇒ mày **đi theo lượt nén**, mày **không** mở nhịp riêng. -- 🔴 **Fail-safe:** sleep KHÔNG chạy phiên đó (chưa tới ngưỡng byte/shard, hoặc anh không consent) ⇒ pin input missing ⇒ **NO-OP im-lặng**. **Auto ≠ chạy-mù.** CẤM bịa verdict khi không có gist tươi để chấm. +- 🔗 **NGOẠI-LỆ CÓ CHỦ-ĐÍCH — mày bám *lượt nén* wherever it fires (cùng khuôn `ring2-audit`):** nén **AUTO-khi-KÊU** @`session-start §2.1.2` (owner @S152 "vòng 1→5 auto" — 🧊 consent-gate cũ retired) ⇒ mày chạy **ngay tại open, sau lượt nén**; nén ở close (AUTO @`session-end §L.b(c)`) ⇒ mày chạy ở close. Lý-do: pin của mày = **`.gist.md` tươi**, authoritative **ngay khi nén xong**. ⇒ mày **đi theo lượt nén**, mày **không** mở nhịp riêng. +- 🔴 **Fail-safe:** sleep KHÔNG chạy phiên đó (chưa tới ngưỡng byte/shard, hoặc lỗi instrument — 🧊 nhánh "anh không consent" retired @S152) ⇒ pin input missing ⇒ **NO-OP im-lặng**. **Auto ≠ chạy-mù.** CẤM bịa verdict khi không có gist tươi để chấm. - **Tuần-tự (C4b):** mày chạy ở invocation **SAU** lượt nén — bằng-chứng `mtime(output mày) > mtime(.gist.md mới)`. KHÔNG song song. ## CONTRACT — 4 nghĩa-vụ (thứ-tự bắt buộc) diff --git a/.claude/agents/tooling-auditor.md b/.claude/agents/tooling-auditor.md index 9c481b4..7e9d182 100644 --- a/.claude/agents/tooling-auditor.md +++ b/.claude/agents/tooling-auditor.md @@ -56,3 +56,11 @@ Audit 4-mặt freshness tooling/docs SOLUTION_ERP → @session-start báo state+ - 🔴 **G-015 KHÔNG overclaim:** sub này = propose-only. `store_memory` đã strip (tool RAG-write không-gọi-được) NHƯNG vẫn giữ `Bash` = write-channel mở → **KHÔNG "read-only enforced"**. Containment thật = em main single-writer + git-diff post-session (defense-in-depth), KHÔNG allowlist đơn-độc. - Plugin: báo nấc (installed / enabled / assigned / used) — KHÔNG conflate "enabled" = "đang dùng". - KHÔNG tự ghi memory kênh nào (return delta → em main APPEND B3). + +## 🚫 Anti-patterns (NEVER) — B3 @S152 (owner "thêm vào luôn"; distill từ 4-mặt + lịch-sử vai, KHÔNG rắc từ-khoá) + +1. **NEVER tin số trong doc thay vì đo đĩa** — đếm PHẦN-TỬ rồi so canonical (bẫy glob bắt `README.md` ra thừa-1; bài S143: enumeration liệt TÊN không chứa số ⇒ grep-theo-số 0-hit đọc nhầm thành sạch). +2. **NEVER đưa count mà không khai PHẠM-VI tập-đo** — "10 hit" phải nói 10-trong-bề-mặt-nào (bài ring1 S152: kết-luận đúng nhưng số là 10-trong-8-bề-mặt, không phải repo-wide). +3. **NEVER đề xuất vá dòng cho vừa detector** — viết lại văn-xuôi để flag-count tụt = rời tập-đo Goodhart (bài S152: 15 LOW C2 phán dương-giả có line-level rồi GIỮ NGUYÊN, trừ khi nội-dung chết thật như khối Budget-đã-xoá). +4. **NEVER conflate nấc plugin** — báo đúng installed → enabled → assigned → used, không đọc "enabled" thành "đang dùng". +5. **NEVER lấn harvest-memory/spawn-record** — đó là `harvest-curator` (H2); H1⟂H2 tách chủ-đích, overlap = 0. Tự sửa file/enable plugin = vi-phạm propose-only. diff --git a/.claude/auto-memory/MEMORY.md b/.claude/auto-memory/MEMORY.md index 4e85cf3..51c1455 100644 --- a/.claude/auto-memory/MEMORY.md +++ b/.claude/auto-memory/MEMORY.md @@ -31,7 +31,7 @@ - [Prod config: inspect-before-change](feedback_prod_config_inspect_before_change.md) — đổi config prod = inspect LIVE trước (runbook STALE); backup→apply→verify-LIVE→commit; replicate mọi rule cũ + delta (S88) - [Wipe durability — check re-seed](feedback_wipe_durability_check_reseed.md) — sau prod-wipe audit seeder: ungated per-code seed RE-ADD mỗi restart; gate sau env-flag + verify-by-restart-THẬT (S91, #75/#76) - [Verify deployed artifact byte-level](feedback_verify_deployed_artifact_byte_level.md) — UAT "fix chưa ăn" sau deploy → curl-grep bundle prod byte-level (cache≠deploy); incognito=golden-test (S96, #77) -- [Agent return-garble recover](feedback_agent_return_garble_recover.md) — sub trả wrong-slice-of-transcript thay verdict (#53, **×50 qua S151 — derive-from-body** [qua-S148 33 · S149 ×5 · S150 ×7/7 · **S151 ×5/6 wave-bookend, chết đúng write-boundary; trio return-only 3/3 CLEAN** — skeleton-rỗng 2-strike → AS-17]; S143 ×5 5/5-sub; +path-4 lead-on-behalf; **+sub-class S150 `ngược-#53`/`skeleton-ruột-rỗng` ⇒ ghi-đĩa-trong-lúc-làm = CẦN KHÔNG ĐỦ — verify byte-content**) → recover: **(0) WRITE-lane→disk-truth (git+build+test) · VERIFY-lane→em-main-re-curl+sqlcmd (2-nguồn-khớp)** → (1) diary → (2) SendMessage-resume in-session → (3) em-main solo; garble ∝ reasoning-lane; **WRITE-lane garble≠mất-code** (S114 ×5); cicd tái-phạm dai + tự-dán "CLEAN-return" sai (harvest-curator bắt S118) +- [Agent return-garble recover](feedback_agent_return_garble_recover.md) — sub trả wrong-slice-of-transcript thay verdict (#53, **×60-cận-dưới qua S152 — derive-from-body, đếm-cái-chắc** [qua-S148 33 · S149 ×5 · S150 ×7/7 · S151 ×5/6 write-boundary · **S152 ×10 (7 @open + 3-chắc @close, 2 UNKNOWN-sau-compact không đếm; ring2-STRICT + trio = 4 CLEAN cùng phiên; MỚI: pin-bản-cắt 4-A — file ghi-từng-finding LUÔN hợp-lệ giữa chừng, lead pin 16.911B/30.195B mất 3 FLAG → đề END+TOTAL-line chờ owner; commit-subject `1b85713` "53"=SAI errata)** — skeleton-rỗng 2-strike → AS-17; `ngược-#53` ×3 lifetime]; S143 ×5 5/5-sub; +path-4 lead-on-behalf; **+sub-class S150 `ngược-#53`/`skeleton-ruột-rỗng` ⇒ ghi-đĩa-trong-lúc-làm = CẦN KHÔNG ĐỦ — verify byte-content**) → recover: **(0) WRITE-lane→disk-truth (git+build+test) · VERIFY-lane→em-main-re-curl+sqlcmd (2-nguồn-khớp)** → (1) diary → (2) SendMessage-resume in-session → (3) em-main solo; garble ∝ reasoning-lane; **WRITE-lane garble≠mất-code** (S114 ×5); cicd tái-phạm dai + tự-dán "CLEAN-return" sai (harvest-curator bắt S118) - [H18 ghost-wire + stamp-integrity](feedback_h18_ghostwire_stamp_integrity.md) — hash-verify TRƯỚC khi áp broadcast (bắt stamp-then-edit THẬT → HELD + re-stamp); ghost-wire 2 class (cron-claim CronList=0 · config-key defined-but-unread); KHÔNG stamp run-id chưa chạy (S100) - [Resume premise re-verify](feedback_resume_premise_reverify.md) — re-verify tiền-đề từ ĐĨA trước execute (header+git-date, match NỘI-DUNG KHÔNG tên-file 1:1); **S121: bảng-kế-hoạch ≠ đĩa — "không-ai-được-giao" ≠ "chưa-làm"; khẳng-định trạng-thái-đĩa = phải chạm đĩa 1 lệnh**; +bẫy `grep -c` (dòng) vs `-o|wc -l` (occurrence) trên mega-line; +bẫy Get-Content-no-Encoding no-BOM = ANSI đếm ×2-3 → báo-số-sai-owner, đính-chính-ngay (S130 E-010/AS-14); +acceptance literal tự-lão-hoá (S109/S121) - [Permission grant = 2 layers](feedback_permission_grant_two_layers.md) — cấp/verify quyền = display-layer (menu CanRead) ⟂ API-authz-layer (controller `[Authorize(Policy)]`) 2 tầng ĐỘC-LẬP; grep authz controller đích TRƯỚC khi tin grant (menu-ẩn ≠ API-đóng; `[Authorize]` trần = lỗ hổng); reviewer-adversarial bắt, em-main-solo sót (S118, #82) diff --git a/.claude/auto-memory/feedback_agent_return_garble_recover.md b/.claude/auto-memory/feedback_agent_return_garble_recover.md index a59dca8..4b010a4 100644 --- a/.claude/auto-memory/feedback_agent_return_garble_recover.md +++ b/.claude/auto-memory/feedback_agent_return_garble_recover.md @@ -5,7 +5,7 @@ metadata: node_type: memory type: feedback originSessionId: 67157d21-1ead-475d-9a50-cf7f07468583 - modified: 2026-07-25T12:26:19.898Z + modified: 2026-07-25T18:50:28.119Z --- Sub-agent đôi khi trả về message CUỐI = text bước memory-curation của nó ("Still 18KB, let me trim...", "Memory updated, splice correct...") THAY VÌ verdict/findings của task (#53 return-channel garble). Nhưng WORK + agent-memory diary VẪN ĐÚNG (nó làm task xong, ghi diary chuẩn, chỉ return nhầm text bước cuối). **Recover: đọc `agent-memory//MEMORY.md` recent-entry lấy verdict thật — KHÔNG re-spawn** (tốn + có thể garble tiếp; hoặc em-main re-do solo cho task cần chắc). Instruction-fix spawn-prompt "🔴 message CUỐI PHẢI là verdict, KHÔNG phải memory-note" GIẢM garble nhưng KHÔNG 100%. @@ -21,4 +21,8 @@ Sub-agent đôi khi trả về message CUỐI = text bước memory-curation c 🔴 **TALLY CHỐT @S151 closeout (2026-07-25) — derive-from-body:** 45 (qua S150) **+ 5 S151 = 50**. S151 ×5 first-return garble, TẤT CẢ ở wave bookend @open + KIỂM (lead-stale · lead-gap · ring2 · tooling-H1 · ring1 — 100% reasoning-lane; H2 harvest CLEAN 1/6). Chữ ký đồng nhất: **cả 5 chết đúng write-boundary** ("làm xong → bắt đầu ghi/return" — ring2 "Writing the full audit to disk now" rồi tắt; ring1 "All verification done. Writing…" rồi tắt). Recover: resume-in-session **5/5 SẠCH** (path-2 sub-lẻ giữ form S147 3/3 → nay 8/8 lifetime). 🔴 **Sub-class `skeleton-ruột-rỗng` TÁI-HIỆN = 2-STRIKE MET** (S150 gate wf_f4e4c006 → S151 ×2 THUẦN: sub-lead-stale 12-dòng header-only + sub-lead-gap checklist-`[ ]`-only lúc chết, dù prompt ép ghi-đĩa NGAY từ đầu) → **error-ledger row AS-17 + guard promote @S151** (verify BYTE-CONTENT tăng thật trong wave, phân biệt skeleton vs đang-viết-dở phải ĐỌC RUỘT — H2 m#19: size nhỏ = nghi-vấn không phải bằng-chứng). 🔴 **Counter-correlation MỚI (S151):** trio harness-{eval,refine,audit} **3/3 CLEAN** cùng phiên — cả 3 là return-only contract KHÔNG ghi đĩa giữa chừng (eval 21 tool-use vẫn clean) ⇒ garble KHÔNG tương quan "có ghi đĩa hay không", vẫn đúng correlation reasoning-lane S103 nhưng thêm chiều: **return-only + thân-return-CÓ-CẤU-TRÚC-định-sẵn (khuôn VERDICT dòng-1 + section cứng) sống sót tốt hơn return tự-do sau khi ghi files**. n=3 chưa đủ kết luận — theo dõi. +🔴 **ERRATA nguồn-ngoài @S152:** commit-subject `1b85713` (S151-closeout) ghi tally "**53**" = **SAI** — số đúng @S151 là **50** (derive-from-body; ring2 M-1 @S152 bắt bằng phép cộng độc-lập 33+5+7+5 trên 4 bề-mặt). Commit-subject bất-biến sau push ⇒ errata ghi ở đây thay sửa; mọi trích-dẫn lấy số từ SỔ NÀY, không từ subject. + +🔴 **TALLY CHỐT @S152 closeout (2026-07-26) — derive-from-body, đếm CÁI-CHẮC:** 50 (qua S151) **+ 10 S152 = 60 (cận dưới)**. S152 events: **@open 7** = 6/6 first-return wave bookend (lead-stale · lead-gap · tooling · harvest · ring2 · ring1 — 100% reasoning-lane, ghi tại `bookend-synthesis.md` cùng phiên) + ring2-resume vẫn mô-tả-ý-định; **@close 3-CHẮC** = stale-close completion-slice + gap-close first-return-mid-work + ring1-close return-slice. **KHÔNG đếm (khai thẳng):** harvest-close + tooling-close hoàn thành TRƯỚC compaction lead — nhãn return không còn khôi phục được ⇒ UNKNOWN, không bịa (file đĩa 20.411B/26.451B đủ, 0 mất). **CLEAN counter-datum:** trio 3/3 + **ring2-close khuôn STRICT-4-dòng** — 4 lượt return-only/khuôn-cứng CLEAN trong chính phiên 10-garble ⇒ củng cố chiều S151: **thân-return-có-cấu-trúc sống sót; return tự-do sau khi ghi file thì không**. **Family (ngoài tally):** `ngược-#53` ×2 cùng phiên (ring1 resume-1 @open chạy-không-ghi · gap-close 0B @close) — sub-class này nay 3 events lifetime (S150 + S152 ×2), đã có AS-17 guard; countermeasure hiệu-lực = lệnh resume "**đổ-ruột-TRƯỚC-làm-tiếp**" (2/2 lần cứu trọn). **Mới @S152 (ring2 4-A):** kỷ-luật ghi-đĩa-từng-finding có TÁC-DỤNG-PHỤ — file luôn hợp-lệ giữa chừng ⇒ lead PIN bản-cắt 16.911B/30.195B mà không thấy dấu cụt ⇒ 3 FLAG ngoài tầm quyết-định (tally thoát nhờ may) ⇒ đề-xuất dòng chốt `` + lead chỉ nhận pin khi grep-count == TOTAL (chờ owner). + **How to apply:** sub return text lạ (memory-curation/off-topic) → ĐỪNG tin nó fail/vô-dụng; đọc diary lấy kết-quả. Task-cần-chắc (bug-reasoning) → em-main re-do solo (reliable). Liên [[feedback_agent_kill_recovery]] · [[feedback_workflow_fanout_reliability]]. diff --git a/.claude/auto-memory/project_harness4_two_tier_model.md b/.claude/auto-memory/project_harness4_two_tier_model.md index df92089..838ad35 100644 --- a/.claude/auto-memory/project_harness4_two_tier_model.md +++ b/.claude/auto-memory/project_harness4_two_tier_model.md @@ -5,6 +5,7 @@ metadata: node_type: memory type: project originSessionId: 9ea74cdf-642a-4c4e-9ddc-04a23413a86a + modified: 2026-07-25T18:39:23.400Z --- **Model-tier hiện-hành (S124, 2026-07-15 owner-decision) = WORKER-TIER-PIN:** @@ -26,4 +27,4 @@ metadata: Liên quan: [[feedback-harness-123-adoption]] · [[feedback-high-to-max-multiagent-quality]] · [[feedback-workflow-fanout-reliability]] -**🔄 VALUE-update @S151 (2026-07-25):** idiom "lead = owner-choice per-session {Fable|Opus 4.8}" (MTv3 S110→S124) **THÔI DÙNG** theo thư hub `59ce1d0f` @S149 — **default MỌI vị trí kể cả lead = Opus 5 MAX**; model cao hơn = anh `/model` đầu phiên hoặc per-invocation `/fable-real` (quyền tuyệt đối, 0 caveat). CẤU TRÚC giữ (worker-tier-pin S124 · outage-reflex H5 · engine-đắt H21). Sweep 8 site idiom @S151 (stale-deep FLAG-4): hmw.js:68 · agents/README ×3 · ultra-on · fable-real · fable-clone · file này. +**🔄 VALUE-update @S151 (2026-07-25):** idiom "lead = owner-choice per-session {Fable|Opus 4.8}" (MTv3 S110→S124) **THÔI DÙNG** theo thư hub `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`) — **default MỌI vị trí kể cả lead = Opus 5 MAX**; model cao hơn = anh `/model` đầu phiên hoặc per-invocation `/fable-real` (quyền tuyệt đối, 0 caveat). CẤU TRÚC giữ (worker-tier-pin S124 · outage-reflex H5 · engine-đắt H21). Sweep 8 site idiom @S151 (stale-deep FLAG-4): hmw.js:68 · agents/README ×3 · ultra-on · fable-real · fable-clone · file này. diff --git a/.claude/commands/fable-clone.md b/.claude/commands/fable-clone.md index 7945395..f7954f1 100644 --- a/.claude/commands/fable-clone.md +++ b/.claude/commands/fable-clone.md @@ -105,5 +105,5 @@ Control: lane no-tier → `claude-opus-4-8` **DÙ lead=Fable** ⇒ pin ăn runti > ⚠️ **Grep `tier:'opus'` ≥1 hit = ĐIỀU-KIỆN CẦN, KHÔNG ĐỦ** — nó chỉ đo **CHỮ trong file**, không đo runtime ⇒ **Goodhart-able 100%**. ## 🔴 Floor model-tier v3 + lead-discipline -- **Lead = DEFAULT Opus 5 MAX** (thư `59ce1d0f` @S149; cao hơn = anh `/model` hoặc `/fable-real` — 🧊 idiom owner-choice-per-session superseded-VALUE); **CẤM Sonnet/Haiku-class ghế lead**. Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất. +- **Lead = DEFAULT Opus 5 MAX** (thư `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`); cao hơn = anh `/model` hoặc `/fable-real` — 🧊 idiom owner-choice-per-session superseded-VALUE); **CẤM Sonnet/Haiku-class ghế lead**. Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất. - ⚠️ **Lead KHÔNG tự ý gọi engine-đắt** — **kể cả khi HMW-mode ON**; chỉ chạy khi anh gõ lệnh. diff --git a/.claude/commands/fable-real.md b/.claude/commands/fable-real.md index 78136f1..f0fbffe 100644 --- a/.claude/commands/fable-real.md +++ b/.claude/commands/fable-real.md @@ -33,7 +33,7 @@ Mỗi lần chạy engine-đắt PHẢI kết-tinh 1 spec theo pipeline **propos - 🔒 **Honest-note (d):** run **chấm/verify CŨNG sinh spec-file** (kế-hoạch xử issue = "cách làm" cần kết-tinh). ## 🔴 Floor model-tier v3 (broadcast 2026-07-11) -- **Lead = DEFAULT Opus 5 MAX** (thư `59ce1d0f` @S149; model cao hơn = anh `/model` đầu phiên hoặc chính lệnh này — 🧊 idiom "frontier-class do ANH chọn per-session" superseded-VALUE, cấu trúc giữ). **CẤM lớp model thấp (Sonnet/Haiku-class) ngồi ghế lead.** +- **Lead = DEFAULT Opus 5 MAX** (thư `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`); model cao hơn = anh `/model` đầu phiên hoặc chính lệnh này — 🧊 idiom "frontier-class do ANH chọn per-session" superseded-VALUE, cấu trúc giữ). **CẤM lớp model thấp (Sonnet/Haiku-class) ngồi ghế lead.** - **Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất**, chỉ trong lượt lệnh anh gõ. Ngoài lệnh, mọi vai giữ model roster mặc-định (**worker-tier-pin S124** — role-có-frontmatter `model: opus` + `effort: max`, role-less inherit lead; supersede H8 all-inherit; số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents, B1 KHÔNG chép số ở đây). - ⚠️ **Lead KHÔNG tự ý gọi engine-đắt** — **kể cả khi HMW-mode ON**. Engine-đắt chỉ chạy khi anh gõ `/fable-real|/fable-clone <đề-bài>`. diff --git a/.claude/commands/session-end.md b/.claude/commands/session-end.md index 11b0e21..e9de97f 100644 --- a/.claude/commands/session-end.md +++ b/.claude/commands/session-end.md @@ -47,7 +47,7 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph - 🔶 **lead-gap-auditor** (monitor **H24**) — cái BỊ THIẾU trong cái LEAD surface (chạy theo NHỊP §L.b(j), KHÔNG mỗi phiên) - 🔬 **ring1-audit** (monitor **KIỂM-vòng**, C4 S145) — verify OUTPUT H1+H2 vòng tooling/harvest (AUTO sau đo §L.b(g-bis)) · vai #1/3 round-KIỂM - 🔬 **ring2-audit** (monitor **KIỂM-vòng**, C4 S145) — verify OUTPUT lead-stale+lead-gap vòng soi-lead (AUTO sau cặp H24 — @§L.b(j)(ii-bis) nếu cặp nổ ở close, @[`session-start`](session-start.md) §2.1.8 nếu cặp nổ ở open; *wherever it fires*) · vai #2/3 - - 🔬 **ring4-audit** (monitor **KIỂM-vòng**, C4 S145) — verify OUTPUT /sleep-recovery gist+Fidelity vòng nén-ngủ (AUTO sau **mỗi lượt nén** `/sleep-recovery-memory-l2` — post-step của skill, *wherever it fires*: consent @[`session-start`](session-start.md) §2.1.2 HOẶC @§L.b(c) dưới) · vai #3/3 + - 🔬 **ring4-audit** (monitor **KIỂM-vòng**, C4 S145) — verify OUTPUT /sleep-recovery gist+Fidelity vòng nén-ngủ (AUTO sau **mỗi lượt nén** `/sleep-recovery-memory-l2` — post-step của skill, *wherever it fires*: AUTO-khi-KÊU @[`session-start`](session-start.md) §2.1.2 HOẶC @§L.b(c) dưới — owner @S152 "vòng 1→5 auto", 🧊 consent retired) · vai #3/3 > 🧊 **Vá con-trỏ chết @S146:** bản trước trỏ *"Phase 4.5"* — heading đó **KHÔNG tồn-tại** trong file này (chỉ có Phase 1 · 1.5 · 2 · 3 · 4 · 5 · 6). Trigger THẬT = lượt nén, không phải một phase cố-định. 2. Synthesize cross-agent learnings → integrate vào: @@ -65,7 +65,7 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph > 🔸 *Nhãn cũ ghi "8-step" trong khi thân đã có (a)→(i) = 9 — `view-stale-count` điển-hình, vá @S122 khi thêm (j). Từ nay **KHÔNG chép số** vào nhãn: đếm từ thân (B1).* - **(a) summary-index** += 1 dòng/session vào `STATUS.md` Recently Done (pointer, KHÔNG full-log). - **(b) Active-Guards** (error-ledger): promote guard **2-strike** (episodic→procedural) · mark `verified` nếu held qua session · retire theo **net-effect** (hại>lợi → gỡ). -- **(c) chore-flag:** 🔒 **Đóng-băng bề-mặt-đo (C1 — 2 câu, S138):** "Từ lúc chạy script đo đầu-tiên của khối (c) tới verdict cuối: KHÔNG ghi vào **bề-mặt-đo** = `.claude/agent-memory/**` + `.claude/governance/{.session-counter.json, ACTIVE-MARKS.md}` + `docs/{STATUS,HANDOFF,gotchas}.md` + `docs/governance/error-ledger.md` + `docs/changelog/migration-todos.md` + `.claude/agents/*.md` + `runs/*/run.md`; việc ghi phát sinh giữa chừng → xếp hàng SAU verdict. Ngoại-lệ: `.claude/WAL.md` (ngoài vùng đọc cả 5 script đo) + state-write của chính bộ-đo (`.mfe-state.json`)." · agent L1 >~30KB → archive L2 · error-ledger open-entry quá ngưỡng · **0-byte memory check (AS-8)** · **🌙 sleep-check (Harness-10b, S72):** `last_sleep_at` null hoặc ≥7d (`memory-budget.json`) → INFORM gợi-ý `/sleep-recovery-memory-l2` (KHÔNG auto-run) **+ byte-display (Item 8/M-10 S135):** khi INFORM fire → in kèm **tổng byte `agent-memory/*/archive/.md` CHƯA có `.gist.md`** (match PREFIX kỳ, đo TƯƠI `(Get-Item).Length` — 🔴 CẤM `Get-Content`-đếm, bẫy encoding E-010; baseline 17-07 kỳ `2026-07` ≈183KB/5 file [ví-dụ-lịch-sử — kỳ 2026-07 đã gist @S140→chưa-gist ~0]) → anh đặt ngưỡng byte sau, 🔴 **KHÔNG bịa số** (giữ INFORM 7-ngày — DP-5 quyền owner cục-bộ) · **🗜️ Harness-11 A/D2 (S75):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/memory-archive-gate.ps1` (DRY-RUN) → đề-xuất dồn-archive sub over-cap (A4 hysteresis 0.85 + A5 keep-floor 5 + A6 2-strike) + A7 NO-API L1-eval (pointer-resolve + byte-0-loss). Engine → [`docs/governance/harness-11-engine.md`](../../docs/governance/harness-11-engine.md). DRY-RUN báo kế-hoạch; MOVE thật do em-main (D5 AUTO semantic-null sau khi xem). · **📊 Hot-feed %-print CUỐI phiên (Harness-15-v2 §G.4, S82):** in composition Tầng-1 theo **%/4-bucket** SAU khi đã nạp/tăng trong phiên + **Headroom còn-trống** so cap role (`token_governor.tier1_hotfeed_tokens`). Đối-xứng `session-start §2.1.6` (đầu phiên). Mục-đích: anh thấy Tầng-1 phình/teo ra sao + còn trống bao nhiêu → quyết chỉnh cap. 🔴 con-số = quyền anh (chủ-dự-án); em-main chỉ báo-%, KHÔNG tự-chỉnh. · **📊 Bảng-số ngân-sách + run-loop 2-tầng (M.B/M.C — Harness-20 adap S103, [`engine §M`](../../docs/governance/harness-11-engine.md)):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/crystallized-backfill.ps1` → in BẢNG số THẬT (cap/hotload-bytes/tok-RANGE/headroom/target/backfill, live 0-hardcode) cạnh %-print. **Tầng-1 ĐO** (deterministic scripts) mỗi end = khối-số tươi (chống "khai-chạy-mà-không-chạy"); **Tầng-2 TINH-CHỈNH on-signal** (gap-mới/drift-vs-last/orphan-TĂNG/coverage-tụt → **cảnh-báo ĐỎ** + refine-in-session HOẶC carry-hi-prio nếu đứt-phiên) — KHÔNG nuốt tín-hiệu; weekly full-refine backstop. backfill default 0=OFF (owner). 🟡 M.C largely-already-met (H17-loop + %-print đã có ở dưới), khối-số = formalize. · **🧪 MFE retention opt-in (Harness-16 §H):** lệnh kèm `eval` → chạy `scripts/mfe-eval.ps1` cuối-phiên (retention; chênh vs baseline §2.1.6 = rot trong-phiên) → quyết-định 2-ca: **thiếu-chỗ→TĂNG budget** (anh quyết) / **rot→SẮP-XẾP-LẠI** (ưu-tiên-giá-trị). READS budget, KHÔNG ghi/auto-tune. · **🔁 H17 loop-REFINE (§I, S95 — [`harness-11-engine.md §I`](../../docs/governance/harness-11-engine.md)):** lệnh kèm `eval` → chạy thêm `scripts/memory-selfimprove-audit.ps1` (spec-audit CRITERIA+GAP) → áp bảng B1 **tín-hiệu→hành-động**: floor-rot→**reinject-verbatim** (ghi [`reinject-ledger.md`](../governance/reinject-ledger.md) CG-1 ≤1/N=3; đo-lại vẫn thiếu→**escalate anh** KHÔNG tự-reinject-lần-2) · repeat≥2→promote · old+valueless→archive-gate · raw→distill (`/sleep-recovery-memory-l2`). Phân-loại B3 (build-gap vs floor-rot) TRƯỚC reinject. em-main single-writer D9; loop CHỈ đề-xuất (D6). Light→skip. +- **(c) chore-flag:** 🔒 **Đóng-băng bề-mặt-đo (C1 — 2 câu, S138):** "Từ lúc chạy script đo đầu-tiên của khối (c) tới verdict cuối: KHÔNG ghi vào **bề-mặt-đo** = `.claude/agent-memory/**` + `.claude/governance/{.session-counter.json, ACTIVE-MARKS.md}` + `docs/{STATUS,HANDOFF,gotchas}.md` + `docs/governance/error-ledger.md` + `docs/changelog/migration-todos.md` + `.claude/agents/*.md` + `runs/*/run.md`; việc ghi phát sinh giữa chừng → xếp hàng SAU verdict. Ngoại-lệ: `.claude/WAL.md` (ngoài vùng đọc cả 5 script đo) + state-write của chính bộ-đo (`.mfe-state.json`)." · agent L1 >~30KB → archive L2 · error-ledger open-entry quá ngưỡng · **0-byte memory check (AS-8)** · **🌙 sleep-check (Harness-10b, S72):** trigger chuẩn = shard-count @S144 (`distill-shard-probe.ps1`; vế 7d/`last_sleep_at` = ghi-chú phụ) → KÊU ⇒ **🔄 AUTO chạy** `/sleep-recovery-memory-l2` (owner @S152 "vòng 1→5 auto" — 🧊 INFORM-consent superseded; vết M4: in dòng + WAL nếu skip) **+ byte-display (Item 8/M-10 S135):** khi INFORM fire → in kèm **tổng byte `agent-memory/*/archive/.md` CHƯA có `.gist.md`** (match PREFIX kỳ, đo TƯƠI `(Get-Item).Length` — 🔴 CẤM `Get-Content`-đếm, bẫy encoding E-010; baseline 17-07 kỳ `2026-07` ≈183KB/5 file [ví-dụ-lịch-sử — kỳ 2026-07 đã gist @S140→chưa-gist ~0]) → anh đặt ngưỡng byte sau, 🔴 **KHÔNG bịa số** (giữ INFORM 7-ngày — DP-5 quyền owner cục-bộ) · **🗜️ Harness-11 A/D2 (S75):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/memory-archive-gate.ps1` (DRY-RUN) → đề-xuất dồn-archive sub over-cap (A4 hysteresis 0.85 + A5 keep-floor 5 + A6 2-strike) + A7 NO-API L1-eval (pointer-resolve + byte-0-loss). Engine → [`docs/governance/harness-11-engine.md`](../../docs/governance/harness-11-engine.md). DRY-RUN báo kế-hoạch; MOVE thật do em-main (D5 AUTO semantic-null sau khi xem). · **📊 Hot-feed %-print CUỐI phiên (Harness-15-v2 §G.4, S82):** in composition Tầng-1 theo **%/4-bucket** SAU khi đã nạp/tăng trong phiên + **Headroom còn-trống** so cap role (`token_governor.tier1_hotfeed_tokens`). Đối-xứng `session-start §2.1.6` (đầu phiên). Mục-đích: anh thấy Tầng-1 phình/teo ra sao + còn trống bao nhiêu → quyết chỉnh cap. 🔴 con-số = quyền anh (chủ-dự-án); em-main chỉ báo-%, KHÔNG tự-chỉnh. · **📊 Bảng-số ngân-sách + run-loop 2-tầng (M.B/M.C — Harness-20 adap S103, [`engine §M`](../../docs/governance/harness-11-engine.md)):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/crystallized-backfill.ps1` → in BẢNG số THẬT (cap/hotload-bytes/tok-RANGE/headroom/target/backfill, live 0-hardcode) cạnh %-print. **Tầng-1 ĐO** (deterministic scripts) mỗi end = khối-số tươi (chống "khai-chạy-mà-không-chạy"); **Tầng-2 TINH-CHỈNH on-signal** (gap-mới/drift-vs-last/orphan-TĂNG/coverage-tụt → **cảnh-báo ĐỎ** + refine-in-session HOẶC carry-hi-prio nếu đứt-phiên) — KHÔNG nuốt tín-hiệu; weekly full-refine backstop. backfill default 0=OFF (owner). 🟡 M.C largely-already-met (H17-loop + %-print đã có ở dưới), khối-số = formalize. · **🧪 MFE retention opt-in (Harness-16 §H):** lệnh kèm `eval` → chạy `scripts/mfe-eval.ps1` cuối-phiên (retention; chênh vs baseline §2.1.6 = rot trong-phiên) → quyết-định 2-ca: **thiếu-chỗ→TĂNG budget** (anh quyết) / **rot→SẮP-XẾP-LẠI** (ưu-tiên-giá-trị). READS budget, KHÔNG ghi/auto-tune. · **🔁 H17 loop-REFINE (§I, S95 — [`harness-11-engine.md §I`](../../docs/governance/harness-11-engine.md)):** lệnh kèm `eval` → chạy thêm `scripts/memory-selfimprove-audit.ps1` (spec-audit CRITERIA+GAP) → áp bảng B1 **tín-hiệu→hành-động**: floor-rot→**reinject-verbatim** (ghi [`reinject-ledger.md`](../governance/reinject-ledger.md) CG-1 ≤1/N=3; đo-lại vẫn thiếu→**escalate anh** KHÔNG tự-reinject-lần-2) · repeat≥2→promote · old+valueless→archive-gate · raw→distill (`/sleep-recovery-memory-l2`). Phân-loại B3 (build-gap vs floor-rot) TRƯỚC reinject. em-main single-writer D9; loop CHỈ đề-xuất (D6). Light→skip. - **🧬 memory-triple artifact (Item 3-bis S135 — B2 vòng-3 lên CHỨC-NĂNG; 0 vai mới, 0 script mới):** khi chạy khối (c) memory-maintenance ở trên, ghi **các dòng artifact tuần-tự** (prefix `memory-triple` — đếm từ khối dưới, KHÔNG chép số vào nhãn per B1 dòng-đầu §L.b) vào session-log (`docs/changelog/sessions/`) — run-record: **3-stage** đo→đề-xuất→kiểm **+ do-record** (governance-detectors TOTAL · nhịp-nợ 4-vế, +S138): ``` memory-triple: do= @@ -145,7 +145,7 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph 2. Cột self-verify của V1/V2/V4 trong checklist 5-vòng canonical = **CLOSE-time**: thứ bị chấm (spawn-record 4-field · freshness-verdict 4-mặt · harvest 5-trục · gist+Fidelity) **chỉ SINH ra ở close**. 3. @open output là **diff-report nhẹ**, đã em-main verify tại chỗ ⇒ **KHÔNG có artifact authoritative nào để audit**. Ép KIỂM chạy @open = chấm một bản **chưa tồn-tại** ⇒ đúng cái **ĐẠT-ảo** mà fail-safe NO-OP của cả 3 contract đang cấm. **Đánh-đổi khai thẳng:** sai-sót phát sinh @open chỉ bị soi ở close **cùng phiên** (trễ, KHÔNG mất). 🔁 **Điều-kiện huỷ-defer:** ngày nào @open sinh ra artifact **authoritative** (không còn chỉ diff-report) thì DEFER này **PHẢI** xét lại — defer **có điều-kiện huỷ**, không phải đóng vĩnh-viễn. - 🔗 **H24-coupling — ngoại-lệ CÓ CHỦ-ĐÍCH, khai rõ (KHÔNG mâu-thuẫn "end-only"):** `ring2-audit` **bám cặp H24 *wherever it fires*** — cặp chạy @§L.b(j)(ii) ⇒ nó chạy ở **close**; cặp chạy @[`session-start`](session-start.md) §2.1.8 (OVERDUE ⇒ **AUTO**, KHÔNG còn cửa consent @S146) ⇒ nó chạy **NGAY tại open, ngay sau cặp**. Lý-do: pin của nó = **FLAG-list H24 tươi**, artifact đó **authoritative NGAY khi cặp trả**, không đợi close. `ring4-audit` cùng khuôn (bám **lượt nén** wherever it fires: consent @§2.1.2 hoặc @§L.b(c)). **Chỉ `ring1-audit` end-only TUYỆT-ĐỐI** (pin = H1-chốt + H2-5-trục, chỉ sinh ở close). ⇒ "end-only" nghĩa là **KHÔNG mở nhịp KIỂM RIÊNG @open**; vai vẫn **đi theo con-đo của nó** bất kể con-đo nổ ở đâu. + 🔗 **H24-coupling — ngoại-lệ CÓ CHỦ-ĐÍCH, khai rõ (KHÔNG mâu-thuẫn "end-only"):** `ring2-audit` **bám cặp H24 *wherever it fires*** — cặp chạy @§L.b(j)(ii) ⇒ nó chạy ở **close**; cặp chạy @[`session-start`](session-start.md) §2.1.8 (OVERDUE ⇒ **AUTO**, KHÔNG còn cửa consent @S146) ⇒ nó chạy **NGAY tại open, ngay sau cặp**. Lý-do: pin của nó = **FLAG-list H24 tươi**, artifact đó **authoritative NGAY khi cặp trả**, không đợi close. `ring4-audit` cùng khuôn (bám **lượt nén** wherever it fires: AUTO-khi-KÊU @§2.1.2 hoặc @§L.b(c) — 🧊 vế "consent" retired @S152 owner "vòng 1→5 auto"). **Chỉ `ring1-audit` end-only TUYỆT-ĐỐI** (pin = H1-chốt + H2-5-trục, chỉ sinh ở close). ⇒ "end-only" nghĩa là **KHÔNG mở nhịp KIỂM RIÊNG @open**; vai vẫn **đi theo con-đo của nó** bất kể con-đo nổ ở đâu. - 🔸 **Luật vai-KIỂM cho vòng-đo MỚI (O-3 — OWNER-DELEGATED → lead-decided @S149; K5 land @S150; HOME DUY-NHẤT của luật này):** 【1】 **mặc-định TÁCH** — vòng-đo MỚI sinh ra thì vai-KIỂM riêng của nó land CÙNG đợt (KHÔNG gộp vào con KIỂM có sẵn); tập vòng-thiếu tại S149 = **RỖNG** (3 vòng đầu đã TÁCH @S145, owner-decision [2] — dòng dưới). Anh veto = 1 edit (HANDOFF #25). - 🔸 **Trạng-thái adopt (owner S145 — đo lại đĩa @S146):** **cả 3 vai-KIỂM đã BUILT + WIRED S145** — `ring1-audit` (g-bis) · `ring2-audit` (j)(ii-bis) · `ring4-audit` (post-step lượt nén). Mỗi vai **chạy audit-round khi vòng tương-ứng chạy**, độc-lập, KHÔNG chờ nhau. 🧊 Bản trước xếp `ring2-audit` + `ring4-audit` vào diện **chờ-land về sau** (đợi vai #1 chạy-thử-1-phiên) = **STALE @S146**: mâu-thuẫn chính danh-sách roster Phase 1 (3 dòng 🔬 đã wire AUTO) **và** mâu-thuẫn đĩa (`.claude/agents/{ring1-audit,ring2-audit,ring4-audit}.md` tồn-tại CẢ 3). Số vai roster canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents (B1 — KHÔNG chép số). - **(h) 🔏 User-Mark CHỐT cuối phiên (H-12/13 canonical §P/P7, S79 — `harness-11-engine.md §E`):** đọc [`.claude/governance/ACTIVE-MARKS.md`](../governance/ACTIVE-MARKS.md) → (i) **hiển-thị** status-filtered (Active-High/Active hiện · Medium tóm-tắt · Disable ẩn) cho anh đọc lại (đối-xứng `session-start §2.1.4`); (ii) nếu session này có **quyết-định cấp-governance MỚI** (scope-check P6: đổi CANONICAL §-rule/authority) → chạy `/user-mark-` DACI: adjust-gov → double-check → **report-trước-đóng-dấu 3-7 tiêu-chí khách-quan (P4)** → anh confirm → stamp `RC-pqhuy1987-dd-mm-yyyy-hh-mm-ss`; (iii) supersede/disable mark cũ (P5) → con-trỏ-xuôi + Active-High cần anh-confirm RIÊNG. 🔴 **KHÔNG tự đóng dấu / đổi cấp trước khi báo (P4/P8).** 0 quyết-định-mới → "n-a, chỉ hiển-thị". @@ -178,10 +178,10 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph | V1 tooling + harvest | H1 `tooling-auditor` (g) · H2 `harvest-curator` (d)(f) | `ring1-audit` (g-bis) | path sổ/return H1+H2 phiên này | | V2 soi-lead | cặp H24 (j)(ii) *hoặc* [`session-start`](session-start.md) §2.1.8 | `ring2-audit` (j)(ii-bis) | FLAG-list + class (enum ĐÓNG) | | V3 bộ-ba memory | `harness-eval` → `harness-refine` (k) | `harness-audit` (k) | 3 path `runs//harness-*-return.md` | -| V4 nén-ngủ | `/sleep-recovery-memory-l2` (INFORM @(c) hoặc @§2.1.2) | `ring4-audit` (post-step lượt nén) | path `.gist.md` mới + Fidelity verdict | +| V4 nén-ngủ | `/sleep-recovery-memory-l2` (🔄 AUTO-khi-KÊU @(c) hoặc @§2.1.2 — owner @S152) | `ring4-audit` (post-step lượt nén) | path `.gist.md` mới + Fidelity verdict | | V5 sàn-sự-thật "đã-đo" | measured-label-gate (**floor** — không vai riêng) | — (floor tự-soi ở MỌI verdict) | 1 nhãn `đã-đo` bị chặn / được cho qua trong phiên | -🔴 Vòng **không chạy** phiên này ⇒ ghi **`không-nhịp`** + lý-do (chưa tới cadence · anh không consent · không có input). **KHÔNG** ghi ✓, **KHÔNG** tính TRƯỢT — nhưng cũng **KHÔNG** được im-lặng bỏ khỏi bảng. +🔴 Vòng **không chạy** phiên này ⇒ ghi **`không-nhịp`** + lý-do (chưa tới cadence · không có input — 🧊 lý-do "anh không consent" retired @S152: cả 5 vòng AUTO). **KHÔNG** ghi ✓, **KHÔNG** tính TRƯỢT — nhưng cũng **KHÔNG** được im-lặng bỏ khỏi bảng. **(2) 4 phép sàn — mỗi phép PHẢI SHOW bằng-chứng đĩa:** diff --git a/.claude/commands/session-start.md b/.claude/commands/session-start.md index dc1ba37..b497408 100644 --- a/.claude/commands/session-start.md +++ b/.claude/commands/session-start.md @@ -38,7 +38,7 @@ Em main đọc `.claude/hmw-mode.on` → **BÁO ngay đầu response** (anh kh ## 📋 BƯỚC 0.6 — Model-availability check (H5 — adopt S63 · MTv3 reword S110) -🔄 **VALUE-update @S149 2026-07-25 (broadcast `model-default-opus-5-max` sha `59ce1d0f`, hub-owner "làm gấp" + anh cùng ngày "đám Opus 5 MAX"):** **Default = Opus 5 MAX ở MỌI vị trí, KỂ CẢ ghế lead** (Khoản 5 — lối "owner-choice per-session cho lead" THÔI DÙNG). Model cao hơn default = **gọi bằng LỆNH từng phát**: `/fable-real <đề-bài>` HOẶC anh gõ `/model` trực tiếp (**quyền tuyệt đối, không bị rào** — ghi 1 dòng "chủ dự án đổi", 0 caveat). **CẤM lớp thấp (Sonnet/Haiku) ngồi lead** (§A1 giữ). **Báo đầu phiên RÚT GỌN:** lead đúng default ⇒ **im, không nêu**; chỉ nêu khi anh chủ động đổi hoặc model không resolve. +🔄 **VALUE-update @S149 2026-07-25 (broadcast `model-default-opus-5-max` sha published `9c909007` — re-stamp G-024a @07-25, pre `59ce1d0f`, hub-owner "làm gấp" + anh cùng ngày "đám Opus 5 MAX"):** **Default = Opus 5 MAX ở MỌI vị trí, KỂ CẢ ghế lead** (Khoản 5 — lối "owner-choice per-session cho lead" THÔI DÙNG). Model cao hơn default = **gọi bằng LỆNH từng phát**: `/fable-real <đề-bài>` HOẶC anh gõ `/model` trực tiếp (**quyền tuyệt đối, không bị rào** — ghi 1 dòng "chủ dự án đổi", 0 caveat). **CẤM lớp thấp (Sonnet/Haiku) ngồi lead** (§A1 giữ). **Báo đầu phiên RÚT GỌN:** lead đúng default ⇒ **im, không nêu**; chỉ nêu khi anh chủ động đổi hoặc model không resolve. 🧊 *Lineage: MTv3 owner-choice {Fable 5 | Opus 4.8} per-session (S110→S149) = superseded-VALUE bởi broadcast trên; CẤU TRÚC (floor §A1 · outage-reflex · per-invocation engine-đắt) GIỮ NGUYÊN.* **Outage-path (H5, GIỮ — value-update):** Opus 5 KHÔNG resolve (lỗi `"Model isn't available"`) → **GIỮ `/model claude-opus-4-8[1m]` + BÁO HUB NGAY** (caveat Khoản 3 broadcast — đừng đổi mù để agent chết im; blameless per-env). **KHÔNG sửa frontmatter agent** — sub pin ALIAS `opus`+`effort:max` (worker-tier-pin S124) ⇒ alias family tự resolve, outage lead KHÔNG chạm sub. Phản-xạ THỦ-CÔNG (không hook tự-switch). @@ -181,7 +181,7 @@ git check-ignore -q .claude/sessions/session-1 ; echo "exit=$?" # → exit=1 > Read-side "vật-chất-tối": archive `agent-memory//archive/*.md` KHÔNG vào RAG. Inject **mục-lục** (`archive/_INDEX.md`), nội dung verbatim + `.gist.md` đọc-theo-nhu-cầu. "Inject tấm bản-đồ, KHÔNG inject lãnh-thổ." -- **🌙 Sleep-check — 🔄 ĐỔI TRIGGER @S144 (adap đợt-11, owner chốt O-6 + số):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/distill-shard-probe.ps1` → in `SHARD-PROBE: pending= | nguong= => KEU|IM`. **KÊU → INFORM gợi-ý** chạy `/sleep-recovery-memory-l2 `. 🔴 **KHÔNG auto-run** — anh consent mới chạy. +- **🌙 Sleep-check — 🔄 ĐỔI TRIGGER @S144 (adap đợt-11, owner chốt O-6 + số):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/distill-shard-probe.ps1` → in `SHARD-PROBE: pending= | nguong= => KEU|IM`. **KÊU → 🔄 AUTO chạy** `/sleep-recovery-memory-l2 all` trong phiên (owner @S152 *"các vòng 1→5 auto luôn"* — 🧊 INFORM-consent S144 superseded; vết M4 giữ: in 1 dòng trạng-thái, KÊU-mà-không-chạy-được ⇒ ghi WAL `sleep: skipped S ()`); `ring4-audit` AUTO sau nén như cũ (Phase 4.5 skill). - 🔴 **Trigger = ĐẾM VẬT THẬT** (số shard `archive/.md` chưa có `.gist.md` cặp đôi), **KHÔNG còn ngày-lịch**. Ngưỡng đọc LIVE từ `memory-budget.json → distill_trigger.min_pending_shards` (**B1 — CẤM chép số vào đây**). - 🔴 **SHARD loại trừ `_INDEX.md` + `*.gist.md`** — bộ đếm đầu tiên của lead ra 20, trong đó **5 là `_INDEX.md`** ⇒ 25% dương-giả; số thật 15. Fault-inject 6/6 2-chiều (0/6/7-biên/8 + 2 ca anti-dương-giả). - 🧊 **Dòng cũ `today − last_sleep_at ≥ 7 ngày` = GHI-CHÚ PHỤ, KHÔNG còn là trigger.** Đảo có chủ đích @S144 2026-07-22, chữ-ký = anh (owner), qua 2 cửa tường minh: O-6 chọn cơ-chế + trả lời sau chốt SỐ. Lý do: ngày-lịch = proxy-giả (`auto-toan-vong:21-27`), và trái chính mark Active-High `RC-pqhuy1987-20-06-2026-10-29-11` (age = false-proxy). `last_sleep_at` **giữ lại** làm dấu-thời-gian tham chiếu, không dùng để quyết. **+ Byte-display (Item 8/M-10 S135):** khi INFORM fire → in kèm **tổng byte `agent-memory/*/archive/.md` CHƯA có `.gist.md`** (match PREFIX kỳ; đo TƯƠI `(Get-Item).Length` — 🔴 CẤM `Get-Content`-đếm, bẫy encoding E-010; baseline 17-07 kỳ `2026-07` ≈183KB/5 file [ví-dụ-lịch-sử — kỳ 2026-07 đã gist @S140→chưa-gist ~0]) → anh nhìn số rồi **tự ĐẶT ngưỡng byte** nếu muốn chuyển hẳn sang trigger-theo-byte; 🔴 **KHÔNG bịa số** (giữ INFORM 7-ngày — DP-5 quyền owner cục-bộ B1 §3.4). @@ -264,7 +264,7 @@ ngược lại → counter += 1 ; last_ticked_session = S ; last_ticked_head **(e) BÁO dòng-nợ 4-vế (nâng dòng H24 cũ — Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` → in **1 dòng** `NHIP-NO: kiem light a/e deep b/f | tran-bo-nho x over-cap | run-chua-gom y` (vế-1 nhịp-kiểm = `counter/light/deep/OVERDUE` thay dòng H24 cũ). 🔴 **probe KHÔNG chặn**: lỗi → in `probe-loi (khong chan)` → đi tiếp. 🔄 **HÌNH B @S149 (bookend-hoá light — spec qua gate W2):** cặp soi-lead (`lead-stale-auditor` + `lead-gap-auditor`) spawn **VÔ-ĐIỀU-KIỆN mỗi đầu phiên** — KHÔNG còn cổng OVERDUE(light); **OVERDUE(deep) GIỮ** (deep-sweep theo `deep_every`). Cặp trả → ghi số bằng máy `scripts/h24-signal-write.ps1` (đơn-vị tally = phiên-LOGIC: @open+@close gộp 1 quyết-định/class — FIX-1). `ring2-audit` AUTO sau cặp, **PIN đích-danh run-folder tươi** (cấm glob-latest — carve-out §A1). Luật sống canonical ở [`session-end`](session-end.md) §L.b(j)(ii) — **B1, mục này chỉ ÁP, không chép phạm-vi**. 🧊 *Bản S146→S149 = "auto khi tới nhịp"; đảo @S149 theo direction anh "chạy đc VIPIX, AI_INFRA" (lineage đầy đủ ở §L.b(j)(ii)).* 🔸 **Phạm-vi 1 dòng (chống đọc nới):** gỡ **cổng NGƯỜI**, **giữ cổng NHỊP** (`h24_cadence`) ⇒ auto **khi tới nhịp**, KHÔNG phải mỗi phiên. Khác bookend-hub (hub bỏ counter) — SE chưa theo nhánh đó. - ⚠️ **KHÁC sleep-check §2.1.2** (vẫn CONSENT) — 🧊 vế "KHÁC trio §2.1.9 (vẫn CONSENT)" hết hiệu lực @S151: trio nay CŨNG AUTO (1 vòng/phiên giữa 2 bookend). Chỉ còn sleep-check là cổng consent; đừng suy khuôn cổng này sang cổng khác. + ⚠️ 🧊 Vế "KHÁC sleep-check §2.1.2 (vẫn CONSENT)" **hết hiệu lực @S152** — owner chốt *"các vòng 1→5 auto luôn"* ⇒ sleep-check CŨNG AUTO-khi-KÊU. **Từ S152: cả 5 vòng (V1 tooling/harvest+ring1 · V2 soi-lead+ring2 · V3 trio · V4 nén-ngủ+ring4 · V5 floor/detector) đều AUTO, 0 cổng consent** — vết M4 (in dòng trạng-thái + WAL khi skip) giữ cho MỌI vòng; auto ≠ chạy-chìm, auto ≠ chạy-mù (fail-safe NO-OP khi thiếu input giữ nguyên). *(Lineage cổng-consent: trio gỡ @S151 · sleep gỡ @S152 — đây là cổng consent CUỐI CÙNG của 5 vòng.)* 🔴 **Số nhịp = quyền anh.** Bước này **ĐỌC** `h24_cadence`, **KHÔNG** ghi. **CẤM hardcode nhịp ở đây** — copy số vào doc dẫn-xuất chính là drift mà single-source sinh ra để chặn (detector `governance-detectors.ps1` H24-2 **fail-loud** nếu key thiếu, **không** giả-định default). > 🟡 **Honest-caveat mang theo khi báo hub:** hub nói rõ *"số của các em = config của các em; ĐỪNG chép 3 số này"*. SE chọn **cùng 6/15/3** là **điểm khởi-đầu anh CỐ Ý chọn**, KHÔNG phải chép vô-thức. **Chỉnh lại sau chu-kỳ-2 CỦA SE** (deep-audit lần 2, xem .session-counter.json last_audit). Hub đã GỠ counter (bookend 07-15, sha 85bf89ca) → ví-dụ 6/15/3 "ở nguồn" = lịch-sử, KHÔNG còn mốc hub để so; delta hub hứa từ run-2 KHÔNG BAO GIỜ có (hub gỡ trước run-2) — **chưa ai được bán câu "đã chứng minh hiệu-quả"**. ✅ **Ratified 2026-07-17:** anh mark cổng reply `e50a4bd0` (2026-07-16-ai_infra-to-se-reply-adap); canonical = `memory-budget.json → h24_cadence._owner_ratified` (B1 — wording sống ở đó, đừng chép lại đây). @@ -273,7 +273,7 @@ ngược lại → counter += 1 ; last_ticked_session = S ; last_ticked_head > Trục = **CHÍNH HỆ MEMORY** (độ-giữ · hành-động · đúng-spec) — **KHÁC** H1 tooling-freshness · H2 harvest-integrity · H24 soi-LEAD · reviewer chấm-diff. 3 vai read-only INFORM-only propose-only, chạy **TUẦN TỰ**: `harness-eval` (con ĐO) → `harness-refine` (con ĐỀ-XUẤT) → `harness-audit` (con KIỂM). Contract từng vai = canonical ở [`.claude/agents/harness-{eval,refine,audit}.md`](../agents/harness-eval.md) (B1 — **KHÔNG chép contract vai vào đây**). -- **(a) 🔄 AUTO 1 VÒNG/PHIÊN — vị trí GIỮA 2 bookend (owner chốt @S151 2026-07-25, supersede consent-gate S141; ĐÂY = nhà canonical, `session-end §L.b(k)(i)` chỉ TRỎ):** anh: *"OK đồng ý, cứ đúng luật là tự làm, tao muốn có 1 vòng auto giữa 2 phiên bookend"* ⇒ trio chạy **TỰ ĐỘNG đúng 1 vòng mỗi phiên**, vị trí = **SAU bookend @open, TRƯỚC bookend @close** — KHÔNG cần anh gật từng lần (HANDOFF #12 resolve theo hướng này; vòng auto đầu tiên = chính S151). Em-main vẫn **IN 1 dòng trạng-thái** `trio-memory: auto-vong @S (giua 2 bookend)` khi khởi chạy — hết consent nhưng KHÔNG chạy chìm. Đã chạy @giữa rồi ⇒ @close KHÔNG chạy lần 2 (đúng 1 vòng/phiên). 🧊 *Lineage: consent-gated per-run (S141, khuôn 5-câu `58e28bae`) → AUTO @S151 owner-direction. ⚠️ Khuôn sleep-check §2.1.2 VẪN CONSENT — 3 cổng không cùng khuôn, đừng suy một ra ba.* +- **(a) 🔄 AUTO 1 VÒNG/PHIÊN — vị trí GIỮA 2 bookend (owner chốt @S151 2026-07-25, supersede consent-gate S141; ĐÂY = nhà canonical, `session-end §L.b(k)(i)` chỉ TRỎ):** anh: *"OK đồng ý, cứ đúng luật là tự làm, tao muốn có 1 vòng auto giữa 2 phiên bookend"* ⇒ trio chạy **TỰ ĐỘNG đúng 1 vòng mỗi phiên**, vị trí = **SAU bookend @open, TRƯỚC bookend @close** — KHÔNG cần anh gật từng lần (HANDOFF #12 resolve theo hướng này; vòng auto đầu tiên = chính S151). Em-main vẫn **IN 1 dòng trạng-thái** `trio-memory: auto-vong @S (giua 2 bookend)` khi khởi chạy — hết consent nhưng KHÔNG chạy chìm. Đã chạy @giữa rồi ⇒ @close KHÔNG chạy lần 2 (đúng 1 vòng/phiên). 🧊 *Lineage: consent-gated per-run (S141, khuôn 5-câu `58e28bae`) → AUTO @S151 owner-direction. Vế cũ "sleep-check §2.1.2 VẪN CONSENT — 3 cổng không cùng khuôn" hết hiệu-lực @S152 (owner "vòng 1→5 auto"): nay cả 3 cổng cùng AUTO.* - **(b) 🔴 TUẦN TỰ, CẤM song song:** **3 spawn RIÊNG** đúng thứ-tự eval → refine → audit. **KHÔNG dùng `parallel()` của `hmw.js` cho bộ-ba** — refine đọc output eval, audit chấm output của cả 2; chạy song song ⇒ chấm **bản cũ** ⇒ verdict vô-nghĩa. - **(c) Lead scribe NGAY (single-writer):** return từng con → lead ghi `.claude/workflows/runs//harness-{eval,refine,audit}-return.md` **ngay khi con đó trả**, **KHÔNG đợi đủ 3**. Lý-do: 3 vai **không có Write/Edit** (chặn-bằng-thiếu-tool) nên tự-ghi-đĩa bất-khả; phiên chết giữa chừng ⇒ mất return (bài-học vòng-1 S141). - **(d) PIN đích-danh (fail-closed):** `harness-refine` nhận **path** `…/harness-eval-return.md`; `harness-audit` nhận **path run-folder** đang chấm. 🔴 Pin **missing/rỗng ⇒ vai TỪ-CHỐI / TRƯỢT** — **CẤM** để vai tự đi tìm "run mới nhất" (vớ bản cũ ⇒ **ĐẠT-ảo**). diff --git a/.claude/commands/sleep-recovery-memory-l2.md b/.claude/commands/sleep-recovery-memory-l2.md index f387722..21ee319 100644 --- a/.claude/commands/sleep-recovery-memory-l2.md +++ b/.claude/commands/sleep-recovery-memory-l2.md @@ -52,7 +52,7 @@ Hiện-hành (báo-cáo RUNTIME đo 2026-07-25 — KHÔNG chép thành hằng-s | Đường | Cơ chế | |---|---| | **Tay** | Anh gõ `/sleep-recovery-memory-l2 ` bất kỳ lúc nào | -| **Auto-check (INFORM-only)** | 🔄 **ĐỔI @S144** — `/session-start §2.1.2` + `/session-end §L.b(c)` chạy `scripts/distill-shard-probe.ps1` → đếm **shard chưa-gist** (loại trừ `_INDEX.md` + `*.gist.md`), so ngưỡng đọc-live `memory-budget.json → distill_trigger.min_pending_shards`. KÊU → **gợi-ý** chạy command (INFORM anh, **KHÔNG tự-chạy autonomous**). Anh consent → chạy. 🧊 **Dòng cũ `today − last_sleep_at ≥ 7 (ngày)` nay là GHI-CHÚ PHỤ, KHÔNG còn quyết-định** — owner đảo có chủ đích @S144 2026-07-22 (O-6 cơ-chế + chốt số 7 shard); trước đó `:52` giữ 7-ngày là **quyền owner cục-bộ DP-5**, và chính owner gỡ, không phải AI. 🔸 **Kèm hiển-thị byte (M-10 / DP-5):** khi INFORM fire, 2 site runtime (`/session-start §2.1.2` + `/session-end §L.b(c)`) in kèm **tổng byte `archive/.md` chưa có `.gist.md`** (match PREFIX kỳ; baseline 17-07: kỳ `2026-07` ≈ 183KB/5 file [ví-dụ-lịch-sử — đã gist @S140→~0]) để anh nhìn số **rồi tự đặt ngưỡng byte** nếu muốn chuyển hẳn (không bịa số) — **INFORM 7-ngày GIỮ** (quyền owner cục-bộ, B1 §3.4; cấm-là-cấm-hub-phát-chuẩn). ⚠️ Việc **WIRE** byte nằm ở 2 site đó (**LANE-A**), **KHÔNG** ở command này — dòng này chỉ là **MÔ-TẢ** (tránh ghost-wire "defined-but-unread", H18). | +| **Auto-check (AUTO-khi-KÊU @S152)** | 🔄 **ĐỔI @S144** — `/session-start §2.1.2` + `/session-end §L.b(c)` chạy `scripts/distill-shard-probe.ps1` → đếm **shard chưa-gist** (loại trừ `_INDEX.md` + `*.gist.md`), so ngưỡng đọc-live `memory-budget.json → distill_trigger.min_pending_shards`. KÊU → **🔄 AUTO chạy** command trong phiên (owner @S152 *"các vòng 1→5 auto luôn"* — 🧊 INFORM-consent S144 superseded; vết M4: in dòng trạng-thái + WAL `sleep: skipped` nếu KÊU-mà-không-chạy). 🧊 **Dòng cũ `today − last_sleep_at ≥ 7 (ngày)` nay là GHI-CHÚ PHỤ, KHÔNG còn quyết-định** — owner đảo có chủ đích @S144 2026-07-22 (O-6 cơ-chế + chốt số 7 shard); trước đó `:52` giữ 7-ngày là **quyền owner cục-bộ DP-5**, và chính owner gỡ, không phải AI. 🔸 **Kèm hiển-thị byte (M-10 / DP-5):** khi probe KÊU, 2 site runtime (`/session-start §2.1.2` + `/session-end §L.b(c)`) in kèm **tổng byte `archive/.md` chưa có `.gist.md`** (match PREFIX kỳ; baseline 17-07: kỳ `2026-07` ≈ 183KB/5 file [ví-dụ-lịch-sử — đã gist @S140→~0]) để anh nhìn số **rồi tự đặt ngưỡng byte** nếu muốn chuyển hẳn (không bịa số) — **INFORM 7-ngày GIỮ** (quyền owner cục-bộ, B1 §3.4; cấm-là-cấm-hub-phát-chuẩn). ⚠️ Việc **WIRE** byte nằm ở 2 site đó (**LANE-A**), **KHÔNG** ở command này — dòng này chỉ là **MÔ-TẢ** (tránh ghost-wire "defined-but-unread", H18). | > 🔴 **State-file `last_sleep_at` có 1 home DUY NHẤT:** `.claude/agent-memory/memory-budget.json` (root-key `last_sleep_at`, cạnh `tiers`/`measured`). KHÔNG ghi ở `_INDEX.md` / nơi khác. *(SE đặt budget-file trong `agent-memory/`, KHÁC AI_INFRA gốc đặt `.claude/memory-budget.json` — đây là tailor path SE.)* Field `last_sleep_at` **đã thêm** (null baseline, S72) vào budget-file SE — auto-check **đã wired** ở `/session-start §2.1.2` + `/session-end §L.b(c)` (đọc field → INFORM gợi-ý nếu null/≥7d). Lần sleep đầu lead set `= today` (Phase 4.4). Lead = single-writer field này (B3). diff --git a/.claude/commands/ultra-on.md b/.claude/commands/ultra-on.md index af2d3fb..0233945 100644 --- a/.claude/commands/ultra-on.md +++ b/.claude/commands/ultra-on.md @@ -6,7 +6,7 @@ argument-hint: (trống = bật mode · hoặc kèm task lớn đầu tiên) # /ultra-on — BẬT HMW-mode (SOLUTION_ERP) > Cặp **`/ultra-off`**. 🔴 restart Claude Code sau khi tạo/sửa (command `.md` no hot-reload). -> Gõ lệnh này = **CONSENT chạy Workflow fan-out** · scope **CHỈ repo SOLUTION_ERP** (S1 — KHÔNG fan-out repo/corpus khác) · workflow-agent = **worker-tier-pin `opus`+`effort:max`** (role-có-frontmatter, S124; lead = DEFAULT Opus 5 MAX (thư `59ce1d0f` @S149 — 🧊 MTv3 owner-choice-per-session S110 superseded-VALUE; Fable = `/model` đầu phiên hoặc `/fable-real`); role-less→inherit lead S63; Fable qua /fable-real). +> Gõ lệnh này = **CONSENT chạy Workflow fan-out** · scope **CHỈ repo SOLUTION_ERP** (S1 — KHÔNG fan-out repo/corpus khác) · workflow-agent = **worker-tier-pin `opus`+`effort:max`** (role-có-frontmatter, S124; lead = DEFAULT Opus 5 MAX (thư `9c909007` @S149 (re-stamp 07-25 G-024a; pre `59ce1d0f`) — 🧊 MTv3 owner-choice-per-session S110 superseded-VALUE; Fable = `/model` đầu phiên hoặc `/fable-real`); role-less→inherit lead S63; Fable qua /fable-real). > **Mode persist qua marker:** `/ultra-on` → em main tạo `.claude/hmw-mode.on` (Write) + vào mode → SỐNG qua session/compact. `/ultra-off` xóa. **`/session-start` đọc marker → BÁO anh ON/OFF** (khỏi quên đang ở mode đốt-token). marker = source-of-truth · **gitignored** (KHÔNG commit — tránh mode kẹt-ON khi clone = on-ramp ungoverned). **Task đầu (nếu có):** $ARGUMENTS diff --git a/.claude/governance/.session-counter.json b/.claude/governance/.session-counter.json index eb6db7c..cae1181 100644 --- a/.claude/governance/.session-counter.json +++ b/.claude/governance/.session-counter.json @@ -11,41 +11,37 @@ }, "_tick_invariant_note": "Tick invariant (hub dede7ec5 Delta-1, verbatim): moi LAN-CHOT +1; mot cap dung-noi tang DUNG +1, khong +2, khong +0. SE form = tick-at-entry-gate idempotent-per-label (hub Delta-2 recovery-gate +1 = permitted form) - NET +1/session-label EQUIV hub +1/cap on CLOSED pairs; an OPEN pair is transiently +0 until its entry gate fires (hub blessed, 9a35405b block-1 phep dung-noi). Guard song-con = label-convention (session-start 2.1.8: new conversation = new S\u003cnn\u003e label, NEVER reuse). history[] is append-unbounded BY DESIGN =\u003e absence of a marker = never-happened (safe semantics); IF a FIFO cap is ever added, eviction MUST be handled explicitly (absence-vi-bi-day != absence-vi-chua-xay-ra - log-BOUNDED design-note dede7ec5).", "_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean \u0027no tick has ever happened\u0027, which is the truth at S121 - the ritual that performs the tick lands in W3. Seeding a fake first tick here would make the very first cadence reading a lie, and H24 exists to catch exactly that kind of invented number.", - "counter": 25, - "last_ticked_session": "S151", - "last_ticked_head": "7ce07981661dbf9ec36dda6e8fc8504a4607b29b", + "counter": 26, + "last_ticked_session": "S152", + "last_ticked_head": "3058470de98f8829538d9180988f4e0509da8ed6", "last_ticked_at": "2026-07-25", "last_audit": { - "light_at_counter": 25, + "light_at_counter": 26, "deep_at_counter": 25, "_note": "Counter value at which the last light/deep self-audit actually ran. S140 (2026-07-18): light-audit #3 at counter=14 = FORCE-FIRE DEBT PAID (closeout S139 gop P=3 pause =\u003e OVERDUE(light) INFORM; owner direction S140 \u0027dong du 5 vong\u0027 = consent DP-3 =\u003e lead spawn ca CAP H24 dau phien). 2-vai coverage 0-garble, diary ghi TRONG luc lam (anti-#53). lead-view: 1 FLAG LOW view-stale-status (HANDOFF:8 NEXT-em con treo \u0027624c378d verified-pending-\u003eexecuted\u0027 nhu to-do trong khi da executed-runtime @S140 sang) - xu @closeout re-stamp + 2 INFORM clean (model-flip S140 Fable = owner-choice KHONG can re-stamp canonical per anti-churn S106; 3 surface frozen dung). lead-omission: 1 FLAG MED gap-owner-specifics (direction session-model S140 VANG tracker - da xu TRONG PHIEN: draft session-model-se-draft.md + email hub + closeout them carry) + INFORM gap-carry-aged non-vacuous LAN DAU (hook-vs-budget-cap streak 9\u003e=M6, owner-held) + INFORM route-H1 (cum 7-carry S117/S118 VO HINH voi carry-age detector - chi age carry re-tag trong NEXT segment; aging-measurement bo sot) + META diary lead-omission thieu entry S137 (GAP-3 tai) -\u003e backfill @closeout. Prior: light #2 at counter=11 (S137, OVERDUE 8/6 paid). S143 (2026-07-22): DEEP-audit RAN at counter=17 - FORCE-FIRE SOM 1 NHIP theo direction owner (nguong tu-nhien la 18 = 3+15), KHONG phai toi-han tu-nhien. Deep bao ham light =\u003e set CA HAI light_at=deep_at=17 (tranh no ao phien sau). Chi tiet FLAG/class_repeat: xem history[] entry S143. Moc ke tiep tinh tu 17: light ~ counter 23; deep ~ counter 32.", - "signal_session": "S151", + "signal_session": "S152", "signal_decided": [ - "view-stale-role-desc", "view-stale-count", "view-residual-asym", - "gap-carry-aged", - "gap-decision-sunk", "gap-carry-dropped", - "view-stale-status", - "view-stale-header" + "view-stale-status" ], "signal_reset_done": true, - "signal_last_kind": "deep" + "signal_last_kind": "light" }, "class_repeat": { "_note": "Rolling tally per flag class from lead_self_audit.flag_classes (memory-budget.json). Key = class name, value = consecutive-audit repeat count. S124 first audit = SEED (fired-once), not repeats yet (per lead-view-auditor honest-note). jump_on_class_repeat=3.", "counts": { - "view-residual-asym": 3, - "view-stale-count": 3, - "gap-carry-dropped": 5, - "gap-decision-sunk": 5, - "view-stale-status": 4, + "view-residual-asym": 4, + "view-stale-count": 4, + "gap-carry-dropped": 6, + "gap-decision-sunk": 0, + "view-stale-status": 1, "gap-owner-specifics": 0, - "gap-carry-aged": 2, + "gap-carry-aged": 0, "gap-incident-unrecorded": 0, - "view-stale-header": 2, - "view-stale-role-desc": 2, + "view-stale-header": 0, + "view-stale-role-desc": 0, "gap-underfill": 0 }, "_view_star_repair_S149": "VA NUA view-* BI BO @S148 - phat hien boi h24-audit (vai KIEM) @S149, evidence runs/2026-07-24-S148-h24-force-fire/sub-h24-audit-S149.md muc 3 + 9c. GOC: lead-view-auditor KHONG GAN CLASS cho FLAG nao @S148 (no VAN gan @S140 va @S143, va @S146 dung header chuan \u0027## FLAG-N - `class` - SEV\u0027) =\u003e lead single-writer khong co so de chep =\u003e nua view-* dung yen trong khi nua gap-* duoc ghi du. Doi chung bat-doi-xung: cung closeout do, 3 dong gap-* ghi day du - khac biet DUY NHAT la lead-omission CO dua bang tally co nguon. SO DA VA (co nguon, chac chan): view-stale-count 0-\u003e1 (S148 fire V1 canonical-poison test-count; S146 khong fire) - view-stale-status 0-\u003e2 (S146 fire per sub-lead-view-S146.md:11, S148 fire V3 trio-first-run stale =\u003e 2 vong LIEN TIEP, vong sau fire nua la CHAM JUMP). 🔴 view-residual-asym GIU NGUYEN 1 - KHONG PHAI vi dung, ma vi KHONG XAC DINH DUOC: gia tri that thuoc {0, 3}. Ly do: S143=1 -\u003e S146 fire x2 (sub-lead-view-S146.md:27,:43) =\u003e =2 -\u003e S148 KHONG BIET vi FLAG-4/FLAG-5 cua lead-view @S148 KHONG TON TAI TREN DIA (run-folder chi co run.md, 0 file sub-*; doi chung S146 co 3 file). Neu 1 trong 2 FLAG mat tich la view-residual-asym thi =3 =\u003e CHAM JUMP =\u003e tong 4 class armed chu khong phai 3. CAM ghi 0 (= khang dinh \u0027S148 khong fire class nay\u0027 = DAT-ao, dung lop H24 sinh ra de chan) va CAM ghi 3 (= doan len).", @@ -132,6 +128,11 @@ "at": "2026-07-25", "session": "S151", "event": "squash-benign TICK-TAY (script session-counter-tick.ps1 FAIL-LOUD exit 7 =\u003e tick thu-cong theo prose contract 2.1.8(a), bao anh trong turn S151): counter 24-\u003e25, session S150-\u003eS151, head a9efa34-\u003e7ce0798. Classify-truoc-tick: (a) counter khong lui (n=151 \u003e= 150); (b) object a9efa34 TON TAI (cat-file -t = commit); (c) KHONG reachable (merge-base --is-ancestor exit 1) =\u003e squash-benign - closeout S150 squash wal:-commit nhac dau-tick khoi lich su, drift KY-VONG khong tamper; nhan-phien cu S150 con nguyen = corroborate 2 nguon. ROOT-CAUSE fail-loud (format-fork 2 may cung ghi 1 file): buoc ghi-signal bookend @S150 re-serialize file nay kieu ConvertTo-Json (BOM utf-8 + CRLF + hai-space sau colon + escape unicode), trong khi surgical regex cua tick script doi LF/no-BOM/mot-space =\u003e 0 match =\u003e shape-drift refuse-write dung thiet-ke. DE-XUAT FIX (cho anh gat @S151): h24-signal-write.ps1 doi sang surgical-write cung khuon tick script HOAC tick script chap nhan ca 2 shape; khong fix thi MOI tick sau MOI bookend deu fail-loud." + }, + { + "at": "2026-07-25", + "session": "S152", + "event": "squash-benign (session-counter-tick.ps1 M2, contract fail_loud_on_regress trigger-2 BENIGN branch): counter 25-\u003e26, session S151-\u003eS152, head 7ce0798-\u003e3058470. last_ticked_head 7ce0798 object EXISTS (cat-file=commit) but NOT reachable (merge-base --is-ancestor exit!=0), counter not regressed =\u003e a closeout squash lifted the ticked wal:/session commit out of history (expected drift, not tamper). Trace appended, continue, no owner alarm. Written atomically (temp + Move-Item -Force)." } ] } diff --git a/.claude/sessions/session-5/_context-s-5.md b/.claude/sessions/session-5/_context-s-5.md new file mode 100644 index 0000000..8d89d93 --- /dev/null +++ b/.claude/sessions/session-5/_context-s-5.md @@ -0,0 +1,67 @@ +# _context-s-5 — SESSION-MODEL narrative durable + + + +> **sID (LOGIC-session) = 5.** 1 phiên-logic (bootstrap → work → sweep) trải nhiều window vật-lý nối bằng `/pause`+`/tiep`. Window = 0-ID governance; **sID = đơn-vị LOGIC**. Folder pin: `.claude/sessions/session-5/`. +> ts-mốc khởi-tạo = **2026-07-25T20:14:18+07:00** (nguồn: `git log -1 --format=%cI @ HEAD 3058470`) — mốc git-committer, KHÔNG phải wall-clock tuỳ-tiện. +> +> 🔴 **CẤM rewrite / tự-tóm block FLOW** (chống self-summary lossy). FLOW = append-only @`/pause`-only; vượt cap `session_ctx_kb` → distill SECTION CŨ thành pointer/gist, TUYỆT ĐỐI KHÔNG sửa entry verbatim đã ghi. + +--- + +## (a) STOCK-map — reference-not-copy + +> Bảng pointer tới nguồn durable. **KHÔNG copy nội-dung** (chống drift). Điền @bootstrap; row session-specific append dưới các row stable. + +| Tên | Path | 1-dòng | +|---|---|---| +| WAL | `.claude/WAL.md` | mạch-việc-dở máy-state (H-22) — nối bằng `/tiep` | +| AI-context | `CLAUDE.md` | AI agent context SOLUTION_ERP (scope + quick-rules) | +| Trạng-thái | `docs/STATUS.md` | canonical mọi con-số (mig · bảng · test · roster) | +| Bàn-giao | `docs/HANDOFF.md` | brief 5 phút + bảng số chờ-anh + carry | +| Sổ đếm H24 | `.claude/governance/.session-counter.json` | counter + nhịp lead-self-audit | +| Thư cross-project | `broadcasts/_index.md` | INBOUND directed (`outbox/se`) — fan-out `outbox/all` KHÔNG vào đây | +| _(session-specific)_ | _(path)_ | _(1-dòng — append @bootstrap phiên này)_ | + +--- + +## (b) FLOW — append-only @pause-only + +> 🔴 **CẤM rewrite FLOW.** Mỗi `/pause` APPEND đúng 1 entry theo SCHEMA dưới (đặt DƯỚI dòng `FLOW-START`). Entry cũ = immutable. FLOW = SOURCE durable của "đang-đến-đâu"; bảng-đầu-việc = VIEW derive từ đây (single-source). + + + + + +### PAUSE-1 2026-07-26T00:26:55+07:00 + +> anh: /pause + +**(1) quyết-định đã CHỐT (cửa 1 · nhãn S152):** owner 3 mục trong-phiên — **(30)** dải JUMP 4/4/6 = **ĐỂ-NGUYÊN-theo-nhịp** (anh nghe giải-thích xong không phản-đối; deep kế ~counter 40) · **(31)** *"thêm vào luôn"* → 4 persona (db·harvest·office·tooling) +block `Anti-patterns (NEVER)` — LAND, hành-vi ăn registry **SAU RESTART**, MFE ăn NGAY (20/20 100%) · **(32)** *"các vòng 1→5 auto luôn"* → V4 nén-ngủ bỏ consent-gate (codified 7 site; cổng consent CUỐI của 5 vòng đã gỡ) + tầng-① → máy per-item `mfe -Detail`. Ngoài ra: anh xác nhận CLI-restart tối qua = **máy treo**, không phải wakeup-loop; anh *"chạy luôn giờ đang rảnh"* → B-series làm ngay trong-phiên. +**(2) delta còn SỐNG:** `thu-moi: se=0 · all=2` fan-out mới CHƯA kéo (→ `/adap-apply` @bookend kế) · F3/F4 thước-gate-sau (WAL `[ ]`) · B5 chờ owner-số · B7 @monthly 01-08 · khối @closeout (M9 diary [3 DEEP-S151 + N1/N2 refine + **P2-làm-lại-thật** + entries S152] · errata tally #53=50 vs commit-subject 53 · B6→slot(26) · khối Budget-đã-xoá ef-core SKILL `:109/:117` · luật turf-handoff "→ lead chuyển phiên sau" · nhắc anh RESTART) · 3 carry-age owner-held 12/9/7. +**(3) con-trỏ:** `runs/2026-07-25-S152-h24-open-bookend/` (8 file — bookend-synthesis = disposition-queue) · `runs/2026-07-25-S152-trio-memory/` (3 return + errata + trio-synthesis) · WAL = sổ queue 16-dòng chain (mọi mục `[x]` kèm số máy) · máy chốt: **A7 392/392 · mfe 20/20-100% · gate-D2 PASS_WITH_FIXES→F1/F2 đóng · counter 26 · sổ-strike dựng** · commit-mốc: `1b85713` (S151-closeout) → chuỗi `wal:` S152. + +```json +{ "machine_block": "python scripts/session_ctx.py machine-block --session 5 --json" } +``` + +--- + +## (c) STOCK-touched — máy-derive + +> Bảng file-đã-đụng trong phiên, **máy-derive** từ `git diff --name-only ..HEAD` @pause/snapshot. KHÔNG điền tay. + +| File | Δ | Ghi-chú | +|---|---|---| +| _(máy-derive @PAUSE-1, `session_ctx.py machine-block` — 39 file committed-Δ kể từ anchor S151-closeout; JSON đầy-đủ paste @`_snapshot-1.md` §machine-block — reference-not-copy)_ | 39 | anchor = `[CLAUDE] Docs: S151 closeout…` @2026-07-25T20:13:25+07:00; nhóm: WAL ×1 · agent-memory ×23 (diaries R1/M9-S151 + 6 gist D2 + 6 _INDEX A1-A4 + mfe-state) · sessions ×1 · runs S152 ×14 (bookend 9 + trio 5). 🔸 Giới-hạn giữ khai: chỉ phần ĐÃ COMMIT (hook 4-path); dirty NGOÀI-hook lúc chụp (scripts ×4 · agents ×6 · commands ×3 · docs ×2 · counter) chốt ở commit `wal: pause` NGAY SAU — xem stat commit đó | diff --git a/.claude/sessions/session-5/_pause-1.md b/.claude/sessions/session-5/_pause-1.md new file mode 100644 index 0000000..a0dc9dc --- /dev/null +++ b/.claude/sessions/session-5/_pause-1.md @@ -0,0 +1,5 @@ +ts: 2026-07-26T00:26:55+07:00 +head-sha: 212ab28de47eea81ef596d514f78625ea834cad7 +window-ordinal: 1 +jsonl-hint: D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP/9b7b0187-f6aa-428e-be1d-52303f6b8e18 +account-label: none diff --git a/.claude/sessions/session-5/_snapshot-1.md b/.claude/sessions/session-5/_snapshot-1.md new file mode 100644 index 0000000..b4f2a2a --- /dev/null +++ b/.claude/sessions/session-5/_snapshot-1.md @@ -0,0 +1,68 @@ +# _snapshot-1 — SESSION-MODEL checkpoint (sID 5) + +ts: 2026-07-26T00:26:55+07:00 +head-sha: 212ab28de47eea81ef596d514f78625ea834cad7 +head-subject: wal: flush 20260726T0021 +head-ts: 2026-07-26T00:21:00+07:00 +label: pause cửa-1 S152 — bookend+trio+queue-memory-ops chạy TRỌN, chỉ còn việc gated +snapshot-ordinal: 1 + +## essence (≤3 dòng — chốt cái CHƯA nằm file) +- Auto-snap tại `/pause` cửa-1 (trigger-D pause-autosnap): queue memory-ops ĐÓNG (A1→A4·D1·D2+gate·R1·B-series; A7 392/392 · mfe 20/20-100%); dirty NGOÀI-hook (scripts×4 · agents×6 · commands×3 · docs×2) chốt ở commit `wal: pause` liền sau. +- Owner S152 3 quyết: (30) JUMP để-nguyên-theo-nhịp · (31) 4 persona +NEVER-block (ăn registry SAU restart) · (32) 5-vòng AUTO (sleep bỏ consent — cổng cuối). +- thu-moi @pause: se=0 · **all=2 fan-out mới chưa kéo** → `/adap-apply` @bookend kế. + +## machine-block +```json +{ + "session": 5, + "anchor": { + "subject": "[CLAUDE] Docs: S151 closeout — bootstrap + trio-AUTO đầu tiên + gói 3-máy vá sống + bookend DEEP trả nợ JUMP (tally #53=53, AS-17 promote)", + "ts": "2026-07-25T20:13:25+07:00" + }, + "anchor_from_fallback_since": false, + "changed_files": [ + ".claude/WAL.md", + ".claude/agent-memory/.mfe-state.json", + ".claude/agent-memory/cicd-monitor/archive/2026-06.gist.md", + ".claude/agent-memory/cicd-monitor/archive/_INDEX.md", + ".claude/agent-memory/frontend-designer/archive/_INDEX.md", + ".claude/agent-memory/harvest-curator/MEMORY.md", + ".claude/agent-memory/harvest-curator/archive/2026-07.md", + ".claude/agent-memory/harvest-curator/archive/_INDEX.md", + ".claude/agent-memory/implementer-backend/MEMORY.md", + ".claude/agent-memory/implementer-backend/archive/2026-06.gist.md", + ".claude/agent-memory/implementer-frontend/MEMORY.md", + ".claude/agent-memory/implementer-frontend/archive/2026-H1.gist.md", + ".claude/agent-memory/implementer-frontend/archive/_INDEX.md", + ".claude/agent-memory/investigator-api/MEMORY.md", + ".claude/agent-memory/investigator-codebase/MEMORY.md", + ".claude/agent-memory/investigator-codebase/archive/2026-06.gist.md", + ".claude/agent-memory/lead-gap-auditor/MEMORY.md", + ".claude/agent-memory/lead-gap-auditor/archive/2026-07.md", + ".claude/agent-memory/lead-gap-auditor/archive/_INDEX.md", + ".claude/agent-memory/reviewer/MEMORY.md", + ".claude/agent-memory/reviewer/archive/2026-06.gist.md", + ".claude/agent-memory/reviewer/archive/2026-07.gist.md", + ".claude/agent-memory/test-specialist/archive/_INDEX.md", + ".claude/agent-memory/tooling-auditor/archive/_INDEX.md", + ".claude/sessions/session-5/_context-s-5.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/bookend-synthesis.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/machine-baseline.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/run.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-harvest-S152.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-lead-gap-S152.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-lead-stale-S152.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-ring1-S152.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-ring2-S152.md", + ".claude/workflows/runs/2026-07-25-S152-h24-open-bookend/sub-tooling-S152.md", + ".claude/workflows/runs/2026-07-25-S152-trio-memory/harness-audit-return.md", + ".claude/workflows/runs/2026-07-25-S152-trio-memory/harness-eval-return.md", + ".claude/workflows/runs/2026-07-25-S152-trio-memory/harness-refine-return.md", + ".claude/workflows/runs/2026-07-25-S152-trio-memory/run.md", + ".claude/workflows/runs/2026-07-25-S152-trio-memory/trio-synthesis.md" + ], + "changed_count": 39, + "run_id": null +} +``` diff --git a/.claude/sessions/session-5/_tiep-1.md b/.claude/sessions/session-5/_tiep-1.md new file mode 100644 index 0000000..667b0ba --- /dev/null +++ b/.claude/sessions/session-5/_tiep-1.md @@ -0,0 +1,5 @@ +ts: 2026-07-26T00:34:56+07:00 +head-sha: 493d43895021b57ec8d0d0291b34962ff91c4c04 +window-ordinal: 2 +jsonl-hint: D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP/9b7b0187-f6aa-428e-be1d-52303f6b8e18 +account-label: none diff --git a/.claude/skills/ef-core-migration/SKILL.md b/.claude/skills/ef-core-migration/SKILL.md index a6ffc71..3c839d2 100644 --- a/.claude/skills/ef-core-migration/SKILL.md +++ b/.claude/skills/ef-core-migration/SKILL.md @@ -106,15 +106,15 @@ Architecture decision đáng ghi cho session sau: **Backward compat 100%:** workflow no InnerSteps configured → service fallback legacy 2-stage logic Mig 16. Data legacy InnerStepId=null vẫn enforce unique cũ qua filtered index. -**Budget defer:** Budget chưa có versioned WorkflowDefinition entity (hardcoded `BudgetPolicy.Default`). Để mirror N-stage Budget cần migration `AddBudgetVersionedWorkflow` trước (4 bảng + ALTER `Budget.WorkflowDefinitionId?`). Defer cho user quyết riêng. +**~~Budget defer~~ 🧊 MODULE ĐÃ XÓA (Mig 50, S61):** khối dưới viết khi Budget còn sống — nay `BudgetPolicy` = 0-hit toàn `*.cs`, module thay bằng `PeWorkItemBudgets` (ngân-sách per-gói-thầu). Giữ nguyên văn làm bia-mộ, KHÔNG còn là việc: ~~Budget chưa có versioned WorkflowDefinition entity (hardcoded `BudgetPolicy.Default`). Để mirror N-stage Budget cần migration `AddBudgetVersionedWorkflow` trước (4 bảng + ALTER `Budget.WorkflowDefinitionId?`). Defer cho user quyết riêng.~~ **Phase 7 pending:** - `AddPePaymentTermFields` — tách `PurchaseEvaluations.PaymentTerms` JSON thành 6 column riêng (Session 11+++++ đã thay UI Workspace `