SDD 首页
todo-demo · M/V/C/P 设计
| 层 | 页 |
|---|---|
| M | mvcp/model.html |
M -> V -> C -> P
{ "_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": "
todo-demo · M/V/C/P 设计
| 层 | 页 |
|---|---|
| M | mvcp/model.html |
M -> V -> C -> P
{ id:int, text:str, done:bool, created_at:ISO }
| field | type |
|---|---|
| id | integer |
| text | string |
schema: id PK · text NOT NULL
list: Todo[]; loading: bool
| list | Todo[] |
vue ref
CREATE TABLE todos(id INTEGER PRIMARY KEY,text TEXT,done INT,created_at TEXT);
| todos | table |
sqlite
顶部 input + 按钮 + 列表。
| 组件 | 事件 |
|---|---|
| TodoList | load/add |
Vue SFC: TodoList.vue
Body: { text }; Resp 201: { id, text, done:false, created_at }
| field | req |
|---|---|
| text | true |
POST /todos
Resp 200: Todo[]
| list | Todo[] |
GET /todos
node server.js → listen $PORT → ready
| step | action |
|---|---|
| 1 | spawn |
spawn -> listen -> ready
Archive of SDD rev 1, see sdd/ for live version.