{ "_doc": "Mock fixture for Architect Agent — drives P1 acceptance (todo-demo project). Produces SDD multi-page site + units.json (3 units) + integration/spec.json + architect agent-state + history snapshot.", "chunks": [ "## 第 1 步: 读 PRD\n", "已读 prd/feature/feature-tree.html — 3 个 Unit。\n", "\n## 第 2 步: 写 sdd/mvcp/\n", "model · view · control · process\n", "\n## 第 3 步: 写 units.json + integration/spec.json\n", "todo-be / todo-fe / todo-db,DAG 无环。\n", "\n## 完成\n", "SDD v1 已交付,units.json l2_rounds 初值 0/3。\n" ], "result": "mock-ok devloop-architect: SDD v1 + 3 units + 1 integration case", "files": [ { "path": "sdd/index.html", "content": "SDD · todo-demo

SDD 首页

todo-demo · M/V/C/P 设计

层页
Mmvcp/model.html
M -> V -> C -> P
导航
" }, { "path": "sdd/mvcp/model.html", "content": "Model

M-1 Todo Entity

{ id:int, text:str, done:bool, created_at:ISO }

fieldtype
idinteger
textstring
schema: id PK · text NOT NULL
model

M-2 FE State

list: Todo[]; loading: bool

listTodo[]
vue ref
fe

M-3 DB Schema

CREATE TABLE todos(id INTEGER PRIMARY KEY,text TEXT,done INT,created_at TEXT);

todostable
sqlite
db
" }, { "path": "sdd/mvcp/view.html", "content": "View

V-1 列表组件

顶部 input + 按钮 + 列表。

组件事件
TodoListload/add
Vue SFC: TodoList.vue
UI
" }, { "path": "sdd/mvcp/control.html", "content": "Control

C-1 POST /todos

Body: { text }; Resp 201: { id, text, done:false, created_at }

fieldreq
texttrue
POST /todos
api

C-2 GET /todos

Resp 200: Todo[]

listTodo[]
GET /todos
api
" }, { "path": "sdd/mvcp/process.html", "content": "Process

P-1 启动流程

node server.js → listen $PORT → ready

stepaction
1spawn
spawn -> listen -> ready
proc
" }, { "path": "sdd/assets/shell.css", "content": "/* sdd shell.css placeholder */\nbody { font-family: system-ui; }\n.card { padding: 6px; border: 1px solid #ddd; }\n" }, { "path": "sdd/assets/shell.js", "content": "/* sdd shell.js placeholder */\nconsole.log('[devloop-sdd] shell loaded');\n" }, { "path": "sdd/assets/search-index.json", "content": "{\"version\":\"1\",\"pages\":5,\"entries\":[]}" }, { "path": "units.json", "content": "{\n \"project_id\": \"_placeholder_\",\n \"rev\": 1,\n \"prd_rev\": \"1\",\n \"sdd_rev\": \"1\",\n \"created_at\": \"2026-05-13T10:01:00.000Z\",\n \"l2_rounds\": 0,\n \"l2_budget\": 3,\n \"units\": [\n {\n \"id\": \"todo-db\",\n \"type\": \"db\",\n \"kind\": \"db\",\n \"description\": \"SQLite schema for todos table\",\n \"depends_on\": [],\n \"contract_hash\": \"sha256:0000000000000001\",\n \"status\": \"pending\",\n \"retries\": 0,\n \"retry_budget\": 3\n },\n {\n \"id\": \"todo-be\",\n \"type\": \"be\",\n \"kind\": \"be\",\n \"description\": \"Express API for /todos\",\n \"depends_on\": [\"todo-db\"],\n \"contract_hash\": \"sha256:0000000000000002\",\n \"status\": \"pending\",\n \"retries\": 0,\n \"retry_budget\": 3\n },\n {\n \"id\": \"todo-fe\",\n \"type\": \"fe\",\n \"kind\": \"fe\",\n \"description\": \"Vue list page\",\n \"depends_on\": [\"todo-be\"],\n \"contract_hash\": \"sha256:0000000000000003\",\n \"status\": \"pending\",\n \"retries\": 0,\n \"retry_budget\": 3\n }\n ]\n}\n" }, { "path": "integration/spec.json", "content": "{\n \"rev\": 1,\n \"created_at\": \"2026-05-13T10:01:00.000Z\",\n \"cases\": [\n {\n \"id\": \"case-add-list\",\n \"title\": \"add a todo then list shows it\",\n \"involves\": [\"todo-be\", \"todo-db\"],\n \"steps\": [\n { \"unit\": \"todo-be\", \"call\": \"POST /todos\", \"body\": { \"text\": \"buy milk\" }, \"expect\": { \"status\": 201, \"json\": { \"id\": \"$.id\", \"text\": \"buy milk\" } } },\n { \"unit\": \"todo-be\", \"call\": \"GET /todos\", \"expect\": { \"status\": 200 } }\n ]\n }\n ]\n}\n" }, { "path": "history/sdd-rev-001.html", "content": "SDD rev 1 snapshot

Snapshot

Archive of SDD rev 1, see sdd/ for live version.

" }, { "path": "units/todo-be/spec.json", "content": "{\n \"unit_id\": \"todo-be\",\n \"kind\": \"be\",\n \"depends_on\": [\"todo-db\"],\n \"description\": \"Express API for /todos\",\n \"acceptance_criteria\": [\n \"POST /todos with text=foo returns 201 with id, text=foo, done=false\",\n \"GET /todos returns array of todos\",\n \"POST /todos with empty body returns 400\"\n ],\n \"contract_hint\": {\n \"exports\": {\n \"http\": [\n { \"method\": \"POST\", \"path\": \"/todos\", \"responses\": { \"201\": \"Todo\", \"400\": \"BadRequest\" } },\n { \"method\": \"GET\", \"path\": \"/todos\", \"responses\": { \"200\": \"Todo[]\" } }\n ]\n }\n }\n}\n" }, { "path": "units/todo-db/spec.json", "content": "{\n \"unit_id\": \"todo-db\",\n \"kind\": \"db\",\n \"depends_on\": [],\n \"description\": \"SQLite schema for todos\",\n \"acceptance_criteria\": [\"schema.sql defines todos table with id/text/done/created_at\"]\n}\n" }, { "path": "units/todo-fe/spec.json", "content": "{\n \"unit_id\": \"todo-fe\",\n \"kind\": \"fe\",\n \"depends_on\": [\"todo-be\"],\n \"description\": \"Vue list page\",\n \"acceptance_criteria\": [\"renders list from GET /todos\", \"calls POST /todos on submit\"]\n}\n" }, { "path": "agent-state/architect.json", "content": "{\"agent\":\"devloop-architect\",\"status\":\"idle\",\"current_step\":6,\"total_steps\":6,\"last_call_id\":\"call-mock-architect\",\"updated_at\":\"2026-05-13T10:01:01.000Z\"}" }, { "path": "agent-state/architect-todo.json", "content": "{\"agent\":\"devloop-architect\",\"call_id\":\"call-mock-architect\",\"created_at\":\"2026-05-13T10:01:00.000Z\",\"items\":[{\"id\":\"step-001\",\"description\":\"bootstrap_sdd_site\",\"status\":\"done\",\"depends_on\":[]},{\"id\":\"step-002\",\"description\":\"write mvcp/model.html\",\"status\":\"done\",\"depends_on\":[\"step-001\"]},{\"id\":\"step-003\",\"description\":\"write mvcp/{view,control,process}.html\",\"status\":\"done\",\"depends_on\":[\"step-002\"]},{\"id\":\"step-004\",\"description\":\"write units.json (3 units, DAG)\",\"status\":\"done\",\"depends_on\":[\"step-003\"]},{\"id\":\"step-005\",\"description\":\"write integration/spec.json\",\"status\":\"done\",\"depends_on\":[\"step-004\"]},{\"id\":\"step-006\",\"description\":\"validate_sdd_consistency + archive\",\"status\":\"done\",\"depends_on\":[\"step-005\"]}],\"current\":null,\"progress_pct\":100}" } ] }