devloop-pm.json
9.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"_doc": "Mock fixture for PM Agent — drives P1 acceptance (todo-demo project). Produces the full PRD multi-page site + pm agent-state + history snapshot.",
"chunks": [
"## 第 1 步: 解析 idea\n",
"用户要求做一个 TODO 列表 API + Vue 前端。\n",
"\n## 第 2 步: 初始化 prd/ 站点\n",
"(在真实运行时这里会调 bootstrap_prd_site)\n",
"\n## 第 3 步: 写章节\n",
"background / personas / scope / feature-tree / user-flows / prototype\n",
"\n## 完成\n",
"PRD v1 已生成,可交付给 Architect。\n"
],
"result": "mock-ok devloop-pm: PRD scaffolded (todo-demo, rev=1)",
"files": [
{
"path": "prd/index.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>PRD · todo-demo</title><link rel=\"stylesheet\" href=\"assets/shell.css\"></head><body data-page=\"index.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"system@2026-05-13T10:00:00.000Z\"><h3>项目首页</h3><p>todo-demo · 一个 TODO 列表 API + 前端</p><table><tr><th>章节</th><th>路径</th></tr><tr><td>背景</td><td>product/background.html</td></tr></table><pre>flow: list -> add -> done</pre><svg width=\"100\" height=\"20\"><line x1=\"0\" y1=\"10\" x2=\"100\" y2=\"10\" stroke=\"black\" marker-end=\"url(#arrow)\"/></svg><div class=\"card\">导航卡片</div><details><summary>更多</summary><p>站点入口</p></details></section><footer data-changelog>rev1 init by mock-pm</footer></article><script src=\"assets/shell.js\"></script></body></html>"
},
{
"path": "prd/reading-guide.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>Reading Guide</title><link rel=\"stylesheet\" href=\"assets/shell.css\"></head><body data-page=\"reading-guide.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"system@2026-05-13T10:00:00.000Z\"><h3>阅读顺序</h3><p>建议按 background → personas → scope → feature-tree → user-flows → prototype 阅读。</p><pre>├── product\n├── feature\n└── flow</pre><table><tr><td>第 1 步</td><td>product/background</td></tr></table><div class=\"card\">tip</div><svg width=\"60\" height=\"20\"><rect width=\"60\" height=\"20\" fill=\"#eef\"/></svg></section></article></body></html>"
},
{
"path": "prd/product/background.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>背景</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"product/background.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>背景</h3><p>个人 / 小团队需要轻量 TODO 工具,不愿引入 Notion / Jira。</p><table><tr><th>痛点</th><th>解法</th></tr><tr><td>无快速记录</td><td>极简 API</td></tr></table><pre>需求 → API → 前端</pre><svg width=\"80\" height=\"20\"><circle cx=\"10\" cy=\"10\" r=\"5\"/></svg><div class=\"card\">scope: MVP</div></section></article></body></html>"
},
{
"path": "prd/product/personas.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>用户</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"product/personas.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>用户画像</h3><p>独立开发者 / 学生 / 产品经理 — 单人或 ≤3 人小团队。</p><table><tr><th>画像</th><th>场景</th></tr><tr><td>开发者</td><td>记 bug / 任务</td></tr></table><pre>persona-a / persona-b</pre><svg width=\"80\" height=\"20\"><circle cx=\"40\" cy=\"10\" r=\"5\"/></svg><div class=\"card\">primary: dev</div></section></article></body></html>"
},
{
"path": "prd/product/scope.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>范围</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"product/scope.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>本期范围</h3><p>POST /todos 新增 · GET /todos 列表 · Vue 简单列表前端。不做用户系统、不做拖拽排序。</p><table><tr><th>In</th><th>Out</th></tr><tr><td>CRUD</td><td>登录</td></tr></table><pre>scope: api + fe</pre><svg width=\"80\" height=\"20\"><rect x=\"5\" y=\"5\" width=\"60\" height=\"10\" fill=\"#cfc\"/></svg><div class=\"card\">MVP</div></section></article></body></html>"
},
{
"path": "prd/feature/feature-tree.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>功能树</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"feature/feature-tree.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>功能树</h3><p>todo-be(POST/GET /todos) · todo-fe(Vue 列表) · 可选 todo-db(SQLite schema)。</p><table><tr><th>模块</th><th>说明</th></tr><tr><td>todo-be</td><td>API 服务</td></tr><tr><td>todo-fe</td><td>前端</td></tr></table><pre>├── todo-be\n├── todo-fe\n└── todo-db</pre><svg width=\"80\" height=\"40\"><line x1=\"10\" y1=\"10\" x2=\"60\" y2=\"30\" marker-end=\"url(#a)\"/><polygon points=\"60,30 55,25 55,35\"/></svg><div class=\"card\">3 unit</div></section></article></body></html>"
},
{
"path": "prd/flow/user-flows.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>用户流</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"flow/user-flows.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>核心流程</h3><p>打开页面 → 看到列表 → 输入 → 提交 → 刷新看到新条目。</p><table><tr><th>步骤</th><th>动作</th></tr><tr><td>1</td><td>GET /todos</td></tr><tr><td>2</td><td>POST /todos</td></tr></table><pre>user -> fe -> be -> db</pre><svg width=\"120\" height=\"30\"><line x1=\"0\" y1=\"15\" x2=\"110\" y2=\"15\" stroke=\"black\" marker-end=\"url(#arrow)\" stroke-dasharray=\"4 2\"/></svg><div class=\"card\">主流程</div></section></article></body></html>"
},
{
"path": "prd/prototype/proto-list.html",
"content": "<!doctype html><html><head><meta charset=\"utf-8\"><title>原型 · 列表</title><link rel=\"stylesheet\" href=\"../assets/shell.css\"></head><body data-page=\"prototype/proto-list.html\"><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\" data-origin=\"yibo@2026-05-13T10:00:00.000Z\"><h3>原型 · TODO 列表</h3><p>顶部 input + 按钮,下方列表展示。</p><table><tr><th>组件</th><th>事件</th></tr><tr><td>input</td><td>enter</td></tr></table><pre>+----------+\n| input |\n+----------+\n| item 1 |\n| item 2 |\n+----------+</pre><svg width=\"60\" height=\"40\"><rect x=\"5\" y=\"5\" width=\"50\" height=\"10\" fill=\"#fff\" stroke=\"#999\"/></svg><div class=\"card\">UI 草图</div></section></article></body></html>"
},
{
"path": "prd/assets/shell.css",
"content": "/* shell.css placeholder (P1 mock) */\nbody { font-family: system-ui; max-width: 960px; margin: 2em auto; }\n.card { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }\n"
},
{
"path": "prd/assets/shell.js",
"content": "/* shell.js placeholder (P1 mock) */\nconsole.log('[devloop-prd] shell loaded');\n"
},
{
"path": "prd/assets/search-index.json",
"content": "{\"version\":\"1\",\"pages\":8,\"entries\":[]}"
},
{
"path": "history/prd-rev-001.html",
"content": "<!doctype html><html><head><title>PRD rev 1 snapshot</title></head><body><article data-doc=\"prd\" data-rev=\"1\"><section data-rev=\"1\"><h3>Snapshot</h3><p>Archive of PRD rev 1, see prd/index.html for live version.</p></section></article></body></html>"
},
{
"path": "agent-state/pm.json",
"content": "{\"agent\":\"devloop-pm\",\"status\":\"idle\",\"current_step\":8,\"total_steps\":8,\"last_call_id\":\"call-mock-pm\",\"updated_at\":\"2026-05-13T10:00:01.000Z\"}"
},
{
"path": "agent-state/pm-todo.json",
"content": "{\"agent\":\"devloop-pm\",\"call_id\":\"call-mock-pm\",\"created_at\":\"2026-05-13T10:00:00.000Z\",\"items\":[{\"id\":\"step-001\",\"description\":\"bootstrap_prd_site\",\"status\":\"done\",\"depends_on\":[]},{\"id\":\"step-002\",\"description\":\"write index.html\",\"status\":\"done\",\"depends_on\":[\"step-001\"]},{\"id\":\"step-003\",\"description\":\"write product/*.html\",\"status\":\"done\",\"depends_on\":[\"step-002\"]},{\"id\":\"step-004\",\"description\":\"write feature/* + flow/* + prototype/*\",\"status\":\"done\",\"depends_on\":[\"step-002\"]},{\"id\":\"step-005\",\"description\":\"update_search_index\",\"status\":\"done\",\"depends_on\":[\"step-004\"]},{\"id\":\"step-006\",\"description\":\"validate_prd_site\",\"status\":\"done\",\"depends_on\":[\"step-005\"]},{\"id\":\"step-007\",\"description\":\"archive_doc → history/\",\"status\":\"done\",\"depends_on\":[\"step-006\"]},{\"id\":\"step-008\",\"description\":\"echo_diff\",\"status\":\"done\",\"depends_on\":[\"step-007\"]}],\"current\":null,\"progress_pct\":100}"
}
]
}