human-analyzer
HomeTrang chủ GuidesHướng dẫn Event busEvent bus
ORC · Event BusORC · Event Bus

How MAT.integrated → PSY.refresh → CRE.recalibrate flows, gated and audited Cách MAT.integrated → PSY.refresh → CRE.recalibrate chảy, có gate và kiểm toán

The system is event-driven, not procedural. Each framework emits a named event when its work completes; downstream frameworks react. ORC is the bus — it routes, audits, and cascades. It does not own any domain data, only workflow state in .claude/. Every declared event is verified by orc:audit; any mismatch between the declaration and what actually ran is flagged exit-non-zero. Hệ thống chạy theo sự kiện, không phải thủ tục. Mỗi framework phát một sự kiện khi xong việc; các framework phía sau phản ứng. ORC là bus — định tuyến, kiểm toán, và lan chuỗi. Nó không sở hữu dữ liệu miền nào, chỉ trạng thái workflow trong .claude/. Mọi sự kiện khai báo đều được orc:audit xác minh; bất kỳ sai lệch nào giữa khai báo và thực tế đều bị báo exit khác 0.

Sequence — ORC as bus, not ownerTrình tự — ORC là bus, không phải chủ
orc:cascade --trigger MAT.integrated
❶ MAT.integrated ❷ GRO.assessed MAT GRO ORC the bus — routes, never owns PSY EVL CRE MAT.integrated PSY.refresh EVL.rescore EVL.scored CRE.recalibrate GRO.assessed PSY.refresh EVL.rescore EVL.scored CRE.recalibrate

ORC routes — it never writes to profiles, materials, or assets. Each arrow is a convention (named event), not a code call. ORC định tuyến — không bao giờ ghi vào profile, tư liệu, hay asset. Mỗi mũi tên là quy ước (sự kiện tên), không phải lời gọi code.

Full event catalog Toàn bộ danh mục sự kiện

Events are named {DOMAIN}.{action}. They are conventions for skill-routing decisions — not code calls. Sự kiện được đặt tên {DOMAIN}.{action}. Chúng là quy ước định tuyến skill — không phải lời gọi code.

EventSự kiện Emitted byPhát bởi Trigger conditionĐiều kiện kích Downstream actionHành động tiếp theo
MAT.integratedmat:indexerprocessing_status → "integrated"; CRAAP ≥15/25processing_status → "integrated"; CRAAP ≥15/25→ PSY.refresh + CRE.recalibrate→ PSY.refresh + CRE.recalibrate
MAT.contradictionmat:indexerContradiction detected, severity medium+Phát hiện mâu thuẫn, mức medium+→ PSY.flag → human review or PSY.updated→ PSY.flag → xem xét người dùng hoặc PSY.updated
PSY.refreshpsy:wave / psy:crossrefProfile sections affected by new materialCác mục profile bị ảnh hưởng bởi tư liệu mới→ EVL.rescore + CRE.recalibrate (if voice-relevant)→ EVL.rescore + CRE.recalibrate (nếu liên quan voice)
PSY.updatedpsy:waveProfile file(s) modifiedFile profile bị sửa→ psy:propagate cascade + CRE.recalibrate→ chuỗi psy:propagate + CRE.recalibrate
PSY.crisispsy:crisis-assessCrisis assessment triggeredKích hoạt đánh giá khủng hoảngLog + escalate to user immediately; never cachedGhi log + leo thang ngay tới người dùng; không cache
GRO.assessedgro:competency-map / gro:career-pathCompetency or career assessment completedHoàn thành đánh giá năng lực hoặc sự nghiệp→ PSY.refresh + EVL.rescore + CRE.recalibrate→ PSY.refresh + EVL.rescore + CRE.recalibrate
GRO.mentoredgro:mentoring-trackMentoring session documentedGhi nhận phiên mentoring→ PSY.refresh (mentoring reveals psych insights)→ PSY.refresh (mentoring tiết lộ insight tâm lý)
EVL.rescoreorc:cascadePSY.refresh or GRO.assessed receivedNhận PSY.refresh hoặc GRO.assessed→ evl:score --rescore → EVL.scored→ evl:score --rescore → EVL.scored
EVL.scoredevl:scoreScorecard (re)written under eval/Scorecard được (tái)ghi dưới eval/→ CRE.recalibrate (verdict is a content-angle source)→ CRE.recalibrate (phán quyết là nguồn góc độ nội dung)
CRE.recalibrateorc:cascadeVoice/tone assumptions may be staleGiả định về giọng/tone có thể lỗi thờiReload 3-layer voice architecture from updated profilesTải lại kiến trúc giọng 3 lớp từ profile mới

Domain-boundary rule — one write-root per framework Quy tắc ranh giới miền — mỗi framework một write-root

🔒
Rule 12 — hard: No domain writes outside its boundary. Cross-boundary writes are bugs. The platform_lib/fs_guard write-jail enforces this at runtime — any tool call attempting to write outside the declared root exits with an error before it touches the filesystem. Rule 12 — cứng: Không miền nào ghi ngoài ranh giới của nó. Ghi chéo ranh giới là lỗi. Nhà tù ghi platform_lib/fs_guard ép điều này lúc chạy — bất kỳ lời gọi tool nào cố ghi ngoài root khai báo đều bị thoát lỗi trước khi chạm filesystem.
DomainMiền Writes to (write-root)Ghi vào (write-root) Reads fromĐọc từ
MATdocs/materials/{character}/Raw source files onlyChỉ file nguồn thô
PSYdocs/profiles/ · docs/references/ · docs/graph/docs/materials/ (read-only after MAT)(chỉ đọc sau MAT)
GROdocs/profiles/*/growth/profiles + materials (read-only)profile + tư liệu (chỉ đọc)
EVLdocs/profiles/*/eval/ · docs/rubrics/profiles + materials (read-only); never CREprofile + tư liệu (chỉ đọc); không bao giờ CRE
CREassets/profiles (read-only), materialsprofile (chỉ đọc), tư liệu
ORC.claude/ (workflow state, session, cache)(trạng thái workflow, phiên, cache)All domains — orchestration only, no editsTất cả miền — chỉ điều phối, không sửa

Cascade resolution — orc:cascade Giải chuỗi cascade — orc:cascade

orc:cascade — what it doesorc:cascade — chức năng

Given a trigger event (e.g. MAT.integrated), orc:cascade walks the event graph, determines which downstream skills must fire, checks for pending contradictions, and emits a sequenced execution plan. It handles idempotency — the same event fired twice does not double-process (session state is checked before acting). Với sự kiện kích (vd. MAT.integrated), orc:cascade duyệt đồ thị sự kiện, xác định các skill phía sau phải kích, kiểm tra mâu thuẫn đang chờ, và phát kế hoạch thực thi có thứ tự. Nó xử lý idempotency — cùng một sự kiện bắn hai lần không được xử lý kép (trạng thái phiên được kiểm trước khi thực hiện).

Multi-step workflow guardsBảo vệ workflow nhiều bước

  • No concurrent domain writes — PSY updating a profile blocks CRE until PSY.updatedKhông ghi miền đồng thời — PSY đang cập nhật profile chặn CRE đến khi PSY.updated
  • Contradiction ceiling — safety-relevant contradiction stops all automation, surfaces to userTrần mâu thuẫn — mâu thuẫn liên quan an toàn dừng mọi tự động, đưa lên người dùng
  • Stale-voice guard — if last material integration is newer than last PSY refresh, force CRE.recalibrateBảo vệ voice lỗi thời — nếu tích hợp tư liệu mới hơn refresh PSY gần nhất, ép CRE.recalibrate

orc:audit — the exit-0 invariant orc:audit — bất biến exit-0

orc:audit --domain all verifies that every event declared in the skill catalog matches what was actually recorded in the event log. Declared events that have no corresponding log entry — or log entries that have no skill declaration — both cause exit non-zero. This is not telemetry; it is a hard correctness gate. orc:audit --domain all xác minh rằng mọi sự kiện khai báo trong danh mục skill đều khớp với những gì thực sự được ghi trong event log. Sự kiện khai báo không có entry log tương ứng — hoặc entry log không có khai báo skill — đều khiến exit khác 0. Đây không phải telemetry; đây là gate đúng đắn cứng.

Live audit outputĐầu ra audit thật
Run in Claude Code:Chạy trong Claude Code:/orc:audit --domain all
orc:audit --domain all
  ✓ Skill count assertion PASS: 68 framework skills (matches CLAUDE.md)
  Routable events: 15  |  Loggable: 34
  Hard violations (C1-C4): 0
    ✓ Referential integrity holds — routable ⊆ loggable, emits/path-map ⊆ routable, declared emits loggable
  Doc-sync advisories (C5-C6): 4
    · [C6] CRE.blocked: rules-12 conceptual convention, not wired as loggable/routable (informational)
    · [C6] MAT.analyzed: rules-12 conceptual convention, not wired as loggable/routable (informational)

Exit 0 means declared == actual. Any mismatch is a bug, not a warning. Exit 0 nghĩa là khai báo == thực tế. Bất kỳ sai lệch nào là lỗi, không phải cảnh báo.

End-to-end test — the full cascade in a single run Kiểm thử đầu-cuối — toàn bộ cascade trong một lần chạy

e2e harness outputĐầu ra harness e2e
python3 tests/e2e/run_e2e.py --leg deterministic
run_e2e.py --leg deterministic
[FINDINGS] PSY · health-check · completeness
[OK      ] PSY · crossref · timeline (dim 1)
[OK      ] PSY · crossref · bidirectional refs
[OK      ] PSY · crossref · extract events
[OK      ] PSY · timeline-sync
[FINDINGS] GRO · validate growth
[OK      ] GRO · competency gather
[OK      ] MAT · indexer · coverage gaps
[OK      ] MAT · indexer · stale materials
[OK      ] MAT · loader · inventory
[OK      ] MAT · loader · dup detection
[FINDINGS] CRE · humanize · scan ai-tells
[OK      ] CRE · privacy-guard · scan assets
[OK      ] CRE · privacy-guard · confidential names
[OK      ] EVL · validate · all rubrics
[OK      ] EVL · validate · scorecard invariants
[OK      ] LIB · verdict_cache · crisis is never-cached
[OK      ] LIB · verdict_cache · store+hit a verdict
[OK      ] LIB · preferences · read knobs

→ 19/19 steps OK · 7 frameworks · synthetic fixture · exit 0
7
frameworks · 1 event bus (ORC)framework · 1 event bus (ORC)
10
named domain events in catalogsự kiện miền trong danh mục
3
quality gates before publishcổng chất lượng trước đăng
0
cross-domain direct writes allowedghi chéo miền trực tiếp được phép