690608:0012 ADR-035-135 #08
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
- **Status:** Active
|
||||
- **Version:** 1.9.0
|
||||
- **Date:** 2026-05-13
|
||||
- **Author:** Senior Full Stack Developer (Windsurf AI)
|
||||
- **Author:** Senior Full Stack Developer (Devin AI)
|
||||
- **Reference:** ADR-001 (Workflow Engine), ADR-002 (Redlock), ADR-016 (Security)
|
||||
|
||||
---
|
||||
|
||||
@@ -212,7 +212,7 @@ Invalidate: หลัง activate สำเร็จ (AiPromptsService.activate(
|
||||
## Grilling Session Log
|
||||
|
||||
```
|
||||
2026-05-25 — grilling session ผ่าน Windsurf Cascade
|
||||
2026-05-25 — grilling session ผ่าน Devin Cascade
|
||||
Q1: prompt_type scope → 'ocr_extraction' เดียว (8 fields) ร่วมกันทั้งคู่
|
||||
Q2: activation model → Option A (single is_active flag)
|
||||
Q3: result storage → Option C (auto-save + manual_note)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* **Dev Qdrant:** Separate Qdrant instance บน ASUSTOR สำหรับ codebase embedding โดยเฉพาะ — ห้ามใช้ Qdrant instance เดียวกับ DMS document RAG (ADR-023A)
|
||||
* **SOUL.md:** Hermes working journal อยู่ใน container เท่านั้น (`/volume1/docker/hermes/SOUL.md`) ไม่ sync กลับ repo
|
||||
* **Context Source:** Hermes ดึง project context จาก `specs/06-Decision-Records/CONTEXT-ADR-031.md` + `AGENTS.md` โดยตรง ไม่ใช้ Obsidian หรือ external knowledge base
|
||||
* **Sub-agent Delegation:** Hermes orchestrate โดย (1) Cloud sub-agents ใช้ model เล็กกว่า (Claude Haiku/GPT-4o-mini) สำหรับ code generation tasks และ (2) MCP invocations ไปยัง Windsurf/agy ที่มีอยู่แล้ว
|
||||
* **Sub-agent Delegation:** Hermes orchestrate โดย (1) Cloud sub-agents ใช้ model เล็กกว่า (Claude Haiku/GPT-4o-mini) สำหรับ code generation tasks และ (2) MCP invocations ไปยัง Devin/agy ที่มีอยู่แล้ว
|
||||
* **Git Identity:** Hermes ใช้ Gitea service account (`hermes-bot`) push เฉพาะ `hermes/*` branches — ห้าม push ตรง `main`/`develop` ทุกกรณี — ทุก change ต้องผ่าน PR ที่ human approve
|
||||
|
||||
## Context
|
||||
@@ -97,7 +97,7 @@ Hermes ทำหน้าที่เป็น "Lead Developer" / "Conductor"
|
||||
┌───────┴────────┐
|
||||
▼ ▼
|
||||
[Cloud Sub-agents] [MCP Tool Invocations]
|
||||
Claude Haiku / Windsurf / agy / Codex
|
||||
Claude Haiku / Devin / agy / Codex
|
||||
GPT-4o-mini (existing tools, no new models)
|
||||
│ ▼
|
||||
└────────┬───────
|
||||
@@ -173,7 +173,7 @@ Orchestrator
|
||||
→ MCP hermes-tools: bash/git operations บน ASUSTOR
|
||||
→ MCP mariadb: schema lookup (read-only)
|
||||
→ MCP gitea: PR/issue management
|
||||
→ Triggers Windsurf/agy ถ้า complex scaffolding needed
|
||||
→ Triggers Devin/agy ถ้า complex scaffolding needed
|
||||
```
|
||||
|
||||
**Data Classification Enforcement:**
|
||||
@@ -582,7 +582,7 @@ HERMES_TELEGRAM_RATE_LIMIT_WINDOW_MS=60000
|
||||
Hermes รันได้ 3 mode หลักที่ share config/data เดียวกันใน `~/.hermes`:
|
||||
- **CLI/TUI** — `hermes --tui` interactive session
|
||||
- **Messaging Gateway** — รองรับ 22 platform (Telegram, Discord, Slack, WhatsApp, Signal, LINE, Mattermost, Matrix, Teams, Google Chat ฯลฯ)
|
||||
- **IDE Integration** — เชื่อมกับ Windsurf / Codex ผ่าน MCP
|
||||
- **IDE Integration** — เชื่อมกับ Devin / Codex ผ่าน MCP
|
||||
|
||||
#### CLI Commands
|
||||
|
||||
@@ -644,7 +644,7 @@ Hermes รันบน ASUSTOR ตลอด 24/7 การ SSH เข้าไ
|
||||
|
||||
| สถานการณ์ | Interface | ทำไม |
|
||||
|---|---|---|
|
||||
| นั่งทำงานที่โต๊ะ coding | Windsurf Cascade | IDE context + MCP |
|
||||
| นั่งทำงานที่โต๊ะ coding | Devin Cascade | IDE context + MCP |
|
||||
| สั่ง task ซับซ้อน / multi-agent | `agy` CLI หรือ Desktop | parallel subagents |
|
||||
| batch ops / scaffolding | Codex CLI | bash execution |
|
||||
| อยู่นอกบ้าน / มือถือ | Telegram → Hermes | always-on บน ASUSTOR สำหรับ DevOps commands เท่านั้น |
|
||||
@@ -870,7 +870,7 @@ ASUSTOR (VLAN ใดก็ตาม) → QNAP VLAN 10 (MariaDB :3306, Gitea :300
|
||||
|
||||
* Hermes, Telegram Bridge, MCP, และ hermes proxy ต้องเป็น optional DevOps tooling ไม่ใช่ dependency ของ DMS production runtime
|
||||
* หาก Hermes stack ล่ม ผู้ใช้ DMS ต้องยังใช้งาน frontend/backend, Workflow Engine, notification, และ AI pipeline ตาม ADR-023A ได้ตามปกติ
|
||||
* Degraded mode คือกลับไปใช้ IDE, Gitea UI, CI UI, SSH/manual ops, และ Codex/Windsurf local workflow ตามปกติ
|
||||
* Degraded mode คือกลับไปใช้ IDE, Gitea UI, CI UI, SSH/manual ops, และ Codex/Devin local workflow ตามปกติ
|
||||
* ห้ามให้ production deploy, Workflow Engine transition, AI inference, หรือ document ingestion รอ Hermes availability
|
||||
* Monitoring ต้องแจ้งเตือนเฉพาะ operator/devops team ไม่ alert เป็น production DMS outage เว้นแต่มีผลกระทบจริงกับ DMS service
|
||||
|
||||
@@ -990,6 +990,6 @@ ADR-031 ต้อง rollout แบบเป็น stage เพื่อลด
|
||||
| 2026-05-28 | 1.0.0 | Initial ADR creation - Merged from CONTEXT-ADR-031 and CONTEXT-ADR-031-Added |
|
||||
| 2026-05-28 | 1.1.0 | Added sections 4–6 from CONTEXT-ADR-031-Added-2: Hermes Interface Modes, agy+Hermes MCP Integration, Deploy Prerequisites; fixed port conflict (hermes proxy :8766, not :8765) |
|
||||
| 2026-05-29 | 1.1.1 | Aligned with CONTEXT-ADR-031.md grill-with-docs: fixed monorepo structure (flat layout), corrected file paths, updated repo URL to git.np-dms.work, added AGENTS.md v1.9.7 reference |
|
||||
| 2026-05-29 | 1.1.2 | Linked root CONTEXT.md with specs/CONTEXT-ADR-031.md; fixed setup-context.sh paths; updated Windsurf/agy/Hermes symlink targets |
|
||||
| 2026-05-29 | 1.1.2 | Linked root CONTEXT.md with specs/CONTEXT-ADR-031.md; fixed setup-context.sh paths; updated Devin/agy/Hermes symlink targets |
|
||||
| 2026-05-29 | 2.0.0 | **v2.0 Rewrite** — grill-with-docs: Orchestration as primary concern; Added Autonomous Dev Loop architecture; Cloud AI exception (Data Classification Policy C); Separate Dev Qdrant on ASUSTOR; SOUL.md container-local journal; Sub-agent delegation (Cloud+MCP); Git identity hermes-bot + hermes/* branches + PR-only flow |
|
||||
| 2026-05-29 | 2.0.1 | Step 1 context assembly: เพิ่ม `CONTEXT.md` (root domain terminology) เป็น selective context source สำหรับ DMS feature coding และ Schema/DB work tasks |
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# LCBP3 DMS — Agent Context (ADR-031)
|
||||
# Single source of truth สำหรับทุก agent tool (Hermes, agy, Windsurf)
|
||||
# Single source of truth สำหรับทุก agent tool (Hermes, agy, Devin)
|
||||
#
|
||||
# ที่อยู่ไฟล์: specs/06-Decision-Records/CONTEXT-ADR-031.md
|
||||
#
|
||||
# Tool ที่อ่านไฟล์นี้:
|
||||
# Hermes → /volume1/docker/hermes/config/MEMORY.md (symlink หรือ copy)
|
||||
# agy → ~/.gemini/antigravity-cli/settings.json > contextFiles[]
|
||||
# Windsurf → .windsurfrules > @import specs/06-Decision-Records/CONTEXT-ADR-031.md
|
||||
# Devin → .devin/rules > @import specs/06-Decision-Records/CONTEXT-ADR-031.md
|
||||
#
|
||||
# Domain context (Correspondence, RFA, AI Architecture): ดู CONTEXT.md ที่ root
|
||||
#
|
||||
@@ -23,7 +23,7 @@
|
||||
| Domain | Construction project document management |
|
||||
| Owner | เป้ |
|
||||
| Repo | Gitea: `https://git.np-dms.work/np-dms/lcbp3` (internal) |
|
||||
| Primary IDE | Windsurf (Cascade + MCP) |
|
||||
| Primary IDE | Devin (Cascade + MCP) |
|
||||
| Agent stack | Hermes (ASUSTOR) · agy CLI · Codex CLI |
|
||||
|
||||
---
|
||||
@@ -37,7 +37,7 @@ lcbp3/
|
||||
├── specs/ ADRs, specs, data dictionary
|
||||
├── .agents/ Agent skills and rules
|
||||
├── .gitea/workflows/ CI/CD pipeline definitions
|
||||
├── .windsurf/ Windsurf workflows and rules
|
||||
├── .devin/ Devin workflows and rules
|
||||
├── memory/ Agent memory
|
||||
└── CONTEXT.md ← this file
|
||||
```
|
||||
@@ -180,9 +180,9 @@ Assumption ที่ตั้งใจจะใช้: [assumption]
|
||||
- Max parallel subagents: 3
|
||||
- Delegate bash/git execution → Hermes via MCP
|
||||
|
||||
### Windsurf / Cascade
|
||||
### Devin / Cascade
|
||||
- MCP: MariaDB (schema lookup), Gitea (PR/issue)
|
||||
- Rules enforced via `AGENTS.md` v1.9.7 (master), synced to `.windsurfrules` และ `.agents/rules/`
|
||||
- Rules enforced via `AGENTS.md` v1.9.7 (master), synced to `.devin/rules` และ `.agents/rules/`
|
||||
- Primary tool สำหรับ active coding
|
||||
|
||||
## Setup context
|
||||
@@ -190,7 +190,7 @@ Assumption ที่ตั้งใจจะใช้: [assumption]
|
||||
# setup-context.sh — wire CONTEXT-ADR-031.md ไปยัง tools ทุกตัว
|
||||
#
|
||||
# รันจาก: specs/06-Decision-Records/CONTEXT-ADR-031.md (ดูส่วนท้ายไฟล์)
|
||||
# รันบน: laptop (สำหรับ agy + Windsurf) และ ASUSTOR (สำหรับ Hermes)
|
||||
# รันบน: laptop (สำหรับ agy + Devin) และ ASUSTOR (สำหรับ Hermes)
|
||||
#
|
||||
# Usage:
|
||||
# cd specs/06-Decision-Records && bash CONTEXT-ADR-031.sh laptop
|
||||
@@ -266,26 +266,26 @@ PYEOF
|
||||
fi
|
||||
}
|
||||
|
||||
# ── laptop: Windsurf ─────────────────────────────────────────
|
||||
setup_windsurf() {
|
||||
section "Windsurf .windsurfrules"
|
||||
# ── laptop: Devin ─────────────────────────────────────────
|
||||
setup_devin() {
|
||||
section "Devin .devin/rules"
|
||||
|
||||
RULES="$REPO_ROOT/.windsurfrules"
|
||||
RULES="$REPO_ROOT/.devin/rules"
|
||||
IMPORT_LINE="@import specs/06-Decision-Records/CONTEXT-ADR-031.md"
|
||||
|
||||
if [ ! -f "$RULES" ]; then
|
||||
warn ".windsurfrules ไม่พบ — ข้ามขั้นตอนนี้"
|
||||
warn ".devin/rules ไม่พบ — ข้ามขั้นตอนนี้"
|
||||
return
|
||||
fi
|
||||
|
||||
if grep -q "@import specs/06-Decision-Records/CONTEXT-ADR-031.md" "$RULES"; then
|
||||
info "@import specs/06-Decision-Records/CONTEXT-ADR-031.md มีอยู่แล้วใน .windsurfrules"
|
||||
info "@import specs/06-Decision-Records/CONTEXT-ADR-031.md มีอยู่แล้วใน .devin/rules"
|
||||
else
|
||||
# เพิ่ม import ที่บรรทัดแรก
|
||||
TMPFILE=$(mktemp)
|
||||
echo "$IMPORT_LINE" | cat - "$RULES" > "$TMPFILE"
|
||||
mv "$TMPFILE" "$RULES"
|
||||
info "เพิ่ม @import specs/06-Decision-Records/CONTEXT-ADR-031.md ที่บรรทัดแรกของ .windsurfrules"
|
||||
info "เพิ่ม @import specs/06-Decision-Records/CONTEXT-ADR-031.md ที่บรรทัดแรกของ .devin/rules"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user