feat: migrate corpus to file-scoped occlusion

This commit is contained in:
cflmy committed 2026-10-23 12:45:01 +00:00
1 parent c773503938
commit aea86746e7
485 files changed
+1160 -340

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: agent-okf-flywheel (Wave B0)
description: Promote solidified workbook; second plan is cache=hit — document as knowledge base (OKF).
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: agent-pong (Wave B0)
description: >-
Constitution demo — call_site + source in step context; optional live CALL via .env.
+6 -5
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: agent-sandbox-okf — trial then commit
description: >
O1 example: opt-in sandbox trial with GFM-table returns and link-index reads.
@@ -20,8 +21,8 @@ Short demo: write via `agent.trial`, prove the host is clean until commit.
> fs.make_dir path="_example_sbx"
**dry = agent.trial root="_example_sbx" write_path="note.txt" text=sandbox-okf commit=False**
**dry_ok = [ok](dry)**
**dry_committed = [committed](dry)**
**dry_ok = [ok](access(dry, "ok"))**
**dry_committed = [committed](access(dry, "committed"))**
1. `dry_ok`
1. not `dry_committed`
> print text=dry-ok
@@ -37,8 +38,8 @@ Short demo: write via `agent.trial`, prove the host is clean until commit.
> print text=host-clean
**wet = agent.trial root="_example_sbx" write_path="note.txt" text=sandbox-okf commit=True**
**wet_ok = [ok](wet)**
**wet_committed = [committed](wet)**
**wet_ok = [ok](access(wet, "ok"))**
**wet_committed = [committed](access(wet, "committed"))**
1. `wet_ok`
1. `wet_committed`
> print text=wet-ok
@@ -53,7 +54,7 @@ Short demo: write via `agent.trial`, prove the host is clean until commit.
2. *
> print text=proof-missing
**pname = [name]([profile](wet))**
**pname = [name](access([profile](access(wet, "profile")), "name"))**
1. `pname` == "default"
> print text=profile-default
2. *
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/chrome
description: 暗恋见君壳层 — head 资源表、导航 HTML、页脚 HTML(对齐 Django base / site_footer)。
---
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 页脚
站点信息与站长链接(毛玻璃底由壳样式绘制)。
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/fragments
description: AJAX 片段 — /post/ten、/news/five。
导入:
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 首页引言
英雄区 HTML(品牌标语 + CTA + 漂浮主图)。样式在 `styles/shell` 的 Hero / 动效表。
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/home_body
description: 首页主体 HTML — hero + 公告 + 新闻时间线 + 论坛帖子(对齐 Django home.html,无外层导航)。
导入:
@@ -20,9 +21,9 @@ description: 首页主体 HTML — hero + 公告 + 新闻时间线 + 论坛帖
**帖子行 = > 库.查询 表="posts" 上限=10 排序="-created_at"**
**公告段 = None**
- [告](公告行)
**文 = [content](告)**
**时 = [created_at](告)**
- [告](遍历 公告行 为 告)
**文 = [content](access(告, "content"))**
**时 = [created_at](access(告, "created_at"))**
**一项 = "<div class=\"notice-item\"><article class=\"notice-content\">" + 文 + "</article><p class=\"notice-create-time\">" + 时 + "</p></div>"**
**公告段 = > table.append list=公告段 item=一项**
1. 公告段
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 导航
顶栏:首页、帖子、新闻、搜索、聊天、发帖(登录后)、后台。
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/page
description: 用原站 chrome 包一层完整 HTML 引言(bare 布局)。
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: db/index
description: 打开库、建全表、幂等种子、帖子全文索引。
导入:
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## posts
帖子主表。`slug` 用于详情路径;`board` 为板块显示名,`board_id` 关联 `boards`。
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## boards
帖子板块:日常 / 开发 / 聊天。
+9 -8
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: 暗恋见君 · Marqdo
description: 对齐 Django 暗恋见君:原站 CSS/DOM、首页四段、列表详情、发帖门禁、聊天室、专题、搜索、API 指南。
导入:
@@ -141,10 +142,10 @@ description: 对齐 Django 暗恋见君:原站 CSS/DOM、首页四段、列表
**房间行 = > store.查询 表="chat_rooms" 上限=50**
**房间段 = None**
- [房](房间行)
**名 = [name](房)**
**链 = [slug](房)**
**摘 = [summary](房)**
- [房](遍历 房间行 为 房)
**名 = [name](access(房, "name"))**
**链 = [slug](access(房, "slug"))**
**摘 = [summary](access(房, "summary"))**
**项 = "<article class=\"chat-room-card\"><h3><a href=\"/chat/" + 链 + "\">" + 名 + "</a></h3><p>" + 摘 + "</p></article>"**
**房间段 = > table.append list=房间段 item=项**
**房间内 = > text.str_join xs=房间段 sep=""**
@@ -165,10 +166,10 @@ description: 对齐 Django 暗恋见君:原站 CSS/DOM、首页四段、列表
**专题行 = > store.查询 表="topics" 上限=50**
**专题段 = None**
- [题](专题行)
**题名 = [title](题)**
**链 = [slug](题)**
**摘 = [summary](题)**
- [题](遍历 专题行 为 题)
**题名 = [title](access(题, "title"))**
**链 = [slug](access(题, "slug"))**
**摘 = [summary](access(题, "summary"))**
**项 = "<article class=\"topic-card\"><h3>" + 题名 + "</h3><p>" + 摘 + "</p><p class=\"text-muted\">slug: " + 链 + "</p></article>"**
**专题段 = > table.append list=专题段 item=项**
**专题内 = > text.str_join xs=专题段 sep=""**
+5 -4
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: anlian-mq offline smoke
description: 不 listen:装配库表/页面/门禁/WS 路由袋,验证可读路径可构造。
导入:
@@ -45,7 +46,7 @@ description: 不 listen:装配库表/页面/门禁/WS 路由袋,验证可读
**应用 = > 应用.门禁 路径="/write" 角色="admin" 匹配="prefix" 拒绝="redirect"**
**应用 = > 应用.路由实时 路径="/chat/ws" 模式="broadcast"**
**gates = [gates](应用)**
**gates = [gates](access(应用, "gates"))**
**n = > len value=`gates`**
1. `n` >= 2
> print text=gates-ok
@@ -53,9 +54,9 @@ description: 不 listen:装配库表/页面/门禁/WS 路由袋,验证可读
> print text=gates-fail
> sys.exit code=1
**ws = [ws_routes](应用)**
**room = [/chat/ws](ws)**
**mode = [mode](room)**
**ws = [ws_routes](access(应用, "ws_routes"))**
**room = [/chat/ws](access(ws, "/chat/ws"))**
**mode = [mode](access(room, "mode"))**
1. `mode` == "broadcast"
> print text=ws-ok
2. *
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: styles/shell
description: 暗恋见君壳样式——对照 Django 原站粉玻璃 + 动效,用表格声明。
导入:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: browser counter (C3)
description: wire table + browser.set_text — no json glue
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: browser fetch (C4)
description: fetch/after effects via lib/browser — no json glue
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: browser form (D3)
description: input wire passes value; effects via lib/browser
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: browser-media (route F)
description: file / canvas / audio / observers / drag — GFM tables + lib/browser
import:
@@ -1,4 +1,5 @@
---
markup: occlusion
title: resolve_config
capability: config.resolve
status: stable
@@ -1,4 +1,5 @@
---
markup: occlusion
title: Engineering Knowledge demo
description: Tiny project demonstrating Capability Catalog + reuse + decisions.
---
@@ -1,4 +1,5 @@
---
markup: occlusion
id: document.invoice-answer
type: Answer
import:
@@ -7,7 +8,7 @@ import:
# 发票回答
**总额 = [订单的含税总价](pricing.订单定价.含税总额(订单))**
**总额 = [订单的含税总价](access(pricing.订单定价.含税总额(订单), "订单的含税总价"))**
这张订单的含税总额是[含税总价](总额)。
@@ -1,4 +1,5 @@
---
markup: occlusion
id: schema.order
type: Schema
---
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: Fact
id: libai
title: 李白
@@ -1,4 +1,5 @@
---
markup: occlusion
import:
libai: libai.mq.md
---
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
# main
诗人李白的出生年份是[出生年份](李白.出生年份)。
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
# 诗人
| 字段 | 类型 | 说明 |
+3 -2
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: Least squares via lstsq
description: Overdetermined Ax≈b with ext/linalg lstsq + heatmap.
import:
@@ -28,8 +29,8 @@ $$
**`_` = > la.draw factor=`A` kind="heatmap" theme="light" path="ls-heatmap.svg"**
**`ls` = > la.lstsq a=`A` b=`b`**
**`x` = [x](ls)**
**`resid` = [residual_fro](ls)**
**`x` = [x](access(ls, "x"))**
**`resid` = [residual_fro](access(ls, "residual_fro"))**
> print text=`x`
> print text=`resid`
+2 -1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: SVD structure demo
description: Diagonal SVD + structure SVG via ext/linalg.
import:
@@ -18,7 +19,7 @@ $$
**`M` = > la.from_formula formula=`M`**
**`f` = > la.factorize matrix=`M` kind="svd"**
**`S` = [S](f)**
**`S` = [S](access(f, "S"))**
**`_` = > la.draw factor=`f` kind="svd" theme="light" path="svd-structure.svg"**
**`hm` = > la.draw factor=`M` kind="hinton" path="svd-hinton.svg"**
+3 -2
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: Transpose identity (formula document)
description: (AB)^T = B^T A^T as a runnable lecture fragment.
import:
@@ -19,8 +20,8 @@ Declare shapes in a table, form \(P = AB\), then check \((AB)^\top = B^\top A^\t
| 2 | B | 3 | 2 |
**`env` = > la.declare table=`shapes`**
**`A` = [A](env)**
**`B` = [B](env)**
**`A` = [A](access(env, "A"))**
**`B` = [B](access(env, "B"))**
**`P` = `A` * `B`**
**`t` = > `P`.T_ascii**
> print text=`t`
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: Fact
id: libai
title: 李白
+4
View File
@@ -1,2 +1,6 @@
---
markup: occlusion
---
# main
用户想要知道李白的出生年份,我们要告诉用户[李白的出生年份](李白.李白的出生年份)
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: endpoint
method: POST
path: /api/echo
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: endpoint
method: GET
path: /api/ping
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 页脚
站点页脚。放版权与概览链接。
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 导航
站点顶部导航。首项是站点名(渐变 Logo 由主题 CSS 处理),`后台` 指向需要登录的 `/admin`。
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 侧栏
右侧归档面板:文章入口、标签、实时小部件。
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: blog posts schema
import:
data: ext/data/db.mq.md
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## posts
文章主表结构。`slug` 用于详情页 `/post/{slug}` 的动态路由;`content` 存 Markdown 正文;`tag` 是主标签(tags 表 slug)。
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## posts
种子文章。首页与详情页的初始数据。created_at 用于按时间倒序展示;tag 是主标签 slug。
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: web
title: Marqdo 博客
route: /
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
类型: 网页
路由: /about
方法: GET
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: web
title: Post
route: /post/{slug}
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: marqdo-blog serve
description: Scan Artifact documents/endpoints and listen (ADR 0007).
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: styles/theme
description: 博客主题:样式即数据表格,装配即函数。
import:
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 加一
对于输入变量`n`,我们执行 **`n` = `n` + 1**,然后把更新后的值作为结果返回 *`n`*。
+3 -2
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: 贝尔态:两个量子比特如何一起回答
description: 从一条假设开始,搭电路、看概率、画图,并用断言验收。
import:
@@ -31,8 +32,8 @@ import:
我们期待什么?如果假设成立,`概率`应该只在「00」与「11」上有值,而且各占一半。
先把两个关键概率取出来,读者不必在长映射里找:
**`p00` = [00](概率)**
**`p11` = [11](概率)**
**`p00` = [00](access(概率, "00"))**
**`p11` = [11](access(概率, "11"))**
> print text=`p00`
> print text=`p11`
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: 一份可执行的求导讲义
description: 公式、求导、求根、求值与绘图,在同一条叙述里完成。
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: Bell state
description: H then CX; probabilities ≈ 1/2; circuit SVG.
import:
+2 -1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: Entanglement lab
description: Bell state — density, partial trace, Schmidt, themed SVG (Q7/Q8).
import:
@@ -31,7 +32,7 @@ Build |Φ⁺⟩ with H then CX. Full-state purity stays 1; tracing out one qubit
**ezz = > `qc`.expect obs=`zz`**
**sch = > `qc`.schmidt cut=1**
**ent = [entropy](sch)**
**ent = [entropy](access(sch, "entropy"))**
**_ = > `qc`.draw path="entangle-circuit.svg" theme="dark"**
**_ = > `qc`.draw kind="hinton" path="entangle-hinton.svg"**
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: GHZ state
description: 3-qubit GHZ; |000⟩/|111⟩ ≈ 1/2; probs + H matrix heatmap.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
type: web
title: Marqdo client site
route: /
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-client-site serve
import:
web: ext/web/web.mq.md
@@ -1,4 +1,5 @@
---
markup: occlusion
title: client counter (route D)
description: wired by client_embed auto-mount; GFM + lib/browser
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-collab-doc
description: Two-browser collaborative plain-text editor over WS room (LWW snapshot sync)
import:
@@ -1,4 +1,5 @@
---
markup: occlusion
title: collab client
description: LWW text sync over WS room + presence (DOC\\t protocol)
import:
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 页脚
`页脚` =
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 导航
站点顶部导航。`后台` 指向需要登录的 `/admin`。
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 侧栏
本示例展示了哪些特性。
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 结构
`字段` =
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: db/index
description: 打开 sqlite、建表、幂等种子。
导入:
+5 -4
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: 网络扩展站(中文)
description: 首页 + /about + /new(表单)+ /tools(lib/net)+ /admin(登录鉴权)+ /live(WebSocket)。
导入:
@@ -56,18 +57,18 @@ description: 首页 + /about + /new(表单)+ /tools(lib/net)+ /admin(
<!-- 工具页:用 lib/net 解析展示 -->
**解析请求 = > net.解析Cookie 内容="session=abc123; theme=dark"**
**请求块 = [1](解析请求)**
**请求块 = [1](access(解析请求, "1"))**
**解析响应 = > net.解析Cookie 内容="id=42; Path=/; HttpOnly; SameSite=Lax" 是响应头=True**
**响应块 = [1](解析响应)**
**响应块 = [1](access(解析响应, "1"))**
`边界` = ----b
`正文` = "--`边界`\nContent-Disposition: form-data; name=\"title\"\n\n你好\n--`边界`\nContent-Disposition: form-data; name=\"封面\"; filename=\"pic.png\"\nContent-Type: image/png\n\n<字节>\n--`边界`--\n"
**多部分 = > net.解析多部分 正文=`正文` 边界=`边界`**
**字段块 = [1](多部分)**
**文件块 = [2](多部分)**
**字段块 = [1](access(多部分, "1"))**
**文件块 = [2](access(多部分, "2"))**
`工具段` =
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## 顶栏
`顶栏` =
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## foot
`foot` =
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## nav
Site top navigation. The Admin tab points at the login-gated admin page.
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## side
Sidebar index of what this example demonstrates.
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## schema
`fields` =
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: db/index
description: Open sqlite, init articles, seed once.
import:
+5 -4
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-net-site
description: Home + /about + /new (form) + /tools (net lib) + /admin (auth) + /live (WebSocket).
import:
@@ -47,12 +48,12 @@ About page: same shell.
Parse a `Cookie` request header with the standard library.
**parsed_req = > net.cookie_parse text="session=abc123; theme=dark"**
**req_cookie = [1](parsed_req)**
**req_cookie = [1](access(parsed_req, "1"))**
Parse a `Set-Cookie` response header.
**parsed_resp = > net.cookie_parse text="id=42; Path=/; HttpOnly; SameSite=Lax" is_response=True**
**resp_cookie = [1](parsed_resp)**
**resp_cookie = [1](access(parsed_resp, "1"))**
Parse a `multipart/form-data` body.
@@ -61,8 +62,8 @@ Parse a `multipart/form-data` body.
`_body` = "--`_b`\nContent-Disposition: form-data; name=\"title\"\n\nHello\n--`_b`\nContent-Disposition: form-data; name=\"cover\"; filename=\"pic.png\"\nContent-Type: image/png\n\n<bytes>\n--`_b`--\n"
**mp = > net.multipart_parse body=`_body` boundary=`_b`**
**mp_title = [1](mp)**
**mp_cover = [2](mp)**
**mp_title = [1](access(mp, "1"))**
**mp_cover = [2](access(mp, "2"))**
Build the tools page as one HTML intro (intro is served raw).
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## topnav
`topnav` =
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/desk
description: 管理台壳 — 顶栏品牌为「后台」,无前台侧栏。
---
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## foot
`foot` =
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## nav
顶栏:**登录**(访客)/ **后台** + **退出**(已登录)。
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## side
`side` =
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## schema
`fields` =
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: db/index
description: 打开 sqlite、建表、幂等种子。
导入:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: 中文站点示例
description: >-
与 examples/web-site 对等的 WWW Demo 样站:表驱动全站;作者业务 JS=0;作者 .css=0。
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: styles/shell
description: >-
Literary dark theme for examples/web-site — ink / wine / gold after the
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: components/desk
description: Admin desk chrome — brand reads Admin; no public side rail.
---
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## foot
`foot` =
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## nav
Brand first, then demo routes. Guest sees **Login**; signed-in sees **Admin** + **Logout**.
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## side
Hands-on demo checklist (links only — no JS).
+4
View File
@@ -1,3 +1,7 @@
---
markup: occlusion
---
## schema
`fields` =
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: db/index
description: Open sqlite, init articles, seed once.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-site
description: >-
WWW Demo sample — GFM tables for shell, schema, forms, styles, and admin.
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: styles/shell
description: >-
Literary dark theme for examples/web-site — ink / wine / gold after the
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-spa-app
description: Native Marqdo SPA — list/detail/edit via WASM client routes + memory store
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-tenant-saas demo
description: Dual-tenant isolation via ?t= query + tenant_scope JSON API.
import:
+1
View File
@@ -1,4 +1,5 @@
---
markup: occlusion
title: web-ws-room demo
description: Dynamic room WS with presence (G-WS1/2 bag). Open / and connect via bridge or wscat.
import: