Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the stack documentation and enhances the SDLC Agent pipeline with artifact/task tracking and an automated Clarifier-driven re-generation loop, while also hardening artifact extraction path handling.
Changes:
- Document overhaul: expanded README with architecture, setup steps, and full API curl references.
- Agent workflow enhancements: TL task-board extraction + file planning coverage + Task Completion Checklist, plus Clarifier Regen Loop support.
- Artifact system hardening: improved path sanitization / confinement checks and extraction documentation.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Major documentation expansion (setup, env vars, API references, operations, troubleshooting). |
| rag-api/ingest.py | Docstring expansion/clarification for ingest pipeline behavior and metadata. |
| rag-api/graph.py | Docstring expansion/clarification for Neo4j GraphRAG design and behavior. |
| rag-api/app.py | Docstring expansion and clearer notes around runtime behavior (timeouts, retries). |
| open-webui-tools/yan_knowledge_base.py | Expanded tool documentation (plus a minor typo introduced). |
| open-webui-tools/yan_agent_workflow.py | Expanded tool documentation (plus a minor typo introduced). |
| docker-compose.yml | Adds CLARIFIER_REGEN_LOOPS to agent-api environment. |
| agent-api/workflow.py | Adds TL task parsing, artifact multi-turn planning, checklist generation, and Clarifier regen list parsing. |
| agent-api/artifacts.py | Strengthens artifact path sanitization and improves documentation/comments. |
| agent-api/app.py | Implements Clarifier Regen Loop in background workflow runner. |
| agent-api/agents.py | Expands prompts/conventions; introduces a breaking config bug (missing rag_query_hint field). |
| .env | Switches the default active model configuration set (uncomments “Option 3”). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
109
to
121
| @@ -68,10 +113,11 @@ class AgentConfig: | |||
| name: str | |||
| model: str | |||
| system_prompt: str | |||
| # Output của các bước trước cần chèn làm context (theo thứ tự phụ thuộc) | |||
| # Danh sách role phải chạy xong trước — output của chúng sẽ được rút gọn | |||
| # và chèn vào context trước khi gọi LLM của agent này. | |||
| depends_on: list[str] = field(default_factory=list) | |||
| # Gợi ý truy vấn RAG riêng cho từng role (cải thiện độ chính xác retrieval) | |||
| rag_query_hint: str = "" | |||
| # Chuỗi gợi ý truy vấn RAG riêng cho từng role. Thay vì dùng nguyên user_input, | |||
| # rag-api sẽ nhận chuỗi này để lấy context chính xác hơn cho từng vai trò SDLC. | |||
|
|
|||
Comment on lines
+501
to
+520
| seen: set[str] = set() | ||
| roles_ordered: list[str] = [] | ||
|
|
||
| for line in section_text.split("\n"): | ||
| if "|" not in line: | ||
| continue | ||
| cells = [c.strip().lower() for c in line.split("|") if c.strip()] | ||
| if not cells: | ||
| continue | ||
| # Bỏ qua dòng kẻ phân cách Markdown (---) và dòng tiêu đề bảng. | ||
| if all(set(c.replace("-", "").replace(":", "").replace(" ", "")) <= {"-", ":", "|"} for c in cells): | ||
| continue | ||
| # Quét từng cell để tìm tên role hợp lệ bằng word-boundary regex, | ||
| # tránh khớp nhầm tên role con trong tên role khác (ví dụ: "be" trong "devsecops"). | ||
| for cell in cells: | ||
| for role in _REGEN_ELIGIBLE_ROLES: | ||
| if role not in seen and re.search(rf"\b{re.escape(role)}\b", cell): | ||
| seen.add(role) | ||
| break | ||
|
|
Comment on lines
+458
to
+460
| else: | ||
| status = "⏳ Addressed in output" | ||
| files_label = "—" |
| description: Query nội bộ — hỏi đáp từ các tài liệu PRD, spec, architecture đã ingest vào Qdrant qua rag-api. | ||
| Hỗ trợ filter theo project và module để tăng độ chính xác retrieval. | ||
| description: > | ||
| Tool hỏi đáp tài liệu nội bộ qua RAG API. Cho phép chạt trực tiếp |
| Khởi chạy full workflow 15 bước, poll đến khi hoàn tất, | ||
| trả về summary kết quả (status, thời gian, output mỗi bước). | ||
| Tham số: | ||
| user_input Mô tả yêu cầu / mục tiêu kiếnh doanh. Bắt buộc. |
| # ─── Bảo mật — bắt buộc đổi trước khi deploy ───────────────────────────── | ||
| # ─── Ollama ────────────────────────────────────────────────────────────────── | ||
| OLLAMA_HOST=0.0.0.0 | ||
| OLLAMA_ORIGINS=* |
| | Triệu chứng | Nguyên nhân | Cách xử lý | | ||
| |---|---|---| | ||
| | `rag-api` / `agent-api` crash khi start | Thiếu env var bắt buộc | `docker compose logs rag-api` — tìm `RuntimeError` | | ||
| | `/ask` trả về 404 "chưa được ingest" | Chưa chạy `/ingest` | `curl -X POST localhost:8090/ingest -d '{"project":"..."}'` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.