Files
solution-erp/.claude/workflows/runs/2026-06-18-h10-invest/harvest/invest-synthesis.md
pqhuy1987 8c47bd0f0c
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m36s
[CLAUDE] Docs: adopt Harness-10 — tracked run-trace folder convention + checklist 9-10 (3-workflow invest/imple/review)
Migrate .claude/workflows/wave-*/ (gitignored) -> runs/<run-id>/ git-TRACKED (run.md+sub-md/+harvest/) + _ledger.md 2-beat + 3-layer anti-miss + containment model shift (B6 'any tracked-change=violation' -> 'tracked-change outside run-folder+code-disjoint=violation'). hmw.js wave->run-trace (accept args.run + alias). Review (R2+R3) caught C5 L1 over-claim -> fixed (em-main convention, engine no-fs). 3 run-id: wf_9c2cd2cd-2e7 / wf_e4e46725-231 / wf_636bc95b-939. 0 production code, state unchanged (Mig 53/88 tables/306 test/68 gotcha).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 09:15:51 +07:00

4.4 KiB
Raw Blame History

INVEST synthesis — Harness-10 build spec (em-main single-writer, C4 per-turn)

Workflow wf_9c2cd2cd-2e7 · 4× investigator-codebase. Self-gate: B+C+D xuất sắc, A hỏng (stub rác area:test) — B đã cover trọn hmw.js wiring → bù đủ, KHÔNG cần redo A.

Build plan (2-tier theo recommendation B/C/D)

TIER 1 — MECHANISM (careful, đổi behavior)

1. .gitignore (B/C/D đồng thuận):

  • runs/ ĐÃ tracked qua negation !.claude/** (:83) → KHÔNG cần thêm dòng.
  • :93 .claude/workflows/wave-*/giữ làm legacy (no wave-*/ tồn tại; xóa cũng được nhưng giữ an toàn hơn) + thêm comment "superseded by runs/ (Harness-10, tracked)".
  • :92 verify-comment STALE (wave-x path) → cập nhật sang runs/ + ghi-chú bẫy exit-code (check-ignore exit 0 cho CẢ negation lẫn ignore → dùng && IGNORED || NOT).
  • :94 agent-teams = n-a Windows in-process (giữ).

2. .claude/workflows/hmw.js (rename wave→run, 2-MODE logic GIỮ):

  • :9 meta.description · :19 args doc (wave:{name,dir}run:{name,dir}) · :52 SCHEMA subMdPath · :87-91/:90 WAVE-MODE detect (const waveconst run) · :91/:94 log · :102 subMd path (wave.dirruns/<run-id>/sub-md/<role>-<i>.md) · writeGuard :106-120 (thêm harvest/ path + đổi model wording) · prompt :122-134/:131.
  • 🔴 :112 CRITICAL — đổi "tracked-file đổi NGOÀI code-disjoint = vi-phạm" → "...NGOÀI run-folder + code-disjoint = vi-phạm" (chỉ thiếu chữ "run-folder").
  • C5 Layer1: thêm reminder "run trước OPEN-beat chưa harvest" vào prompt-builder.
  • ⚠️ No hot-reload (:4) → executed-file VERIFIED-pending-restart.

TIER 2 — TEXT (rename + repoint, no logic)

File Đổi
.claude/workflows/README.md (48 dòng) Full rewrite wave→runs convention (run.md+sub-md/+harvest/+ledger 2-nhịp). 🔴 :35 xóa parenthetical STALE "(wave gitignored nên KHÔNG hiện diff = sạch)" → "run-folder TRACKED nên HIỆN diff = audit trực-tiếp". :47 repoint G-015.
session-end.md :51 §L.b(f) wave-gom B5 → VERIFY per-turn harvest đã xong cho mọi runs// + giữ 5-trục GATE làm backstop (C5 L3). 🔴 idempotent: VERIFY không re-APPEND (chống DUPLICATE-HARVEST). :32/:49 repoint.
session-start.md :71 §2.1.1 H2 mở rộng: scan runs/*/ tìm OPEN-beat (ledger closed=) mà harvest/ rỗng = orphan (C5 L2).
agents/README.md :111 decision-tree wave-gom→run-harvest · :162 repoint G-015 containment caveat (wave-gitignored claim giờ false cho runs/).
agents/harvest-curator.md :22-28 scan path wave-<ten>/sub-*.mdruns/<run-id>/sub-md/ · :52 B6 audit repoint · cân nhắc thêm DEDUP axis (:23 5-trục) chống double-APPEND.
agents/tooling-auditor.md :40 wave-gom→run-harvest (giữ H1/H2 split).
agent-memory/harvest-curator/MEMORY.md :13/:20/:26 diary (em-main proxy, low-pri).

NEW machinery (em-main)

  • .claude/workflows/runs/README.md — convention doc (cấu trúc 3-phần + ledger 2-nhịp + 3-layer + caveat C7 trung thực: engine no-fs, scaffold = em-main @P1, 3-layer = lưới KHÔNG khoá-cứng, fragile-point C2).
  • _ledger.md — đã có (2-nhịp).
  • C4 per-turn primary = quy ước em-main: viết harvest/ NGAY sau mỗi fan-out turn (như file này).

RISKS/GUARDS (B+C+D)

  1. 🔴 DO-NOT-EDIT frozen evidence: broadcasts/** · adap-reports/2026-06-07-Agent-harness-2.md · error-ledger.md:86 · docs/changelog/sessions/* · STATUS.md:217-226 · HANDOFF.md:341-365 · agent-memory/*/archive/* + _INDEX.md · inbox/README.md:15.
  2. gitignore last-match-wins (:82-83 negation) — đừng thêm ignore phá runs/.
  3. check-ignore exit-code trap — verify dùng && IGNORED || NOT.
  4. G-015 no-overclaim — TRACKED ≠ read-only-enforced; Bash residual còn; containment = em-main single-writer + git-diff + chunk-count. KHÔNG bỏ chunk-count.
  5. DUPLICATE-HARVEST — per-turn + close-gate: close-gate VERIFY idempotent.
  6. 3 chỗ wording "vi-phạm" phải đồng-bộ: README.md:35 + hmw.js:112 + _ledger.md:4.
  7. Concurrency — fan-out same-role → sub return-delta-only, KHÔNG tự ghi MEMORY chung (race observed run này); 1 sub-MD/role/turn.