làm tíai?GitHub ↗
CHƯƠNG 19 / 33

Dự án 04. Sử dụng Phản hồi Runtime để Điều chỉnh Hành vi Agent

Thêm observability runtime (log khởi động, log import/indexing, trạng thái lỗi) và các ràng buộc kiến trúc để ngăn chặn vi phạm xuyên lớp. Cài một lỗi runtime để agent sửa.

2 phút đọc

English Version → | 中文版本 →

Bài giảng liên quan: Bài 07. Vạch ranh giới tác vụ rõ ràng cho agent · Bài 08. Sử dụng feature list để ràng buộc những gì agent làm Tệp mẫu: templates/

Bạn Làm Gì

Thêm observability runtime (log khởi động, log import/indexing, trạng thái lỗi) và các ràng buộc kiến trúc để ngăn chặn vi phạm xuyên lớp. Cài một lỗi runtime để agent sửa.

Bạn chạy hai lần: lần đầu không có log hoặc ràng buộc, lần hai với các công cụ và quy tắc phù hợp.

Dùng project có sẵn trong repo

Đường dẫn repo: projects/project-04/

Thư mụcNội dungSo sánh gì
starter/Code Project 03 với tín hiệu chẩn đoán yếu. Lỗi indexing được cài sẵn có thể làm hỏng chunking file lớn, và không có script kiểm tra kiến trúc.Agent mất bao lâu để tìm root cause khi thiếu runtime signals.
solution/Structured logger, tài liệu/script ranh giới kiến trúc, logic chunking đã sửa và clean-state-checklist.md.Logs và boundary checks có giúp sửa nhanh hơn, ít xâm lấn hơn không.

File cần xem: projects/project-04/solution/src/services/logger.ts, projects/project-04/solution/scripts/check-architecture.sh, projects/project-04/solution/docs/ARCHITECTURE.md, projects/project-04/solution/src/services/indexing-service.ts.

Công cụ

  • Claude Code hoặc Codex
  • Git
  • Node.js + Electron

Cơ chế Harness

Phản hồi runtime + kiểm soát phạm vi + indexing tăng dần

Nguồn của chương

Nội dung của WalkingLab theo giấy phép MIT; đây không phải tài liệu chính thức của Anthropic.

WalkingLab source

Giấy phép nội dung

MIT License

Copyright (c) 2025 WalkingLab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Trở về mục lục