Skip to content

Develop#36

Merged
tynab merged 2 commits into
mainfrom
develop
Jun 6, 2026
Merged

Develop#36
tynab merged 2 commits into
mainfrom
develop

Conversation

@tynab

@tynab tynab commented Jun 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2026 14:04
@tynab tynab merged commit da3afa7 into main Jun 6, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread agent-api/agents.py
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 thread agent-api/workflow.py
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 thread agent-api/workflow.py
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.
Comment thread README.md
# ─── Bảo mật — bắt buộc đổi trước khi deploy ─────────────────────────────
# ─── Ollama ──────────────────────────────────────────────────────────────────
OLLAMA_HOST=0.0.0.0
OLLAMA_ORIGINS=*
Comment thread README.md
| 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":"..."}'` |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants