Procházet zdrojové kódy

docs: configure engineering agent skills

Kazerin před 2 týdny
rodič
revize
144fc30672
4 změnil soubory, kde provedl 94 přidání a 0 odebrání
  1. 42 0
      AGENTS.md
  2. 22 0
      docs/agents/domain.md
  3. 19 0
      docs/agents/issue-tracker.md
  4. 11 0
      docs/agents/triage-labels.md

+ 42 - 0
AGENTS.md

@@ -0,0 +1,42 @@
+# 城市生命线项目协作规则
+
+## 记忆库入口
+
+本项目的持续上下文保存在 `memory/`。开始处理新任务前,先读取:
+
+1. `memory/index.md`:项目状态和记忆索引。
+2. `memory/long-term.md`:稳定的架构事实、长期决策和用户约定。
+3. 最近相关的 `memory/sessions/YYYY-MM-DD.md`:了解近期工作和未完成事项。
+
+## 每次任务结束时
+
+- 在当天的 `memory/sessions/YYYY-MM-DD.md` 追加目标、结论、文件变更、验证结果、风险和后续行动。
+- 如果项目状态、入口或会话索引发生变化,更新 `memory/index.md`。
+- 用户明确确认且预计长期有效的决策,整理到 `memory/long-term.md`。
+- 即使没有代码改动,也记录简短的结论或“无变更”说明,避免上下文断裂。
+
+## 定期整理
+
+每累计 5 次会话,或当天会话文件超过约 20 KB,检查并整理长期记忆:合并仍然有效的信息,标记过期决策,必要时将旧会话移动到 `memory/archive/`。整理后同步更新 `memory/index.md`。
+
+## 隐私和安全
+
+记忆库只保存可复用的项目上下文。禁止写入密码、Token、API 密钥、地图密钥、内部账号、个人隐私或完整的敏感接口响应。需要描述配置时只记录变量名、用途和是否已配置。
+
+## 变更边界
+
+遵循用户当前任务范围,保留已有用户修改;修改前先阅读相关文件,完成后运行与风险相称的验证。记忆库文档不参与前端运行时,不应改变 `src/`、Vite 或 npm 行为,除非用户明确要求。
+
+## Agent skills
+
+### Issue tracker
+
+Issues are tracked infrequently in the internal Gogs Issues through its web interface. See `docs/agents/issue-tracker.md`.
+
+### Triage labels
+
+Use the five default triage labels. See `docs/agents/triage-labels.md`.
+
+### Domain docs
+
+Use the single-context layout. See `docs/agents/domain.md`.

+ 22 - 0
docs/agents/domain.md

@@ -0,0 +1,22 @@
+# Domain Docs
+
+This repository uses a single-context domain documentation layout.
+
+## Before exploring
+
+Read `CONTEXT.md` at the repository root and relevant ADRs under `docs/adr/`.
+If these files do not exist, proceed silently. Domain-modeling skills create
+them lazily when terminology or decisions are resolved.
+
+## Layout
+
+```text
+/
+|-- CONTEXT.md
+|-- docs/adr/
+`-- src/
+```
+
+Use terminology defined in `CONTEXT.md` consistently. If required terminology
+is missing, record the gap for domain modeling. Explicitly flag any proposal
+that conflicts with an existing ADR.

+ 19 - 0
docs/agents/issue-tracker.md

@@ -0,0 +1,19 @@
+# Issue tracker: Gogs
+
+Issues and specs for this repository live in the internal Gogs Issues:
+
+- `http://192.168.110.30:3000/shaoy/city-life-line/issues`
+
+## Workflow
+
+Issue tracking is used infrequently in the current project workflow. Create, read,
+comment on, label, and close issues manually through the Gogs web interface.
+No CLI or API integration is assumed.
+
+When a skill says to publish to the issue tracker, prepare the title, body, and
+labels, then create the issue through Gogs. When a skill says to fetch a ticket,
+open the referenced Gogs issue and read its description, labels, and comments.
+
+## Pull requests as a triage surface
+
+Pull requests are not a request or triage surface.

+ 11 - 0
docs/agents/triage-labels.md

@@ -0,0 +1,11 @@
+# Triage Labels
+
+| Canonical role    | Gogs label        | Meaning                                |
+| ----------------- | ----------------- | -------------------------------------- |
+| `needs-triage`    | `needs-triage`    | Maintainer needs to evaluate the issue |
+| `needs-info`      | `needs-info`      | Waiting for more information           |
+| `ready-for-agent` | `ready-for-agent` | Fully specified and ready for an agent |
+| `ready-for-human` | `ready-for-human` | Requires human implementation          |
+| `wontfix`         | `wontfix`         | Will not be actioned                   |
+
+When a skill names a canonical role, use the corresponding Gogs label.