Files
solution-erp/.claude/agent-memory/investigator/MEMORY.md
pqhuy1987 540098347d [CLAUDE] Memory: S32 wrap — 4 sub-agent MEMORY append S32 wrap entry (em main proxy)
4 sub-agent MEMORY append S32 wrap entry FIFO top:
- Investigator (20.6KB): S32 startup verify spawn + NamGroup audit pre-flight hit
  limit + em main solo audit fallback findings + Plan G 11 module DOCUMENTED.
  Pending S33 spawn: Plan G-H1 NamGroup TblNhanVien* audit (priority high).
- Implementer (29.2KB): S32 startup verify spawn + em main proxy curate 5
  entries S25-S29 -> q2. Patterns 1-19+12-bis+16-bis foundation preserved.
  Pending S33 spawn: Plan G-H1 6-entity scaffold + Plan B-Wrap BW1-BW7 codegen
  + Plan G-O2 BookingCalendar + Plan G-O3-O6 workflow apps mirror PE V2.
- Reviewer (26.5KB): S32 startup verify spawn (self-curated S27 retro dropped).
  Smart Friend 4x cumulative preserved. Pending S33 spawn: Plan B-Wrap test
  bundle adversarial review + Plan G-H1 Mig 34 schema pre-commit + Phase 9 UAT
  hard blocker security audit.
- CICD Monitor (26KB): S32 startup verify spawn + Run #231 PARTIAL detail
  archived q2. No new Run S32 (5 commits docs-only CI skip). 3 prod endpoint
  smoke 200 OK preserved. cert notAfter 2026-07-23 verified. Pending S33
  spawn: Phase 10.1 G-H1 first code commit Run verify + Plan B-Wrap test
  count delta + V2 contract create flow UAT smoke.

Re-ingest stats: 166 files -> 2991 chunks (+3 delta S32 wrap content). Cache
hit 11.4s vs initial 75.7s = 6.6x speedup post Plan A2.
RAG eval v1.1 verify: recall@5=1.000 (11/11) PASS, avg_rerank ~0.84 preserves
S31 baseline. Negatives q12-q14 correctly excluded (rerank 0.40-0.43 < 0.7).

Refs: docs/STATUS.md S32 wrap. docs/HANDOFF.md S32. migration-todos.md
§Phase 10 + §D-Bis + §A + §E.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:49:28 +07:00

20 KiB
Raw Blame History

Investigator Agent — Persistent Memory

Persistent diary cross-session. Auto-injected first 200 lines / 25KB at spawn. Update BEFORE every stop. Curate when > 25KB.


🎯 Role baseline

Read-only research + audit for SOLUTION_ERP codebase. Tools: Read, Grep, Glob, Bash, WebFetch, WebSearch. Output: concise structured findings under 500 words.


📋 Patterns proven (cross-session)

Pattern: Smoke verify catalog SOLUTION_ERP

  • Bearer auth từ https://api.solutions.com.vn/api/auth/login (POST email + password)
  • Status code matrix expected vs actual + JSON output + MD audit
  • Test credentials: admin@solutions.com.vn / Admin@123456 (full) OR nv.test@solutions.com.vn / TestUser@123456 (Drafter UAT scope)

Pattern: Schema scan via sqlcmd

# LocalDB Dev (runtime — primary)
sqlcmd -S "(localdb)\MSSQLLocalDB" -d SolutionErp_Dev -Q "..."

# LocalDB Design (ef tooling)
sqlcmd -S "(localdb)\MSSQLLocalDB" -d SolutionErp_Design -Q "..."

# Production (qua SSH vietreport-vps)
ssh vietreport-vps "sqlcmd -S .\SQLEXPRESS -d SolutionErp -U vrapp -P '...' -Q '...'"

Common queries: sys.columns, sys.triggers, __EFMigrationsHistory, COUNT(*), sys.indexes.

Gotcha: 2 LocalDB distinct (memory feedback_designtime_runtime_db):

  • _Dev — runtime API (appsettings.Development.json ConnectionStrings:Default)
  • _Designdotnet ef migrations add/update default target
  • Use --connection "Server=(localdb)\MSSQLLocalDB;Database=SolutionErp_Dev;..." override khi cần Dev specifically.

Pattern: Controller audit

  • Grep \[Route\("api/[a-z]+"\)\] enumerate ~30+ controllers
  • Grep \[Authorize(Policy = "..." audit per-action policy (gotcha #44 silent 403 class-level quá strict)
  • Grep IActionResult vs ActionResult<T> — typed return preferred
  • Grep // Mock / alert( / setEditing(null) // close UI — wire claim bugs

Pattern: Memory cross-reference

19 memory entries tại C:\Users\pqhuy\.claude\projects\D--Dropbox-CONG-VIEC-SOLUTION\memory\ (S20 +2 turn 11/12, S21 +2 turn 5):

  • MEMORY.md — index
  • project_solution_erp.md — cumulative narrative S1-S17
  • feedback_per_chunk_commit.md — 5-chunk A-E discipline
  • feedback_uat_skip_verify.md — Phase 9 skip test rule
  • feedback_drastic_refactor_scope.md — defer dedicated session
  • feedback_audit_reuse_before_clone.md — audit-first pattern (Investigator natural fit)
  • feedback_service_hook_vs_endpoint.md — derived state hook pattern
  • feedback_n_stage_workflow_pattern.md — DEPRECATED (Mig 21 flat workflow replaced)
  • feedback_designtime_runtime_db.md — 2 LocalDB distinct
  • feedback_md_compact_narrative.md — §6.5 KEEP narrative rule
  • feedback_unittest_timing.md — §7 test timing
  • feedback_cron_monthly_limitation.md — Cron SDK 7-day expire
  • feedback_user_manual_style.md — non-tech docs style
  • feedback_node_cicd.md — Node 20.x pin
  • feedback_responsive_laptop_breakpoint.md — 4-tầng responsive pattern (S20 t11)
  • feedback_multi_agent_setup.md — 4 sub-agents setup discipline (S20 t12 init 3 + S21 t1 +cicd-monitor)
  • feedback_rag_hybrid_pattern.md — RAG Hybrid Cách A planning (S21 t2, 5 dự án future)
  • feedback_ef_migration_backfill_reorder.md — ADD→BACKFILL SQL→DROP manual reorder (S21 t5 Mig 29)
  • feedback_per_nv_permission_scope.md — Multi-role flag split scope per role (Approver Level vs Drafter User), S21 t4→t5 refactor
  • reference_session_prompts.md — canonical session start template

Pattern: External research priority sources

  • anthropic.com/engineering/ (official patterns)
  • cognition.ai/blog/ (Devin lessons)
  • philschmid.de + eugeneyan.com + hamel.dev (senior engineers)
  • learn.microsoft.com/en-us/aspnet/core/ (.NET 10 official)
  • tanstack.com/query/latest (TanStack Query)

⚠️ Anti-patterns observed

  • Skip MEMORY.md update before stop — lose knowledge tài sản
  • Vague conclusion "seems like" / "probably" — em main rejects
  • Missing file:line refs — non-verifiable evidence
  • Exceed 500 words — em main reads too slow
  • Scope drift to architectural recommendations — em main decides, not me

🧠 SOLUTION_ERP context essentials (auto-load)

  • DB Dev: SolutionErp_Dev LocalDB (59 tables / 30 migrations / Mig 30 latest AddAllowApproverEditBudgetToLevels)
  • DB Design: SolutionErp_Design (ef tooling distinct)
  • DB Prod: .\SQLEXPRESS / SolutionErp / vrapp user via SSH vietreport-vps (fallback C:\inetpub\solution-erp\api\appsettings.Production.json khi $env:PROD_DB_PASSWORD empty — CICD Monitor discovery S21 t5)
  • Tech stack: .NET 10 Clean Arch (Api → Application ← Domain + Infra) + CQRS MediatR + EF Core 10 + 2 React 19 Vite 8 TS 6 (fe-admin :8082 + fe-user :8080) + SQL Server + Gitea Actions CI + IIS prod
  • Live deploys (Prod UAT): https://api.solutions.com.vn · https://admin.solutions.com.vn · https://eoffice.solutions.com.vn
  • Gitea remote: https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp
  • Gitea Actions API: path /api/v1/repos/.../actions/tasks (NOT /actions/runs — 404). Cache stale ~2 min (gotcha #46) — cross-check VPS file mtime
  • SSH VPS: ssh vietreport-vps (config ~/.ssh/config user=Administrator key=id_ed25519)
  • Gotchas active: 47 (+1 #48 SQLite tie-break pending docs — Plan AB Chunk A2 S25 t1; reference docs/gotchas.md)
  • Tests baseline: 111 PASS (S22 baseline 104 + 7 PE WF cumulative; S25 Plan M tests SQLite tie-break re-stabilized Chunk A2) — Phase 9 UAT skip per chunk (memory feedback_uat_skip_verify)
  • Endpoints: ~146 (S22 +3 stable: PATCH /users/{id}/allow-skip-final + PATCH /pe/{id}/budget-adjust + GET /pe/{id}/attachments/{attId}/view)
  • Memory user-level: 23 entries (+2 S25: Plan AC2 FE merge synthetic recovery + Plan AF userMap fallback patterns)
  • Users: 30 demo + 33 active prod (13 cũ + 20 mới S22+2 role-based: act/bod/equ/fin/hra/pm/qs prefix .nv/.pp/.tp + bod.1/2). Password policy ≥12 chars (S22+2 discovery, TestUser@2026)
  • API auth response: accessToken + refreshToken + user (S22+2, NOT token)
  • Master HEAD reference: check via git log -1 --format='%H'
  • 6 skills: contract-workflow · permission-matrix · form-engine · ef-core-migration · dependency-audit-erp · iis-deploy-runbook

🔄 Active workflow schemas (V1 + V2 coexist post-Session 17)

  • V1 Mig 21 flat workflowWorkflowDefinition pin với PE/Contract cũ. Match Dept+PositionLevel.
  • V2 Mig 22-30ApprovalWorkflow pin với PE mới + match ApproverUserId 1-1 OR-of-N cùng Cấp. Steps (Phòng) > Levels (Cấp). PE đã wire V2. Contract V2 PENDING (Plan F drop V1 ABORTED S22+4 — Contract entity HOÀN TOÀN V1 chưa wire V2 + 4 PE V1-only + 19 PE V1+V2 mix).
    • Mig 25 IsUserSelectable (admin pin/unpin per workflow cho user pick)
    • Mig 26 PE Level Opinions UPSERT (service hook khi Duyệt)
    • Mig 28 (S21 t4) 6 Allow* workflow-level — REPLACED by Mig 29
    • Mig 29 (S21 t5) Allow* refactor per-NV: 5 flag on ApprovalWorkflowLevels (F1+F3 per Approver slot) + 1 flag on Users.AllowDrafterSkipToFinal (F2 per Drafter)
    • Mig 30 (S22+5) F4 AllowApproverEditBudget per-Level slot on ApprovalWorkflowLevels — admin Designer tick per slot cho Approver được edit Budget khi review. Pattern reinforced 2× với Mig 29 F1+F3: default = admin opt-in per slot, KHÔNG = mở rộng default. Cross-ref memory feedback_per_nv_permission_scope.md proven cumulative Mig 29 + Mig 30.

State machine 5 trạng thái phiếu PE: Nháp / Đã gửi duyệt / Trả lại (TraLai=98) / Từ chối / Đã duyệt.

Mode Trả lại 4 option per-Level (S21 t4-t5 Mig 28→29):

  • OneLevel = lùi 1 Cấp cùng Step (peer review)
  • OneStep = lùi sang Bước trước Cấp cuối
  • Assignee = pick NV đã ký runtime (PeLevelOpinions)
  • Drafter = Phase=TraLai clear pointer (S17 backward compat default TRUE)

3 mode đầu giữ Phase=ChoDuyet lùi pointer. Mode Drafter giữ Phase=TraLai. Admin bypass level.Allow* flag.


📅 Recent activity (last 10 FIFO)

  • 2026-05-26 (S32 wrap — em main proxy update final state): Session 32 đóng clean. Em chủ trì spawn em 2 lần S32: (1) startup verify ~10K (afaf6d52a6a59a844 alive) + (2) NamGroup audit pre-flight ~30K (a533c3e8ed4e03bfe hit limit 157K/72 tool_uses fallback em main solo audit). Em main solo audit NamGroup directly thay vì re-spawn: discovered NAMGROUP.Server\Data\Entities có 8+ TblNhanVien* (QtCongTac/QtDaoTao/QuanHeThanNhan/KyNangViTinh) + 4 bảng org chart (SoDoToChuc/SoDoKhoi/ChucDanh/ViTri) + Announcement/InternalDocument/TblMenu. Plan G 11 module port DOCUMENTED migration-todos với 4 quyết định chốt anh main (FULL 11 module + dbo single + Workflow V2 enum +5 + chunk per-module Plan riêng). S33 priority spawn em pre-flight Plan G-H1 Hồ sơ NS audit NamGroup TblNhanVien* 8 bảng + map fields → SOL EmployeeProfile schema (Mig 34 design 1 main + 5 satellite WorkHistory/Education/FamilyRelation/Skill/Document) — scope narrower 30 phút mục tiêu. Curate Plan A3: MEMORY archived 4 verbose entries q2 (S25 t1 5Q audit Bug Changelog + S26 Plan AG 5Q + S26 Plan AI RAG research + Plan B Contract V2 Q1-Q5 audit detail) → 27.7→19KB. Pending tasks anh main S33 SendMessage gọi em: (a) Plan G-H1 pre-flight NamGroup TblNhanVien* audit (PRIORITY HIGH first thing S33); (b) Plan B-Wrap test bundle pre-flight verify ContractWorkflowService ApproveV2Async test scenarios spec D-Bis trong migration-todos; (c) Phase 9 UAT smoke verify V2 contract create flow post-S29 deploy QT-HD-V2-001 workflow. Token cost wrap ~5K. Tag: [wrap, phase-9-to-phase-10, infra].

  • 2026-05-26 (S32 startup — em main proxy verify context + S31 RAG v1.3 baseline awareness): S31 đóng ~1.5h ngày 2026-05-26 với RAG v1.3 baseline PASS recall@5=1.000 (11/11 queries) + avg_rerank=0.847. Root cause S31 fix: AI_INFRA/claude-rag/lib/retrieval.py xài API cũ qdrant.search() đã bị qdrant-client 1.18 xóa → đổi sang query_points().points API mới. Gotcha #52 NEW add vào docs/gotchas.md (Qdrant search removed). Downstream impact: MCP tools mcp__rag-unified__search_memory + mcp__rag-unified__cross_project_search live PASS post-CLI restart — test query "gotcha 52 qdrant search removed" top_k=3 trả 3 chunks rerank scores 0.515 / 0.479 / 0.461 (all dưới threshold 0.7 cao mong đợi vì query về symbol qdrant.search chỉ match doc rag-setup-plan.md historical, KHÔNG match gotcha #52 doc — doc chưa indexed lần re-index gần nhất hoặc chưa ingest gotchas folder). Memory size 25.8 KB ĐÃ VƯỢT curate trigger 25KB — em append entry này + flag em main curate cuối S32 (archive S25 + S26 verbose entries → archive/2026-05-q2.md). Pending tasks anh có thể spawn em qua SendMessage: (a) Plan B-Wrap test bundle BW1-BW7 (regression ApproveV2Async Contract V2 + ApplicableType=3 validate), (b) Phase 9 UAT audit Contract V2 wire prod usage (V1 7 contract + V2 sample QT-HD-V2-001 smoke verify), (c) gotcha #52 doc verify trong RAG index (cross-check docs/gotchas.md đã re-ingest sau S31 fix chưa). State delta S29 → S32: 30 mig → 33 mig (Plan B Contract V2 Mig 32+33 + Plan CA role CatalogManager) · 59 → 60 tables · ~146 → ~148 endpoints · gotcha 47/48 → 52 (+4 #49 Plan B + #50 Plan CA INFRASTRUCTURE seed gate + #51 + #52 Qdrant) · 111 test PASS UNCHANGED (UAT defer test-after) · 23 → 25 memory user-level. Token cost spawn này ~10K.

  • 2026-05-22 (S29 wrap — Plan CA + Plan B pre-flight 2 spawns + 3 patterns NEW): S29 close 2 big plans cumulative. Plan CA (Move Cấu hình danh mục admin → eoffice) 7 commits 06a441c..6eec8d7 push deployed Run #229+#230 PASS. Plan B (Contract V2 wire mirror PE V2 pattern Mig 22-26) 11 commits 58898e8..38f1c4d push deployed Run #231+#232 PASS. Investigator role 2 spawn: (1) Plan CA pre-flight audit (agentId a7ab5576c77ee3730, ~15K token): map 9 menu danh mục terrain + GOTCHA tree-inherit Catalogs↔Master + recommend chunk structure A/B/C/D. fe-user component parity verified (DataTable + PageHeader + PermissionGuard + 6 shadcn ui). DbInitializer SeedAdminPermissionsAsync admin role grant CRUD 27 menu key. Permission Matrix dynamic load /api/menus → tự reflect post-move. (2) Plan B pre-flight audit Contract V1 state (agentId abf91b30391fb0cdb, ~25K token): map Contract.cs 25 fields (V1 only) + ContractPhase enum 12 values (TraLai=98 + TuChoi=99 ready) + ContractWorkflowService.cs 220 LOC V1 only + sqlcmd prod 7 V1 contract (Phase 2-8 active workflow) + PE Mig 22-26 reference templates + impact assessment (COEXIST V1+V2, KHÔNG drop V1) + re-chunk 6 chunks (split A → A1 entity + A2 mig). 3 surprise: ApprovalWorkflows Prod ZERO ApplicableType=3 (Chunk A2 must seed sample) + RejectedAtStepIndex drift deprecated + ContractType 7 variants generic ApplicableType=3. Patterns proven NEW Investigator perspective S29: (a) 9-menu permission terrain map pattern (Plan CA) — Investigator inventory file paths + line ranges + component parity check + recommend chunk before delegate Implementer. ROI cao. (b) V1+V2 coexist boundary (Plan B) — KHÔNG drop V1 vì 7 prod contract pinned. Mirror PE Mig 22-24 spec. (c) Reference template paths cross-module mirror (PE → Contract V2): Investigator cite EXACT line ranges (PE Mig 23:14-31, Mig 24:14-17, Mig 26 UNIQUE composite, Service ApproveV2Async 446-634, 519-546 UPSERT, 774-783 ResolveActor) → em main + Implementer chỉ cần mirror rename entity. ROI rất cao saving 30%+ time. Anti-patterns observed: (a) Investigator KHÔNG verify endpoint exists end-to-end qua live curl — defer to CICD Monitor stage 4. (b) Investigator output sometimes verbose >700 words → em main hỏi cô đọng <500 next time.

  • Archived 4 verbose entries S25-S26-S29 → archive/2026-05-q2.md 2026-05-26 S32 curate: S25 t1 5Q audit Bug Changelog detail + S26 Plan AG 5Q PE List tree view + S26 Plan AI RAG 4 study cases (Cursor/Cline/Continue/Sourcegraph) + Plan B Contract V2 Q1-Q5 audit detail. KEY recommendations preserved in S29 wrap entry above (Plan B re-chunk 6 chunks pattern + ApplicableType=3 ZERO Prod seed flag + PE Mig 22-26 reference template paths).

  • 2026-05-22 (S28 wrap — Layer A governance internalized + tag schema mandatory forward): S28 5-turn arc t1 RAG ROI verdict → t2 over-reach mistake → t4 bro caught → t5 Layer A active. Investigator agent absorb 3 rules forward: (1) Tag schema mandatory every RAG ingest [<type>, phase-<N>, <bc-or-module>] — type ∈ {bug, plan, audit, schema, ui-pattern, decision, retrospective, gotcha-doc}; phase enum 11 (phase-9 UAT current); bc/module 8 domain {contract, pe, budget, master, identity, forms, notifications, audit-log} + 5 cross-cutting {cicd, infra, rag, governance, deploy}. (2) 4-category default + skip list — skip ephemeral state ("S28 t3 startup ngày 22"), pure file paths không context, single-file < 5-line edit confirmation. Investigator output report tags MUST include all 3. (3) NO self-authorize cross-project rule — lesson S28 t4: stay scope-down SOLUTION_ERP self-discipline, don't generalize policy without bro consent. Pre-flight audit query patterns Layer A §6.2 internalized: Pattern A lookup_gotcha_<id> (top_k=3, narrow), Pattern B verify_precedent_pattern_X (top_k=3 thay default 10 — broad similarity rerank surface 3 best matches), Pattern C find_code_symbol_<class.method> (top_k=5, symbol-anchor). Weekly Friday eval ritual: Investigator support Plan B Contract V2 wire pre-flight audit kick-off khi bro launch. Cumulative audit checklist (foundation cicd-monitor MEMORY S22+5→S23 t6 10-surface-point per-NV): (a) Contract entity V1 state inspect Domain/Contracts/Contract.cs + WorkflowDefinitionId, (b) Mig 22-23/26 PE V2 mirror reference confirm pattern reusable, (c) 4 PE V1-only audit migrate gap (per memory S22+4 Plan F ABORT), (d) 7 V1 contract scope drop boundary, (e) verify 10-surface-point per-NV checklist S22+5 cumulative reusable Contract V2 wire trước Mig 32 schema design. source_path convention output: solution_erp/audit/investigator-<topic>-<date> standardized cho tag schema BC=pe or contract switch per task. Lesson abandoned: S28 t2 "ghi RAG mọi tương tác" rule ABANDONED — Investigator KHÔNG mass-ingest, only specific findings with full tag schema. Audit retroactive S20-S26 "Investigator spawn" claims (memory log discrepancy registry NOT loaded vs token cost ghi 28-40K) defer S28+ priority #4 — uncertainty preserve cross-session, không retract memory unverified.

  • 2026-05-22 (S27 wrap-up em main proxy - retrospective Investigator): Investigator pre-flight CRITICAL miss: nếu spawn pre-Plan A.3 (RAG manual control build) → would have catch Qdrant Web UI static missing PRE-em main write rag-dashboard.ps1 link localhost:6333/dashboard. Pattern reinforced: pre-flight infrastructure audit MUST spawn Investigator trước khi em main claim "X work" trong docs. Em main S27 SOLO miss external dependency check (Qdrant Web UI separate repo from binary). Anh pqhuy catch via UAT browser → escalate.

    Audit cumulative S20-S26 memory log entries claiming "Investigator spawn" - re-verify retroactive: Per pitfall confirm spawn investigator agent type NOT FOUND trong session S27, có nghĩa registry chưa bao giờ load trong session này. Nhưng memory log S23 t1 K0 + S25 t1 audit Bug 1+2 + S26 Plan AG audit 5Q + Plan AI RAG research đã ghi "spawn Investigator" với token cost 28-40K. Possibility: (a) Previous sessions có registry load thành công (Claude Code version cũ hơn / file format khác / hot-reload sau /agents UI invoke), hoặc (b) Em main misattribute - actually spawn general-purpose agent default. Cần audit history Claude Code logs để xác minh - ngoài scope S27. For now: trust prior memory entries but FLAG uncertainty cho future investigation.

  • 2026-05-22 (Curate session em main): Archived 10 verbose Recent activity entries S21 → S24 Plan AA → archive/2026-05-q1.md. KEEP: S25 Bug audit + wrap, S26 Plan AG + Plan AI RAG, 2026-05-11 setup. Patterns proven section + Active workflow schemas section preserved. Memory size before: 34.9 KB → after: target ~20-22 KB.

  • 2026-05-19 (S25 wrap — Plan AB Bug 1+2 audit + 6 follow-up plans em main solo): Pre-Plan AB audit ~28K confirm root cause: Bug 1 Budget Adjust Handler ĐÃ log Changelog (Header+Update) nhưng FE HistoryTab filter strict TraLai-only loại. Bug 2 ApplyReturnModeAsync 4 mode KHÔNG add Changelog.Add() — chỉ caller LogTransitionAsync log phase transition. Recommended fix path: BE add log return mode + FE filter relax + Decision badge differentiation. Em main solo từ Plan AC (cross-stack reasoning Implementer would REFUSE). Patterns reusable Contract V2 audit recovery + Budget changelog UI: synthetic recovery FE merge + userMap fallback + drop misleading badges + preventive batch fix systemic gap. CICD result: 7 commits e23f51c..506cada push remote, runs #215 FAIL Plan M tests SQLite tie-break re-emerge → #216-#221 PASS streak. Gotcha #48 SQLite tie-break pending docs.

  • 2026-05-11 (setup): Investigator agent initialized. Baseline knowledge load complete (44 gotchas + 14 memory entries + 6 skills + 27 mig + 81 test pass cumulative). No investigations performed yet. Awaiting first SendMessage from em main.


🔄 Curate trigger

  • Memory size > 25KB → archive recent entries to archive/<period>.md
  • Duplicate entries detected → merge
  • Stale > 3 months → remove

Last curate: 2026-05-26 S32 em main proxy curate (post-S31 RAG fix) — archived 4 verbose entries (S25 t1 5Q audit detail + S26 Plan AG 5Q + S26 Plan AI RAG research + Plan B Contract V2 Q1-Q5 audit detail) → archive/2026-05-q2.md. KEEP: S32 startup (latest), S29 wrap summary, S28 Layer A governance, S27 retrospective, S25 wrap summary, S22 curate session, S11 setup baseline. Patterns + Active workflow schemas foundation preserved untouched. MEMORY size before: 27.7 KB → after: target ~21 KB. Previous curate: 2026-05-22 — archived 10 verbose (S21 → S24 Plan AA) → archive/2026-05-q1.md. Next trigger: > 25KB OR Plan G-H1 kick off.