diff --git a/.gitignore b/.gitignore index 3bb2bee..20bcb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ tokens.json *.user *.log *.pdf +.loong/ +runs/* +!runs/.gitkeep +!runs/archive/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..118d62b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# AGENTS.md — fpcollect 工作流入口(Loong 消费实例) + +> 皮纹采集系统复刻版:Windows 采集代理(.NET 8 x86)+ Apple 风格 Web UI + 测评报告引擎。 +> 语料来源:`Loong/loong-workflow` core → 本项目 `.loong/`(单向同步,勿手改)。 + +## 路由表(技能管线) + +| 阶段 | 技能 | 项目内落点 | +|---|---|---| +| 立项 | `.loong/skills/project-kickoff` | 已完成(逆向→复刻→报告引擎三阶段) | +| 拆解 | `.loong/skills/analyze-dag` | `runs/{slug}/` 按 `runs-layout` | +| 实现 | `.loong/skills/implement` | `agent/`(后端)、`web/`(前端)、`scripts/`(运维) | +| 审查 | `.loong/skills/review-code` | `runs/{slug}/reviews/` | +| 验证 | `.loong/skills/verify` | `scripts/e2e-test.ps1`(DoD 矩阵回归) | +| 发布 | `.loong/skills/release` | `scripts/sync-to-gitea.ps1` + 回读验证 | +| 复盘 | `.loong/skills/retrospective` | `runs/archive/` | + +## 项目特化约定 + +- **构建**:`dotnet publish agent -c Release -r win-x86 --self-contained -o publish`(必须先停看门狗和 agent,否则 DLL 锁死) +- **运行面**:`publish\fpcollect-agent.exe`(:5090)+ `scripts\supervisor.ps1` 看门狗 + 计划任务 `FpCollectGiteaSync` +- **采集仪**:S680E(鸿达),DLL 从 `C:\Program Files (x86)\S680E` 动态加载;**成功返回值是 1 不是 0**(铁律级教训) +- **停止采集**:`GetFPRawData` 阻塞 ~1.5s/帧,必须等线程退出后才能释放原生库,否则 0xC0000005 +- **编码**:本仓所有 .ps1 必须 UTF-8 **带 BOM**(PowerShell 5.1 否则按 GBK 读,中文路径变乱码——已两次翻车) +- **回归基准**:样本 ridges=[19,10,9,14,6,19,6,9,13,9] → TRC=114,L1/R1=151.7,L4=129.3,R4=120.1,R5=92.9,L2=83.6,L3/R3=83.1,L5=61.9,R2=50.1;渠道=听觉型/动机型/感性 +- **外部写入回读**(Loong 铁律):Gitea push 后必须 API 回读 commit sha 才算成功 +- **勿入 git**:`*.pdf`(样本报告)、`publish/`、`bin/obj`、`*.db`、`tokens.json`、`runs/*`(除 archive) + +## 关键路径速查 + +| 事项 | 位置 | +|---|---| +| 测评算法(勿改公式) | `agent/Analysis/DermEngine.cs` | +| 纹型分类(待联调) | `agent/Analysis/FpClassifier.cs` | +| 文案库 | `agent/Analysis/CopyLibrary.cs` | +| API 面 | `agent/Program.cs`(登录/设备/采集/订单/嵴数/报告/分类/WS) | +| Gitea | `http://39.108.95.179:3000/kenyang/fpcollect`(rea 镜像同服务器) | diff --git a/loong.jsonc b/loong.jsonc new file mode 100644 index 0000000..b61070b --- /dev/null +++ b/loong.jsonc @@ -0,0 +1,13 @@ +{ + // fpcollect 的 Loong 白名单(第 4 步:缺此文件技能管线不加载) + "skills": [ + "analyze-dag", "implement", "review-code", "verify", + "release", "retrospective", "browser-debug" + ], + "rules": [ + "research-before-build", "verify-external-writes", "testing", + "claim-discipline", "two-tier-artifacts", "simplicity-first", + "type-checking", "credential-hygiene" + ], + "auto_approve": ["verify", "retrospective", "review-code"] +} diff --git a/scripts/sync-to-gitea.ps1 b/scripts/sync-to-gitea.ps1 index f7753ac..6b54809 100644 --- a/scripts/sync-to-gitea.ps1 +++ b/scripts/sync-to-gitea.ps1 @@ -1,4 +1,4 @@ -# Sync fpcollect + REA mirror to Gitea (idempotent, safe to re-run) +# Sync fpcollect + REA mirror to Gitea (idempotent, safe to re-run) # 1) REA : server-side mirror migration (Gitea pulls from GitHub every 30m = continuous sync) # 2) fpcollect : push local git repo # Log: sync-to-gitea.log (same folder)