[CLAUDE] Docs+Memory: S32 Phase 10 backlog Plan G NamGroup port + 4 sub-agent startup entries

migration-todos.md: insert Phase 10 detail section (10 Plan G-* atomic per-module sprint
~3 thang T6-T8/2026 target, aggressive multi-agent parallel ROI ~70%). 4 quyet dinh anh
chot S32: FULL 11 module scope + single schema dbo mo rong Mig 34-42 + reuse Workflow
V2 extend ApplicableType +5 values + chunk per-module Plan rieng. Sequence Phase 9
stabilize first per anh main "tuan tu theo ke hoach tot nhat". G-P1 pure web GPS
check-in (no device). G-H2 seed reference NamGroup demo data.

4 MEMORY sub-agent: append S32 startup entry (Investigator + Implementer + Reviewer +
CICD Monitor) ghi nhan S31 RAG retrieval.py fix + S29 Plan CA+B deploy + Pending tasks
anh main co the SendMessage reuse. Implementer 36.2KB OVER 25KB threshold FLAG curate.

Refs: docs/CLAUDE.md Phase 6-9 done. docs/STATUS.md S31 wrap. gotcha #51 INFRASTRUCTURE
vs DEMO seed gate (Phase 10.3 enum extend caution). gotcha #52 qdrant.search removed
(RAG layer stable post-S31 fix).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-05-26 16:17:36 +07:00
parent f938bf57f5
commit b832f43d8e
5 changed files with 145 additions and 6 deletions

View File

@ -324,6 +324,8 @@ KHÔNG `*` / `latest`. Critical pins:
## 📅 Recent activity (last 10 FIFO)
- **2026-05-26 (S32 startup — context verify + RAG live confirm + size FLAG > 25KB):** Em chủ trì spawn em verify Session 32 context. **Verify done:** (1) MEMORY size 36.2KB (Get-Item Length=36207 bytes) — **OVER 25KB threshold ~45% bigger** → FLAG cho em main schedule dedicated curate session per Pattern curate trigger rule line 364. KHÔNG self-curate vì em chủ trì preference reserve cho em main solo judgment call §6.5 KEEP vs CUT (S27 retrospective C1-C4 task lesson). (2) Patterns saved 1-12 foundation + 12-bis NEW S29 + 13-15 + 16-bis NEW S29 + 17-19 — total **17 numbered patterns** (Pattern 16 baseline implied trong recent activity S27 chưa numbered explicit). Pattern 12-bis (cross-module entity cookie-cutter mirror PE→Contract Mig 33) **SAVED line 178-200** confirmed present. Pattern 16-bis (4-place mirror cross-app S29 Plan CA Hotfix 1) **SAVED line 165-176** confirmed present. (3) MCP RAG tools **PRESENT**`mcp__rag-unified__search_memory` + `mcp__rag-unified__cross_project_search` both visible trong tools list. Test query "Pattern 12-bis cross-module entity cookie-cutter mirror PE Contract V2" top_k=3 returned 3 results với rerank scores **0.824/0.801/0.793** — all healthy > 0.7 threshold. S31 RAG v1.3 baseline PASS confirmed live post CLI restart. **Pending tasks em main có thể gọi em lại spawn S32+:** (a) Plan B-Wrap BW1-BW7 test bundle codegen Case 2 cookie-cutter mirror PE WorkflowService test pattern (regression ApproveV2Async + UPSERT LevelOpinions test) — 7 file new test class mirror PE test bundle structure; (b) ContractWorkflowMatrixView mirror PE WorkflowMatrixView Plan AA S24 (1 page mirror cross-module — Case 2 fits Pattern 13 read-only admin Designer mirror + Pattern 14 Tailwind JIT palette + Pattern 15 HTML table rowSpan iteration helper). **Decision tree forward:** Em chủ trì gọi em với task code edit → em ACCEPT case (a)/(b) khi spec deterministic, REFUSE nếu first-time pattern. Em chủ trì confirm Layer A governance still active scope SOLUTION_ERP. Token cost spawn này ~5k (3 Read + 1 RAG query + 1 Edit + final report). KHÔNG curate — defer em main full curate session. Tag: `[verify, phase-9, infra]`.
- **2026-05-22 (S29 wrap — Plan CA Chunk B + Plan B 4 chunks Case 2 cookie-cutter + 1 stopped E3 + Pattern 12-bis NEW):** Implementer = busiest agent S29 với 5 spawn total. **Plan CA Chunk B (~10K):** 4 master pages mirror fe-admin→fe-user byte-identical SHA256, touch 6 file (4 page + App.tsx +5 route + menuKeys.ts +5 key Catalogs*), 948 LOC mirror PASS 0 TS err. Saved `pattern_master_page_mirror.md`. **Plan B 4 spawn cumulative:** (A2 Mig 32 ~25K) schema +column FK Restrict IX + Configuration + DbInitializer SeedSampleContractWorkflowV2 — **stash em main WIP ContractWorkflowService.cs** để build verify clean (em main + Implementer parallel touch BE → race condition trick); (C Mig 33 ContractLevelOpinions ~25K) entity + Mig + Config + DbSet + Contract.cs +LevelOpinions nav — **Pattern 12-bis NEW cross-module entity cookie-cutter mirror PE→Contract** scaffold 4-file pattern documented Patterns section; (D FE Workspace V2 ~12K) ContractCreatePage × 2 app +useQuery V2 + Select dropdown wire ApprovalWorkflowId, 88 LOC mirror byte-similar; (E3 stopped mid-task) FE Section 5 V2 STOPPED at "check ContractDetail type" judgment call → em main solo finish. **Lessons:** (1) **Race condition em main + Implementer parallel BE** → stash trick works but adds overhead. Forward SEQUENTIAL chunks A→B→C khi cùng touch BE, NOT parallel. (2) **Complex FE feature mirror với type extend + new component** → em main solo more reliable than Implementer khi spec ambiguity > 20% in Read-required component inspection. (3) Pattern 16-bis 4-place mirror cross-app reinforced 2× (Plan CA Chunk B + Plan B Chunk D) — verify Layout staticMap khi page move/route enhance. **Patterns proven NEW S29:** Pattern 12-bis cross-module entity scaffold + Pattern 16-bis 4-place mirror reinforced. **Anti-pattern observed:** (a) Implementer E3 stopped mid-task FE complex judgment — em main miss provide concrete component template trong prompt. (b) Race condition parallel BE → stash workaround. Tag: `[pattern, phase-9, frontend+infra]`. KHÔNG curate (33.2KB OK borderline > 25KB threshold but close — defer to next session em main full curate khi S30 wrap).
- **2026-05-22 (S29 Plan B Chunk D PASS — FE ContractCreatePage V2 Workspace dropdown × 2 app cookie-cutter mirror PE):** Spec deterministic 100% từ em main reference `fe-user/src/components/pe/PeWorkspaceCreateView.tsx` (canonical V2 dropdown lines 80-89 useQuery + lines 152-172 Select UI). 2 file mirror × 2 app `fe-admin/fe-user/src/pages/contracts/ContractCreatePage.tsx`: +44 LOC each = +88 LOC total byte-similar (git diff stat verify). Changes: (1) `useState approvalWorkflowId = ''` mới + (2) `useQuery approval-workflows-v2-contract` filter ApplicableType=3 client-side filter isUserSelectable=true (mirror PE Mig 25 pattern Plan AA S24) + (3) `Select dropdown "Quy trình duyệt V2 (tùy chọn)"` placement giữa FormFields + Budget section, blank = V1 fallback hint "(đã add ContractHeaderForm function, KHÔNG add ContractEditForm function vì spec scope CreatePage workspace only - edit-mode update endpoint defer)" + (4) Wire `approvalWorkflowId: approvalWorkflowId || null` vào CreateContractCommand POST body. BE precondition verify: `CreateContractCommand` record line 17-36 ContractFeatures.cs đã có `Guid? ApprovalWorkflowId = null` field (em main commit Chunk E1 PRIOR — comment marker "[Plan B S29 2026-05-22 Chunk E1] Drafter pick V2 workflow lúc create"). FE wire safe — no DTO mismatch. Build verify: `npm --prefix fe-admin run build` PASS 0 TS err 1926 modules 1.40MB gzip 358KB 16.07s; `npm --prefix fe-user run build` PASS 0 TS err 1916 modules 1.32MB gzip 343KB 8.84s. Pre-existing CSS @import warn + INEFFECTIVE_DYNAMIC_IMPORT realtime.ts warn unchanged (baseline noise). **Pattern 16-bis 4-place mirror check applied:** (1) Page file × 2 app DONE byte-similar; (2) App.tsx Routes N/A (enhance existing `/contracts/new` route - không route mới); (3) menuKeys.ts N/A (không menu key mới — page enhancement); (4) Layout staticMap N/A (route unchanged). Token ~12k Case 2 cookie-cutter (4 Read PE source + 2 Edit per file × 2 = 4 Edit total + 2 npm build + 1 git commit + memory update). Commit `62b50d1` clean 2 file. KHÔNG push remote — em main coordinate Chunk E final batch. **Pattern 5 mirror 2 app §3.9 applied 9th cumulative S20-S29** (proven IDENTICAL bytes hash check sau edit batch — git diff stat confirm). **Pattern 12-bis cross-module FE cookie-cutter mirror** demonstrated: PE PeWorkspaceCreateView V2 dropdown → Contract ContractCreatePage V2 dropdown clean (same useQuery shape, same Select markup, same filter logic, same POST body wire) — discriminator field ApplicableType=3 swap from `defaultType` (PE 1/2). Reusable pattern future Budget V2 / any cross-module entity với V2 workflow integration. Tag: `[pattern, phase-9, frontend]`.