Commit Graph

43 Commits

Author SHA1 Message Date
09c6002667 wal: flush 20260807T1701 2026-08-07 17:01:30 +07:00
903dcab245 wal: flush 20260807T1634 2026-08-07 16:34:14 +07:00
6730eb4d48 [CLAUDE] Skill: land 5 slot owner ratify @S172 (68·69·70·71·72)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 6m41s
68 — mở enum class `view-claim-broader-than-sample` (kiểu hỏng thứ tư:
suy-luận vượt mẫu; 3 nhóm class cũ không phủ được). Seed
class_repeat.counts khoá mới = 0 CÙNG NHỊP ⇒ bất-biến counts ≡ enum
giữ 12/12 hai chiều.

69 — wire cổng ép-seed C2 vào /pause.md §2.5 (đếm 2 cột A∖B, seed
on-behalf trước khi commit `wal: pause`). Token cổng-seed 0/5 → 5/5.
Vá cơ chế lead-gap FLAG-6: phiên kết bằng /pause thì phép đếm không
bao giờ chạy ⇒ sót seed là tất yếu cấu trúc, không phải đãng trí.

70 — tách 2 sổ đếm H24: +param `-CoCa` cho h24-signal-write.ps1.
Class CÓ CA nhưng không thành FLAG (lead tự khai ⇒ con-đo xếp ngoài
TOTAL) nay CHẶN RESET nhưng KHÔNG tăng tally. Vá incentive-inversion
ring2-audit A4 bắt: cơ chế cũ thưởng cho việc giấu.
Fault-inject 4/4 (CoCa chặn reset · đối chứng âm vẫn reset · rào enum
exit 2 · happy-path exit 0). Khôi phục view-stale-header 0 → 4.

71 — gom trọn nợ harvest 11 vai / ~306 KB (S168 6 vai · S171 4 vai +
reviewer×3 lens · cicd 2 sha mở từ S162). KHÔNG gom S159-bookend-open
(dương-giả, ring1 chứng 4/4 byte-exact). Sleep probe pending=1/15 ⇒ IM
nên không nén. Ghi uỷ quyền thường trực gom+nén = AUTO, lead tự quyết,
kèm 2 rào không được nới theo.

72 — MFE vào nhịp closeout: gỡ cổng từ-khoá `eval` ⇒ AUTO mỗi closeout.
Tiền đề "MFE tắt" đã ăn trọn lớp-① reinject + E3 của harness-refine;
đo lại: exit 0, 23 role, implementer-frontend 11/13 = 85%.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 10:34:21 +07:00
408f62246c wal: flush 20260803T1107 2026-08-03 11:07:57 +07:00
4af3414ed1 wal: flush 20260803T1053 2026-08-03 10:53:28 +07:00
b827fd393b wal: flush 20260801T1228 2026-08-01 12:28:55 +07:00
ce15c649b3 wal: flush 20260801T0914 2026-08-01 09:14:40 +07:00
e5123ff5e1 [CLAUDE] Docs: S162 closeout - cay 4-folder GD ship prod + bookend-close 5 vong/10 vai
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m54s
- Cay 4-folder giai doan duoi tung goi thau (bfc7b79, cicd PASS 5/5 Run #432)
- Bookend-close: H1 PASS_WITH_FLAGS · H2 GATE-FAIL 4 · H24 20 FLAG · trio MIXED
  · ring1 26D/2T · ring2 19D/1T · harness-audit 43D/4T · ctx-audit TRUOT 7 FLAG
- Lead va trong phien: F-01/F-02/F-04 + A1 archive + A2 distill + skill KHKK
  + comment mirror self-ref (SHA-pair 6/6 giu, build x2 EXIT 0)
- MIND-5 = refresh @closeout dau tien (nhip thu 5, theo de ctx-audit)
- STATUS 3 row canonical + dong CURRENT · HANDOFF 6 slot danh so (54)-(59)
- gotcha #85 · error-ledger E-015/E-016 + AS-19/AS-20 · Phase 12 roadmap
- 4 errata khai thang: tally view-stale-count thoi 1 · enum thieu 1 class
  · tong L1 lech 54 B · A2 tren trigger duong-gia (R10)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 15:13:18 +07:00
b97b4b7405 wal: flush 20260729T2149 2026-07-29 21:49:38 +07:00
fd68407a2f wal: flush 20260729T2046 2026-07-29 20:46:44 +07:00
66f79579dc wal: flush 20260729T1932 2026-07-29 19:32:44 +07:00
11db5efdf8 [CLAUDE] Docs: S153 closeout — adopt TRỌN Ctx soft-memory + OWNER-VETO 3-vai + RENAME hub-form (squash 22 wal:)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m39s
Pipeline anh lệnh: /check-email + /adap-apply -> /fable-real invest (spec 9-task/24-checklist)
-> hmw Opus-5-MAX 2 đợt + lead-solo T6-T8 -> checklist verify.

Thư ① 9c909007 (model-default Opus 5 MAX): TRỌN — filing 2-tuyến + probe-sau-restart
2-nguồn claude-opus-5[1m] + thư hub d432f5eab5cd + caveat (e) đóng.

Thư ② 0df10df4 (pause-tiep Ctx soft-memory, sàn 7-khoản): EXECUTED
- máy mind-check: scripts/session_ctx.py +542 dòng (7 phép + 2 phụ, 4 mức, draft/closed/--root/--session PIN, exit 0/1/3)
- template .claude/templates/session-mind-template.md + wire 4 lệnh (pause C-bis+2bis+§1-carve-out, tiep §2.6+§3-ter, session-start Phase 3.5, session-end §L.b(l)+6.3-bis)
- memory-budget: mind_ctx_kb=32 + tiep_reload + ĐÓNG ghost-wire session_ctx_kb (H18 class-2 sống S146->S153)
- fault-inject 18/18 + 2 fix hậu-T4 (FI 6/6): GAP-#9 closed-mode E-0-con-trỏ CỜ->TRƯỢT (chặn gradient
  thưởng xoá-con-trỏ-trung-thực, họ bẫy F-1 của chính thư hub) · secrets-sweep +--root parity
- số ĐO THẬT pause +117ms thay ước lệch 2.2-5.4x

OWNER 2 quyết trong-phiên:
- (38) VETO: 1-vai -> hub-form 3-vai (ctx-curator @pause + carve-out pause §1 · ctx-verifier @tiep · ctx-audit @2-bookend)
- RENAME theo chuẩn hub/sisters để audit chéo: ctx-pause-check->ctx-curator, ctx-reload->ctx-verifier
  (đo đĩa 3 nhà; hub≠sister => SE theo HUB-form, tiền lệ S149). Roster 20->23, VALID_ROLES 23.
  Gap còn lại: ring5-audit (V5 truth-floor) hub CÓ, SE+VIPIX chưa -> slot (41).

Bookend 2 đầu (12 spawn) + trio auto 1 vòng:
- @open: H1 7f · H2 4f · H24 5+3 FLAG · ring1 28Đ/4T · ring2 8/8Đ + M-1 MISS thật · trio eval-MIXED-14/refine-3A-7B-4N/audit-25Đ-3T (re-chạy 7 instrument, 24 số byte-exact)
- @close: H1 6f · H2 8f (baseline S154 = 16/10, tự sửa bản ~23/11) · H24 4+2 FLAG · ring1 47Đ/5T/1KC/53 · ring2 6/6Đ + 21 phép phụ
- lead xử 11 mục: 9 FLAG H24 + 3 RESIDUAL ring2 + F-r2 (plugin 3 hard-site) + M-1 cả 2 persona + M9 14 sổ diary + F-3/F-5/F-6 + nit Sàn-5 + BÁC F-4 (fan-out không vào _index)

#53 x14-cận-dưới, 0 mất dữ liệu (WRITE-lane derive-from-body · Agent-resume · SendMessage-resume x6).
Datum: trio return-only hết miễn nhiễm (3/3 CLEAN -> 1/3). 4-A suýt xảy ra thật (bản committed của 2 file H24 là bản cắt 24%/48%).
completeness-gate: 5 vòng đủ · phép ĐẠT 4 / TRƯỢT 0 / vacuous 0.
State: Mig 67 · 89 bảng · 532 test · gotcha 83 · Sub-agents 23 · counter 27 · bundle FROZEN · governance-only 0 prod-code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 16:10:54 +07:00
c2d01f0dce [CLAUDE] Docs: S152 closeout — bookend hình B trọn 2 đầu + owner (30)(31)(32) + queue memory-ops TRỌN (squash 20 wal:)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m30s
- Owner 3-quyết: (30) JUMP để-nguyên-theo-nhịp · (31) 4 persona +NEVER-block (restart ĐÃ THOẢ) · (32) vòng 1→5 AUTO — lô consent gỡ 9 site (5 H1 + ring1-tự-bắt + 3 trio; E-013 EXT)
- Memory-ops TRỌN: A1-A4/D1/D2/R1/B-series — A7 392/392 · mfe 20/20-100% lần đầu · lead-gap drain 24.728→16.485B · strike-ledger + WARN-latch (-Ack = owner-action)
- V4 sleep AUTO đầu: 1 shard thật/16 KÊU · ring4 đầu-đời TRƯỢT-4/5 → 4 fix gist (scribe sub-ring4-close vì return-only)
- Thư model re-stamp: 59ce1d0f → 9c909007 published (G-024a) — adap-report Đính-chính @S152 + sweep 13 bề-mặt LIVE
- Bookend @close: stale 6 FLAG + gap 2 FLAG → vá 8/8; ring2 8/8 ĐẠT (4-A pin-bản-cắt → slot 33) · ring1 48Đ/5T/59-claim
- M9 13 đơn-vị diary (3 S151-deep hồi-tố) · #53 ×10-chắc → tally 60-cận-dưới + errata subject-1b85713
- Session-log 2 run= + completeness-gate 5-vòng ĐẠT · HANDOFF segment S152 (carry 3-đóng/3-mới/23-giữ; slot 33/34)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 01:58:30 +07:00
a5ccffc8b8 wal: flush 20260718T0051 2026-07-18 00:51:55 +07:00
6664a6136a [CLAUDE] PurchaseEvaluation: luy ke TAM TINH vs CHINH XAC — ComputePendingAsync + 5-field DTO + FE 2-app sub-dong amber/banner man duyet + D4 audit-note (UAT anh Kiet 15-07, 0 mig, test 520→528)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m27s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 14:27:19 +07:00
38b6d196d6 wal: flush 20260717T1035 2026-07-17 10:35:19 +07:00
2ef3f445bf wal: flush 20260713T1702 2026-07-13 17:02:40 +07:00
58f1c5fdbc wal: flush 20260712T1824 2026-07-12 18:24:13 +07:00
2b54293679 wal: flush 20260712T1711 2026-07-12 17:11:07 +07:00
4c05431ceb wal: flush 20260712T1528 2026-07-12 15:28:41 +07:00
6bfe3db5e2 [CLAUDE] Docs: S88 closeout — PE stability audit + D1/D2 prod-verified
STATUS/HANDOFF S88 prepend (State THAT: Mig 59 · 88 bang · 419 test (45D+374I) ·
gotcha 73 · bundle admin BQq2eTP6/user dHa64I59) + session log + agent-memory
harvest (6 sub: cicd/impl-backend/impl-frontend/inv-codebase/reviewer/test-spec).

D1/D2 production already shipped: 73cce1f (Run #347 PASS, +11 test, the 6 fixes) +
1aa3bdb (Run success, +6 test, create-contract 1->N + list winner names). Both
prod-verified (bundle rotation + Gitea run=success; cicd-monitor verdict truncated
#53 -> curl-self-verify).

Curate-debt: test-specialist L1 34.8KB OVER-SOFT (root-caused #53 x3 this session)
DEFERRED next session as #1 NEXT-em (proper byte-exact L1->L2 + _INDEX, not rushed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 10:58:15 +07:00
121f5cc128 [CLAUDE] Docs: S87 closeout — PE multi-winner + budget=0 + cấp-KẾT-THÚC (Mig 58) + Section B 3-cột (Mig 59)
STATUS + HANDOFF S87 narrative + count flush (Migrations 57->59, test 377->402,
gotcha 73 unchanged) + session log 2026-06-24-S87 + agent-memory harvest
(cicd-monitor #344 / implementer-backend / investigator-codebase / reviewer /
test-specialist — spawn-record on-disk).

State THẬT: Mig 59 · 88 bảng (cicd flag 89 drift, re-ground monthly) · 402 test
(45D+357I) · gotcha 73 · menu 54 · bundle admin CXCKlNay/user Di40ewrF
(Run #344; #345 cicd-verifying Section B). Docs-only -> CI skip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:14:54 +07:00
095fb492cd [CLAUDE] Docs: S77 closeout — PE UX batch 10 deploy (#320->#329) + Mig 57 + test 354 + flush agent-memory
Closeout buoi san pham lon (anh Kiet FDC + Tra Sol + Bich Phuong, HMW-mode ON): 10 deploy prod-verified #320->#329, 10/10 cicd PASS. STATUS + HANDOFF + session log 2026-06-19-S77. State: Mig 56->57 (AddPeSuggestedPriceNotes) · test 344->354 (+10) · bundle cuoi BqKD3Y23/Cn-i349D · 88 tables · gotcha 70. Viec: co GAP pill moi danh sach+inbox · focus->revert list · Mig 57 ghi chu gia de xuat PRO/CCM + so phan cach + chinh ta + guard #70 · so am do-ngoac · muc con thut-gach · co gap GAN=NV/GO=Truong phong bat-doi-xung · tach chon-phieu(inline) khoi mo-rong(overlay)+nut Xem mo rong · chuong bao nguoi duyet · banner Tra-lai. 3 loi em tu bat review-truoc-deploy (guard#70 · asymmetric · double-mount). FD process-death Task H->recover-disk. Flush 5 sub-agent MEMORY (self-flush khi return). CARRY: curate L1 over-cap reviewer 45KB+cicd 37.6KB+inv 35.6KB keep-floor-hit manual (archive-gate A7 GATE PASS 186/186). Docs+memory only -> CI skip (gotcha #41).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:55:45 +07:00
c3ee6cb326 [CLAUDE] Docs: S70 session-end closeout — Harness-9 STATUS/HANDOFF/log + doc-drift 4-flush + agent-memory provenance
- STATUS.md + HANDOFF.md: S70 entry (Harness-9 L2 dark-matter recovery + adap 2-workflow mandate, 0 production code, 3-stage Workflow run-id, 4 over-cap sub <25KB cap, P1 curate-debt CLOSED).
- docs/changelog/sessions/2026-06-17-S70-harness-9-l2-recovery.md: full session log.
- §L.g doc-drift 4-flush (H1 tooling CHỐT): dependency-audit-erp/SKILL.md:153 (65->68) + skills/README.md:20 (Mig 52->53) + :90 (65->68) + session-start.md:44 (58->68).
- §L.d/f agent-memory provenance (H2 harvest GATE CONDITIONAL PASS): 4 curate-log refresh -> S70 (was stale S40/S66/S69) + read-side fix MEMORY.md L5 header -> _INDEX.md (3/4 had 0 refs; reviewer already had it). All 4 MEMORY.md still <25KB auto-inject cap.

State unchanged (0 production code): Mig 53 / 88 tables / 306 test / 68 gotchas / menu 54 / bundle BgNCjwsG-CBvh0vtf.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 00:14:22 +07:00
f36aab8934 [CLAUDE] Docs: adopt Harness-9 — L2 archive dark-matter recovery (4 sub) + adap 2-workflow mandate (S70)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m52s
3-stage Workflow run-id evidence: investigate wf_be952f3c-97f / implement wf_a58e0d15-beb / audit wf_9520d8cd-4fe.

PART 1 (L2 recovery): 4 over-cap sub (cicd-monitor/investigator-codebase/reviewer/implementer-backend)
curated L1->L2 byte-exact + archive/_INDEX.md (substring sha-keyed pointers, no line-hints)
+ <period>.gist.md (4-field distill, distill-gen:1, verbatim frozen). All 4 MEMORY.md now < 25KB
auto-inject cap (closes P1 curate-debt). ~240KB archive no longer RAG-dark. 0-byte-loss git+sha
verified (Stage C audit + em-main self-gate on 2 reviewer StructuredOutput no-returns). Read-side
gap fixed (MEMORY.md L5 header -> _INDEX). + memory-budget.json (seed-by-measure) +
scripts/measure-agent-memory.ps1 + .ragignore guard.

PART 2/3 (process mandate): every adap = 2 separate workflows (implement + review) + report with
run-id; short-but-needs-confirm still requires review. Codified in .claude/commands/adap-apply.md
+ agents/README.md (Upgrade S70) + session-start.md (§2.1.2 budget-audit, pending-restart).

adap-report + email-back to AI_INFRA (body-hash 7c07b716e775).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 23:52:51 +07:00
a8bbdaeeea [CLAUDE] FE: Văn phòng số foundation — shared PageHeader/KpiCard/WidgetCard + Dashboard landing (PURO · CSS Hồ sơ NS) + sync fe-admin index.css + menu Off_Dashboard
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m41s
- 3 shared component PageHeader/KpiCard/WidgetCard ×2 app SHA256-identical; tái dùng token Hồ sơ NS (.app-gradient-brand/.card-accent/.icon-chip/.stat-value/.label-eyebrow + accent palette teal/violet/amberx/greenx); gotcha #66 text-white! trên gradient header.
- OfficeDashboardPage 2-cột widget kiểu PURO HomePage: Đề xuất/Đơn từ/Ticket/Phòng họp hôm nay + "Công việc của tôi" + Thao tác nhanh. Reuse query endpoint sẵn có (shared TanStack cache, KHÔNG BE/API mới), đếm client-side, loading/error/empty mỗi widget.
- Sync fe-admin/src/index.css ← fe-user (đóng drift S66-S68: heading 600→700, ink #0f172a→#0b1220, label-eyebrow slate→brand-600 + rule gotcha #66). Nay 2 app đồng bộ.
- Menu key Off_Dashboard (MenuKeys.cs const + All[] + DbInitializer seed Order 0 dưới Off) — no migration, idempotent. GIỮ ẨN non-Admin (RevokeTemporarilyHiddenModules StartsWith Off). Chưa golive.
- Wire 4-place ×2 app: App.tsx route /office/dashboard + menuKeys.ts + Layout staticMap.
- Fix KpiCard activeBorder -300 → -500 (accent palette chỉ 50/100/500/600/700 — chống "vỡ màu im lặng" Tailwind v4: border-teal-300 rơi default Tailwind, border-amberx-300 drop hẳn).
- Build PASS x2 (fe-user index-DrxDysO7 / fe-admin index-TbkadgKd) + dotnet slnx 0/0. reviewer PASS 0 blocker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 09:24:17 +07:00
fe28ca3993 [CLAUDE] Docs: S65 session-end closeout — HRM go-live + Hồ sơ NS master-detail + Department hierarchy + PE Link hồ sơ (6 deploy #289→#295)
Closeout S65 (~6 deploy prod-verified, anh + anh Kiệt FDC UAT realtime):
- STATUS/HANDOFF S65 (Mig 52 · 88 bảng · 263 test · 65 gotcha · menu 53 · bundle admin BDwV5d0X / user DbVv6rsf Run #295) + session log #289→#295.
- gotcha #65 (build csproj con ≠ dotnet build slnx gồm tests → CS7036 Run #291 FAIL-gated; fix +trailing-optional sweep).
- CLAUDE.md root Mig 50→52 + PE row +Mig 52.
- Harvest: H2 GATE 2-MISS closed — 2 on-behalf record (PE-Workflow FE + reviewer empty-return #53) → impl-frontend + reviewer agent-memory. H1 tooling CLEAN (roster/skill/plugin 11/6/18).
- Memory (user-global): +feedback_workflow_fanout_reliability.
Carry-P1: cicd-monitor L1 82KB curate-L2 · mirror Employee page→fe-admin · test-after (HoSoLink/ParentId/HRM-perm).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 11:56:03 +07:00
2aefb3134d [CLAUDE] Docs: S58 closeout — lock fix prod-verified Run #382 + S57bis flush + gotcha #59/#60 + harvest on-behalf
- STATUS/HANDOFF: thêm S57bis + S58 (2-session gap S57bis đóng vội), counts
  re-ground (Mig 49 · test 240 · gotcha 60 · menu 57 · bundle CP4CB1ym/BmZ3VHnm
  curl-verified · RAG 2420). Ops S56 "gán user IT" RESOLVED (nv.cao/nv.truong
  sống lại nhờ password fix).
- gotchas: #59 (PS5.1 git commit -F, residual S57bis) + #60 NEW (Identity seed
  CreateAsync silent-fail vs prod RequiredLength=12 — population Dev ≠ prod,
  dump data thật trước lock/seed-by-email) + checklist 31/32.
- agent-memory: cicd Run #381 (residual) + #382 · 4 spawn-record on-behalf
  (database-agent/impl-backend/impl-frontend/reviewer — H2 Coverage 4-MISS đóng)
  · investigator-codebase recon · 2 monitor RE-REPORT entries.
- skills: ef-core +row Mig 49 (49 mig ×5 chỗ) · README + dep-audit count sync.
- CLAUDE.md root: Mig 49 + test 240 + gotcha 60 + schema-ref 32-49.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 13:09:29 +07:00
17b23a418a [CLAUDE] Docs: Harness-4 two-tier runtime-VERIFIED (spawn-test 2 chiều post-restart) + email-back AI_INFRA
Some checks failed
Deploy SOLUTION_ERP / build-deploy (push) Has been cancelled
- Spawn-test 2 chiều S57bis: H1 tooling-auditor (demote pin) self-report claude-opus-4-8[1m] + H2 harvest-curator (promote inherit) self-report claude-fable-5[1m] → nấc executed-file/PENDING-RESTART → RUNTIME-VERIFIED (adap-report §2/§5 + STATUS row). [1m] 1M-resolve SE tự verify.
- Email update 2026-06-11-se-to-ai_infra-harness-4-runtime-verified (nac sent, sha ecf1d587, honest n=1/chiều, hmw.js executed-file giữ) + _index OUTBOUND.
- Lesson env: CCD harness cache agent frontmatter — restart CLI mới ăn (2 data-point 06-10/06-11).
- Bundle 06-10 carry: 7 agent pin opus-4-8 + 4 inherit + hmw.js tier-map H4.5 + agents/README two-tier + 2 adap-report + email 06-10 + agent-memory delta (KEEP-ALL-5 H2-verified) + investigator L1→L2 archive curate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 12:12:22 +07:00
a62e797332 [CLAUDE] Docs: S56 closeout — pre-golive verify + golive-harden + doc-drift + gotcha #58
STATUS/HANDOFF S56 + session log: WF1 pre-golive-verify (7-stream → GO) + WF2 golive-harden (4 fix, code a20cde8 Run #379 PASS). Test 216→228. Code golive-ready; 2 ops VPS pending (IT user + tzutil); FE Phase 2 deferred.

§L closeout (H1/H2): database-agent executed-file→verified-runtime (agents/README:4, D1 closed); ef-core skill 47→48; sys.tables 92→93 reconciled (cicd ground-truth); root CLAUDE test 203→228 + 92→93 bảng; gotcha #58 NEW (EF read-modify-write lost-update→ExecuteUpdate atomic). agent-memory harvest: cicd Run#379 + Fidelity Serializable-correction (impl/test MEMORY, H2 GATE 4.5/5).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:20:51 +07:00
a20cde89fb [CLAUDE] App: golive harden — LeaveBalance concurrency + ItTicket authz-order + DocxRenderer + Travel/Vehicle tests
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m19s
Pre-golive verification (S56) surfaced 4 issues; all fixed + verified (228 test pass, 0 build warning).

#3 LeaveBalance lost-update (DB11 concurrency): terminal-approve deduction was an in-memory read-modify-write (UsedDays += NumDays) under a bare SaveChanges, so two concurrent terminal approvals of the same (user,type,year) lost an update. Fix: atomic server-side ExecuteUpdateAsync (UsedDays = UsedDays + n) inside an explicit Serializable transaction (matches the codegen/Proposal/TravelVehicle convention; serializes the auto-create-row race too). Exactly-once guard (Status != DaGuiDuyet) intact. No migration.

#5 ItTicket reassign existence-oracle: AssignItTicketHandler checked ticket-NotFound before the Admin-OR-dept-IT Forbidden guard. Reordered so authorization runs first -> fail-closed (a non-IT/non-admin caller gets Forbidden for any ticketId, existent or not).

#6 DocxRenderer CS8602: null-guard MainDocumentPart + Document with clear exceptions (cleared 2 build warnings -> 0).

#4 Travel/Vehicle ApproveV2: added smoke tests (Submit->Approve terminal + outsider-Forbidden) — previously zero coverage.

Tests 216 -> 228 (+12). database-agent DB-layer review PASS; em-main cross-stack review clean (reviewer workflow stage did not emit StructuredOutput -> em-main covered the cross-stack review by reading every diff). Bundles agent-memory harvest (S56).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 17:51:38 +07:00
69cb3937bb [CLAUDE] Master: nạp master data thật từ Excel (62 dự án + 71 hạng mục + 3 NCC) + Project +4 cột (Mig 48)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m33s
Nạp master data công ty từ file Excel 'HẠNG MỤC CÔNG VIỆC DỰ ÁN':
- 62 Projects (Mã + Năm; tên/CĐT/địa điểm/gói thầu cho ~6 dự án có chi tiết)
- 71 WorkItems: Vật tư 16 · Thầu phụ 30 · MEP 9 · Thiết bị 16
- 3 Suppliers (TRUONGGIANG/TANPHU/TGN)

Mig 48 AddProjectMasterFields: Project +4 cột nullable (Year/Investor/Location/Package) + ProjectFeatures DTO/Create/Update + ProjectsPage form ×2 app (SHA256 mirror).
SeedRealMasterDataAsync per-code idempotent, UNGATED → reaches prod (coexist demo). FLOCK01 collision → skip (demo wins).

Verify: build 0-err · test 216 PASS · runtime Dev proof (data landed, Investor col populates). Provenance: scripts/master-import-data.generated.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 09:27:04 +07:00
ca4b60277b [CLAUDE] Office: IT staff tự reassign ticket — authz Admin-OR-IT + capability endpoint (S54)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m17s
- BE: GetAssignableItStaffQuery {canReassign,staff} capability endpoint + AssignItTicketHandler authz Admin-OR-dept-IT (Forbidden) + assignee-must-IT (Conflict); controller /assign hạ [Authorize(Roles=Admin)]→[Authorize] (handler enforce fine-grained data-driven)
- FE: fe-admin + fe-user ItTicketsPage SHA256-identical (reverse S53 divergence), nút gate by canReassign, dropdown từ /assignable-staff (không /users)
- Test: +13 authz guard (203→216 PASS), reviewer PASS (role-string Admin chain-verified real)
- No migration (DepartmentId reuse), no menu change

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:12:14 +07:00
d8cd111532 [CLAUDE] Docs: S53 closeout — gotcha #57 EXT Master (Mig 47) + P11-D/E + database-agent verified-runtime + doc-drift
Session 53 closeout (HMW-mode ON, 'làm hết' full close). Code already shipped in 44b9e54 (Mig 47, Run #260) + dbf6648 (C+D, Run #261), both prod-verified.

- STATUS/HANDOFF: S53 entry (mig 46->47, test 200->203, menu +Off_AttendanceReport, bundle admin DfCfHUE9, database-agent verified-runtime).
- Doc-drift E (H1 top-5): ef-core skill 43->47, agents/README roster 10->11 + plugin nac, CLAUDE.md root 45->47 mig + 186->203 test, docs/CLAUDE.md 56->57 gotcha + 91->92 ERD.
- adap-report: database-agent executed-file -> verified-runtime (spawn-test caught Mig 46-unapplied-local).
- session log 2026-06-08-S53 + 4 agent diaries (S53 work).
- Memory: +project_database_agent_verified_local_drift (user-memory, outside repo).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:24:45 +07:00
f440c194a8 [CLAUDE] Docs: S52 closeout — Phase 11 D+E+F deployed + database-agent + session-limit recovery
STATUS/HANDOFF S52 (Phase 11 product COMPLETE, test 200, Mig 46, roster 11, bundle DYfjnpY0/_3S0BPJ2). Session log. Proxy-append implementer-backend + test-specialist diaries (Wave 2 agent killed by session-limit truoc MEMORY step).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:38:12 +07:00
6a664298fa [CLAUDE] Office: P11-E AttendanceReport+Excel+OtPolicy + P11-F MaTicket codegen (Wave 1)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m10s
P11-F: MaTicket gen-on-create qua WorkflowAppCodeGen (IT/2026/NNN Serializable atomic, kanban no-workflow). P11-E: GetAttendanceReportQuery monthly aggregate (day-type weekday/weekend/holiday OT x OtPolicy multiplier in-memory) + AttendanceReportExcelExporter (ClosedXML) + 2 endpoint Admin-only + fe-admin AttendanceReportPage. Migration-free. +5 test (186->191). reviewer PASS (gotcha #44 role-string verified, 0 blocker).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 12:34:48 +07:00
68c6bfea77 [CLAUDE] Docs: S51 P11-C Vehicle+Driver + gotcha #57 (3 HRM catalog) closeout
STATUS/HANDOFF S51 (Mig 43->45, tables 91->92, test 181->186, bundle Cg9mvltU/YgqDvsqr, P11-C DONE) + gotchas #57 ext (2->3 HRM catalog Mig 45 + Master ext backlog Mig 46 worktree) + session log 2026-06-08-S51. Agent-memory flush (impl-be/fe + test + cicd + investigator self-write; reviewer em-main proxy [return truncated gotcha #53]). CI-skip (docs/.md only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:52:25 +07:00
ae30f8f5e2 [CLAUDE] Docs: S44 monthly drift audit + AI_INFRA bundle 06-01 adopt
Cadence audit (2026-06-01), docs-only -> CI-skip. investigator-codebase
drift scan (ground-truth from disk) -> em main patch. No code touched,
154 test unchanged.

Drift fixes (42 count corrections): 40->42 mig, 84/59/55/47->91 tables,
130/111->154 test, 52/49->56 gotcha across CLAUDE.md, docs/CLAUDE.md,
ef-core-migration + dependency-audit skills, schema-diagram, database-guide.
schema-diagram migration table extended Mig 17-42; ef-core history Mig 27-42;
detailed-section gap (Mig 27-42 modules) flagged explicit (deferred, not silent).

AI_INFRA bundle 06-01 (federated, full scope):
- A: RAG T1/T2 auto-ack
- C: hygiene 7/7 agent-mem L1 <=16KB; "25KB"->"~30KB tiered" wording x7
- D: #4 self-sustaining adoption-report step -> /session-end Phase 6.3
- E/F: report + ledger -> docs/governance/

Carry-over .mcp.json + BROADCAST-05-29 left untouched (concurrency rule).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 12:39:56 +07:00
82d7fcff4d [CLAUDE] Workflow: LeaveBalance business logic — trừ phép khi duyệt + số dư (Phase 11 P11-B)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m8s
Số dư phép theo (User × LeaveType × Year) + trừ tự động khi đơn nghỉ duyệt cuối.
Policy: cho phép vượt số dư (âm) + cảnh báo (anh main chốt), tích hợp vào trang đơn nghỉ.

Schema (Mig 42 AddLeaveBalances — pure additive, 1 bảng):
- LeaveBalance: UserId + LeaveTypeId + Year + EntitledDays + UsedDays + AdjustmentDays.
  UNIQUE (UserId,LeaveTypeId,Year), FK LeaveType Restrict, decimal(5,2).
  Remaining = Entitled + Adjustment − Used (computed, không store).

Deduction hook (ApproveLeaveRequestHandler nhánh terminal DaDuyet — exactly-once):
- Upsert LeaveBalance(RequesterUserId, LeaveTypeId, StartDate.Year), auto-create từ
  LeaveType.DaysPerYear, UsedDays += NumDays. Guard Status!=DaGuiDuyet chặn re-approve.

FK invariant guard (em main thêm sau test reveal FK risk):
- Create + UpdateDraft validate LeaveTypeId tồn tại (AnyAsync) → ConflictException.
  Đóng cửa vào — bogus type không thể tới deduction FK insert (tránh 500 kẹt đơn).

CQRS LeaveBalanceFeatures.cs: GetMy (self, lazy merge active LeaveType) + GetUser (admin)
  + AdjustLeaveBalance (admin upsert carry-over). Controller [Authorize] + admin Roles=Admin.
Embed: GetLeaveRequestByIdHandler trả balance NGƯỜI TẠO (approver xem thấy đúng).
FE: WorkflowAppDetailPage ×2 — block "Số dư phép" + cảnh báo vượt khi kind=leave (SHA256 identical).

Tests (+11, 130→154 PASS): deduction single/multi-level/accumulate/negative-allowed/
  reject-return-no-deduct + lazy-merge + adjust upsert + Create guard bogus→Conflict.
  Cũng repair 2 test S42 terminal FK-fail (template BuildLeave +seed LeaveType).

Verify: build 0 error · 154 test · FE ×2 · reviewer Max PASS (deduction exactly-once +
  FK invariant fully closed, 2 minor concurrency/comment defer).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 11:10:44 +07:00
e7b66cd52b [CLAUDE] Workflow: wire ApproveV2 + LevelOpinions cho 4 WorkflowApps module (Phase 11 P11-A)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m6s
Wire full approval workflow V2 cho Leave/OT/Travel/Vehicle — cookie-cutter
mirror Proposal (Mig 38). Trước đây skeleton Phase 1 (Create+List), giờ
ApproveV2 advance-level + UPSERT LevelOpinion + atomic codegen.

Schema (Mig 41 WireWorkflowAppsApprovalV2 — 84→89 tables, pure additive):
- 4 bảng {Leave,Ot,Travel,Vehicle}LevelOpinions (UNIQUE composite + Cascade
  parent + Restrict Level — mirror ProposalLevelOpinion)
- 1 bảng WorkflowAppCodeSequences (shared atomic MaDonTu, Prefix-keyed)
- 4 cột RejectedFromStatus (smart return tracking)
- enum ApprovalWorkflowApplicableType.TravelRequest = 9

Application (LeaveOt + TravelVehicle ApprovalFeatures.cs — 30 handler):
- GetById detail (Include LevelOpinions + JOIN Step/Level) · UpdateDraft
- Submit (gen MaDonTu + DaGuiDuyet + level=1, verify ApplicableType per module)
- Approve (verify actor==ApproverUserId OR Admin, UPSERT opinion latest-write-wins,
  advance level OR terminal DaDuyet, empty comment → placeholder)
- Reject (→TuChoi) · Return (→TraLai + RejectedFromStatus)

Api: 4 controller +6 route mỗi cái (GET/{id}, PUT/{id}, submit/approve/reject/return)
Infra: DbInitializer seed 4 workflow V2 mẫu (QT-NP/OT/CT/XE-V2-001) → UAT test ngay
FE: WorkflowAppDetailPage.tsx declarative 4-kind (fe-admin+fe-user SHA256 identical)
  — workflow status + opinion timeline + action buttons; gỡ banner skeleton + row nav

Tests: +11 WorkflowAppApproveV2Tests (130→141 PASS) — state machine + UPSERT
  invariant + guards + codegen + forbidden + placeholder (Leave full + Ot smoke)

Verify: build 0 error · 141 test PASS · FE build ×2 · reviewer checklist
  (ApplicableType per-module + cross-module DbSet + [Authorize] — no copy-paste bug)
Known-minor (unreachable): Reject/Return actor-check skip nếu CurrentApprovalLevelOrder
  null — nhưng DaGuiDuyet luôn có set (defer hardening).
ItTicket KHÔNG đụng (kanban, no workflow V2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 09:44:00 +07:00
6f08d1f0eb [CLAUDE] Docs: S40 adopt AI_INFRA Tiered Memory Policy v1 (bulletin MUC 2)
- README Memory discipline -> tiered L1 HOT (soft-cap ~30KB) / L2 archive on-demand / L3 RAG just-in-time (thay hard >25KB)
- 7 agent MEMORY.md header -> tiered framing
- Anti-truncation rule soft-cap ~30KB
- Adopt per AI_INFRA Cross-Project Bulletin 2026-05-29; SE 7-agent in scope

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 16:58:39 +07:00
78c9de35f8 [CLAUDE] Docs: S40 curate 4 agent MEMORY >25KB + RAG catch-up chunk S37-S40
- investigator-codebase 35.7->7.6 · cicd-monitor 35.3->8.4 · implementer-backend 30.9->7.9 · reviewer 28.4->7.5 KB
- Archived verbose FIFO -> git d2f52ba; refreshed stale counts (111->130 test, 33->40 mig, ~146->211 endpoints, 47->55 gotcha); dedup split (FE patterns -> implementer-frontend, test patterns -> test-specialist)
- Foundation preserved: gotcha patterns + 5-stage/5-category checklist + Smart Friend guard + workflow schemas + sqlcmd/controller-audit + BE Patterns 1-12-ter
- RAG: store_memory S37-S40 catch-up chunk (rerank 0.867 top hit); full re-index pending `python bootstrap.py --project solution_erp` (needs VOYAGE_API_KEY env)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:10:55 +07:00
fd0554a585 [CLAUDE] Agents: S39 upgrade multi-agent 4→7 + budget +50% + 5 RAG MCP (BVAAU pattern adapted)
Anh main yêu cầu tăng tốc + chất lượng SOLUTION_ERP: tham khảo BVAAU 7-agent config
+ budget token +50% + thêm 3 sub-agent. Adapted (NOT copied) — SOLUTION_ERP 2-FE-app
fit + giữ 6 skill proven battle-test 38 session.

Split 4→7 agent (anh main chốt via AskUserQuestion):
- investigator → SPLIT: investigator-codebase (cyan, internal SQL/EF/grep) +
  investigator-api (blue, external docs/CVE/lib/cross-project)
- implementer → SPLIT: implementer-backend (yellow, .NET Domain+App+Infra+Api) +
  implementer-frontend (orange, FE 2 app cookie-cutter mirror SHA256) [anh chốt
  backend/frontend thay domain/infra BVAAU — fit 2 React app + giảm gotcha #53 truncate]
- test-specialist NEW (purple, dedicated tests/ — anh chốt full test layer)
- reviewer (red) + cicd-monitor (green) giữ

Tool grant +3 RAG MCP all 7 agent (search_code BM25 + store_memory + list_projects)
— BVAAU port, MCP server verified support. Prior chỉ 2 (search_memory + cross_project).

Skill re-distribute 6 skill across 7 agent (xem README matrix).

Memory: rename investigator→investigator-codebase + implementer→implementer-backend
(giữ history) + seed 3 new MEMORY (investigator-api/implementer-frontend/test-specialist)
extract relevant patterns. Delete old investigator.md + implementer.md.

README rewrite: 7-agent architecture + decision tree split-routing + phân việc matrix
boundary + token budget +50% cost reality (~1.05M opt / ~2M heavy ceiling) +
anti-truncation rules (gotcha #53 5× mitigation: brief ≤8K + curate pre-spawn +
entry ≤1.5K + 529 fallback solo).

⚠️ Anh main RESTART Claude Code CLI để registry hot-reload 7 agent (per S27 lesson
model:inherit + new files). Verify post-restart: smoke spawn 3 new agent confirm load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 10:42:05 +07:00