@sushanglewis/lincoln 1.8.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/framework/.claude/skills/build-product-prototype/prompts/main.md +15 -17
- package/framework/.claude/skills/lc-workflow/validators/validate.py +7 -14
- package/framework/.claude-plugin/marketplace.json +2 -2
- package/framework/.claude-plugin/plugin.json +1 -1
- package/framework/.version-bump.json +1 -1
- package/framework/README.en.md +14 -2
- package/framework/README.md +14 -2
- package/framework/RELEASE.md +23 -0
- package/framework/manifest.json +15 -15
- package/framework/scripts/lincoln_index.py +3 -24
- package/framework/scripts/lincoln_render.py +6 -4
- package/framework/tools/lincoln/package-lock.json +2 -2
- package/framework/tools/lincoln/package.json +1 -1
- package/framework/tools/lincoln-installer/package.json +1 -1
- package/package.json +1 -1
|
@@ -60,7 +60,7 @@ You may still read the categorized example templates under `.claude/templates/is
|
|
|
60
60
|
|
|
61
61
|
Use the structured renderer with `--data` containing `sections`, `pages`, and `interactions` as appropriate.
|
|
62
62
|
|
|
63
|
-
5. **Plan prototype generation granularity.** Before writing prototype pages, derive a **角色×场景矩阵** from `scenarios.html` and `page-map.html`: rows are the user roles/personas, columns are the key scenarios (including boundary cases such as empty, loading, error, success). Every cell that a real user can reach must map to exactly one prototype sub-page; the matrix itself is written into `ui-spec.html` (章节 `## 角色×场景矩阵`) and serves as the splitting contract. Then group the sub-pages into cohesive clusters (e.g. onboarding, main shell, settings, overlays, tray). Generate one cluster at a time. After each cluster, verify that every page has complete
|
|
63
|
+
5. **Plan prototype generation granularity.** Before writing prototype pages, derive a **角色×场景矩阵** from `scenarios.html` and `page-map.html`: rows are the user roles/personas, columns are the key scenarios (including boundary cases such as empty, loading, error, success). Every cell that a real user can reach must map to exactly one prototype sub-page; the matrix itself is written into `ui-spec.html` (章节 `## 角色×场景矩阵`) and serves as the splitting contract. Then group the sub-pages into cohesive clusters (e.g. onboarding, main shell, settings, overlays, tray). Generate one cluster at a time. After each cluster, verify that every page has complete hotspot annotations (numbered badges covering functionality, fields, boundary cases, and exception flows) before starting the next cluster.
|
|
64
64
|
|
|
65
65
|
Each cluster is organized by one main shell page (e.g. `pages/prototype/{app,web,mobile}/main/page.html`) whose `navItems` link to all sub-pages of that cluster, so the portal viewer can walk every role/scenario state from a single entry page.
|
|
66
66
|
|
|
@@ -85,15 +85,13 @@ You may still read the categorized example templates under `.claude/templates/is
|
|
|
85
85
|
navItems:
|
|
86
86
|
- {id: dashboard, label: 概览, href: ./dashboard/page.html}
|
|
87
87
|
- {id: list, label: 列表, href: ./list/page.html}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
doc-exceptions: "..."
|
|
96
|
-
doc-refs: "flows.html | page-map.html"
|
|
88
|
+
hotspots:
|
|
89
|
+
- target: "metric-revenue" # CSS selector, data-uid, or element id
|
|
90
|
+
title: "营收指标卡"
|
|
91
|
+
text: "展示本月营收与环比;点击进入详情页。"
|
|
92
|
+
- target: "#global-search"
|
|
93
|
+
title: "全局搜索"
|
|
94
|
+
text: "支持名称/拼音/首字母搜索,回车跳转首个结果。"
|
|
97
95
|
components:
|
|
98
96
|
- type: html
|
|
99
97
|
uid: dashboard-metrics
|
|
@@ -112,11 +110,11 @@ You may still read the categorized example templates under `.claude/templates/is
|
|
|
112
110
|
- Link to `../../../assets/prototype.css` and `../../../assets/prototype.js` (depth 3) or `../../../../assets/...` (depth 4) depending on its path.
|
|
113
111
|
- Include theme sync support (built into the structured template).
|
|
114
112
|
- Include `<meta name="prototype-base" content="../../../">` (or `../../../../` for depth 4).
|
|
115
|
-
- Include `<meta name="page-uid" content="...">`, `<meta name="nav-group" content="...">`, and `<meta name="nav-label" content="...">` (injected by the renderer from CLI args;
|
|
116
|
-
- Provide
|
|
117
|
-
- State the applicable role(s), scenario, page state (default / empty / loading / error / success), and which functions are visible and usable in that state via the
|
|
118
|
-
- Depict only the final system as it will ship: no demo-only buttons, explanatory text rows, or walkthrough-only jumps. Explanations belong in the `
|
|
119
|
-
- Declare the user story and business-flow step the page implements
|
|
113
|
+
- Include `<meta name="page-uid" content="...">`, `<meta name="nav-group" content="...">`, and `<meta name="nav-label" content="...">` (injected by the renderer from CLI args; hotspots come from the YAML `hotspots` block and are rendered as numbered badges via driver.js).
|
|
114
|
+
- Provide a `hotspots` array so numbered on-page badges explain functionality, layout, fields, boundary cases, and exception flows (hover for the popover, click to pin; the prototype toolbar can hide badges).
|
|
115
|
+
- State the applicable role(s), scenario, page state (default / empty / loading / error / success), and which functions are visible and usable in that state via the hotspot `title`/`text` entries, so each sub-page precisely depicts what a given role sees and can do in that case.
|
|
116
|
+
- Depict only the final system as it will ship: no demo-only buttons, explanatory text rows, or walkthrough-only jumps. Explanations belong in the `hotspots` badges rendered on the page, never as on-screen prose.
|
|
117
|
+
- Declare the user story and business-flow step the page implements in the hotspot `text` entries, so the prototype aligns bidirectionally with the PRD: every flow step has at least one page, and every page belongs to a flow step or story.
|
|
120
118
|
- Use `LincolnPrototype.ui` builders and `prototype.css` tokens for every visual element so both light and dark themes render correctly; verify both themes by toggling the portal theme switch.
|
|
121
119
|
- Assign a stable `data-uid` attribute to every interactive element, screen region, and WebView placeholder.
|
|
122
120
|
- Override `LincolnPrototype.data` in the page script for issue-specific mock data (user, org, webviews, settings, unread items).
|
|
@@ -143,7 +141,7 @@ You may still read the categorized example templates under `.claude/templates/is
|
|
|
143
141
|
- Keep controls and states complete enough for implementation: default, hover/focus where relevant, disabled, empty, loading, error, and success.
|
|
144
142
|
- Every interactive element must carry a stable `data-uid`. Do not generate random UIDs that change on every render.
|
|
145
143
|
- Prototype links use relative paths so they work both inside the portal iframe and when opened standalone.
|
|
146
|
-
- Do not add
|
|
144
|
+
- Do not add custom chrome to the portal. The portal sidebar is collapsible and supports focus mode out of the box; prototype pages open in focus mode automatically.
|
|
147
145
|
- The system tray is portal-level chrome. Never redraw the tray inside an app prototype page with `.menubar`, `.tray-icon`, `.tray-panel`, `bindTray`, or `trayMenu`. Tray scenario pages must be thin controllers that post `lincoln-tray-state` messages to the portal.
|
|
148
|
-
- 原型即最终系统样貌:禁止仅用于演示的模拟按钮、屏内说明文字与演示跳转;解释一律走 `
|
|
146
|
+
- 原型即最终系统样貌:禁止仅用于演示的模拟按钮、屏内说明文字与演示跳转;解释一律走 `hotspots` 数字角标(driver.js,hover 弹出说明)呈现;每个原型页面经角标 `text` 标注所属用户故事与业务流程步骤,与 PRD 文字双向对齐。
|
|
149
147
|
- After approval, tell the user to run: `claude plan-tdd-development <session_id> <design_id>`.
|
|
@@ -526,22 +526,15 @@ def validate_prototype_artifact_complete(design_id: str):
|
|
|
526
526
|
if missing_nav_label:
|
|
527
527
|
fail(f"Prototype pages missing nav-label meta: {', '.join(missing_nav_label)}")
|
|
528
528
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
("doc-layout", 'doc-layout'),
|
|
532
|
-
("doc-fields", 'doc-fields'),
|
|
533
|
-
("doc-boundaries", 'doc-boundaries'),
|
|
534
|
-
("doc-exceptions", 'doc-exceptions'),
|
|
535
|
-
]
|
|
536
|
-
annotation_gaps: dict[str, list[str]] = {}
|
|
529
|
+
# Explanations are numbered on-page hotspots (driver.js), not doc-* metas.
|
|
530
|
+
hotspot_gaps: dict[str, str] = {}
|
|
537
531
|
for p in html_files:
|
|
538
532
|
text = p.read_text(encoding="utf-8")
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
fail(f"Prototype pages missing required annotation meta tags:\n" + "\n".join(messages))
|
|
533
|
+
if '"hotspots"' not in text:
|
|
534
|
+
hotspot_gaps[str(p.relative_to(process_root()))] = '"hotspots"'
|
|
535
|
+
if hotspot_gaps:
|
|
536
|
+
messages = [f"{path}: missing {key} in pageData" for path, key in hotspot_gaps.items()]
|
|
537
|
+
fail(f"Prototype pages missing required hotspot annotations:\n" + "\n".join(messages))
|
|
545
538
|
|
|
546
539
|
# Anti-pattern: in-app tray redraw. The system tray is portal-level chrome.
|
|
547
540
|
in_app_tray_markers = [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "lincoln",
|
|
11
11
|
"description": "AI-Native product R&D collaboration system for Conductor + Claude Code. Orchestrates stages, gates, artifacts, skills, and roles across product, design, and engineering into a repeatable workflow from recordings to GitHub Issues to Obsidian knowledge base.",
|
|
12
|
-
"version": "1.
|
|
12
|
+
"version": "1.9.0",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "Lincoln contributors"
|
|
15
15
|
},
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
|
-
"version": "1.
|
|
31
|
+
"version": "1.9.0"
|
|
32
32
|
}
|
package/framework/README.en.md
CHANGED
|
@@ -12,9 +12,9 @@ Lincoln is an AI-Native R&D workflow system spanning **IDEs, agent harnesses, co
|
|
|
12
12
|
|
|
13
13
|
## Latest Release
|
|
14
14
|
|
|
15
|
-
[](RELEASE.md)
|
|
16
16
|
|
|
17
|
-
**v1.
|
|
17
|
+
**v1.9.0** is released: the issue-package portal is rebuilt as a docsify-style documentation framework — collapsible/filterable sidebar, focus mode, full Markdown rendering via marked, and driver.js numbered hotspot annotations, all openable via file:// with zero services (#131).
|
|
18
18
|
|
|
19
19
|
See the full release notes in [RELEASE.md](RELEASE.md).
|
|
20
20
|
|
|
@@ -175,6 +175,17 @@ Every requirement maps to one GitHub issue and one Lincoln feature branch. The `
|
|
|
175
175
|
- `pages/prototype/` — interactive HTML prototypes
|
|
176
176
|
- `handoffs/` — stage handoff documents
|
|
177
177
|
|
|
178
|
+
### Docsify-Style Portal & Numbered Hotspot Annotations
|
|
179
|
+
|
|
180
|
+
The `index.html` portal adopts a docsify-style documentation framework: content is baked at generation time with zero runtime requests, so packages open directly via **file://** and can also be pushed to static hosting for shareable links (`#/pages/docs/prd.html` deep links included):
|
|
181
|
+
|
|
182
|
+
- **Sidebar**: collapsible groups with remembered state, a filter box for instant page location, collapse/expand-all
|
|
183
|
+
- **Focus mode**: hides the sidebar while reading docs or reviewing prototypes, giving prototypes full-width space (Esc to exit)
|
|
184
|
+
- **Documents**: marked (MIT) renders full Markdown — images, tables, task lists, and mermaid diagrams, all synced with the portal's light/dark theme
|
|
185
|
+
- **Prototype annotations**: declare `hotspots` in the page YAML to render numbered badges on elements; hover for the explanation without on-screen prose
|
|
186
|
+
|
|
187
|
+
Run `lincoln update` after upgrading to sync the latest portal templates and runtimes into every harness and project.
|
|
188
|
+
|
|
178
189
|
## Natural-Language Interaction
|
|
179
190
|
|
|
180
191
|
Lincoln is AI-Native — **you don't need to type terminal commands**. Describe your intent in plain language and the Agent translates and executes the right scripts for you.
|
|
@@ -242,6 +253,7 @@ Before submitting a PR, please read:
|
|
|
242
253
|
|
|
243
254
|
| Version | Date | Key capabilities |
|
|
244
255
|
|---|---|---|
|
|
256
|
+
| v1.9.0 | 2026-10-12 | Docsify-style issue-package portal: collapsible/filterable sidebar, focus mode, full Markdown rendering via marked, driver.js numbered hotspot annotations, hash deep links (#131) |
|
|
245
257
|
| v1.8.4 | 2026-10-08 | PM-stage PRD quality gates: six-question clarity check, 13-section progressive PRD skeleton, content-hygiene and cross-validation checks, final-system-only prototype discipline (#129) |
|
|
246
258
|
| v1.8.3 | 2026-10-08 | Less-is-more artifact discipline (hook-injected); platform-aware install hints for non-npm CLIs; `lincoln update` refreshes external skill libraries |
|
|
247
259
|
| v1.7.0 | 2026-09-05 | SecurityAnalyzer gating; Trace 2.0 event log; friction scoring/knowledge recall/trace condensation/MR mining; parallel specialist delegation; stakeholder analysis model |
|
package/framework/README.md
CHANGED
|
@@ -12,9 +12,9 @@ Lincoln 是一个贯穿 **IDE、Agent Harness、代码托管、知识管理、
|
|
|
12
12
|
|
|
13
13
|
## 最新版本
|
|
14
14
|
|
|
15
|
-
[](RELEASE.md)
|
|
16
16
|
|
|
17
|
-
**v1.
|
|
17
|
+
**v1.9.0** 已发布:issue-package 门户升级为 docsify 风格文档框架——可折叠可过滤目录、focus 模式、marked 完整 Markdown 渲染、driver.js 数字角标注解,零服务 file:// 直接打开(#131)。
|
|
18
18
|
|
|
19
19
|
查看完整发布说明:[RELEASE.md](RELEASE.md)
|
|
20
20
|
|
|
@@ -177,6 +177,17 @@ AI 生成的交接产物容易内容堆积、重点淹没。Lincoln 把「少即
|
|
|
177
177
|
- `pages/prototype/` — 可交互原型 HTML 页面
|
|
178
178
|
- `handoffs/` — 阶段交接文档
|
|
179
179
|
|
|
180
|
+
### docsify 式门户与数字角标注解
|
|
181
|
+
|
|
182
|
+
`index.html` 门户采用 docsify 风格的文档框架,生成时烘焙、运行时零外部请求,**file:// 双击即可浏览**,也可由流水线推到静态托管后直接分享链接(`#/pages/docs/prd.html` 支持深链定位):
|
|
183
|
+
|
|
184
|
+
- **目录**:分组折叠(状态记忆)、过滤框实时定位、一键收起/展开;文档与原型分组清晰
|
|
185
|
+
- **Focus 模式**:阅读文档或验收原型时隐藏目录,原型获得全屏空间(Esc 退出)
|
|
186
|
+
- **文档**:marked(MIT)完整渲染 Markdown——图片、表格、任务列表、mermaid 流程图,随门户明暗主题切换
|
|
187
|
+
- **原型注解**:页面 YAML 声明 `hotspots` 后在元素上生成数字角标,hover 查看说明,解释不再占用屏内空间
|
|
188
|
+
|
|
189
|
+
升级到本版本后执行 `lincoln update` 即同步最新门户模板与运行时。
|
|
190
|
+
|
|
180
191
|
## 自然语言交互
|
|
181
192
|
|
|
182
193
|
Lincoln 是 AI-Native 工作流——**你不需要在终端输入任何命令**。直接用自然语言描述意图,Agent 会自动翻译成对应脚本并代为执行。
|
|
@@ -244,6 +255,7 @@ Lincoln 的 `.claude/` 是开放的系统提示层,欢迎基于同一套元模
|
|
|
244
255
|
|
|
245
256
|
| 版本 | 日期 | 关键能力 |
|
|
246
257
|
|---|---|---|
|
|
258
|
+
| v1.9.0 | 2026-10-12 | docsify 式 issue-package 门户:可折叠过滤目录、focus 模式、marked 完整 Markdown 渲染、driver.js 数字角标注解、hash 深链(#131) |
|
|
247
259
|
| v1.8.4 | 2026-10-08 | PM 阶段 PRD 质量门控:需求六问自检、13 章递进骨架、PRD 内容卫生与交叉验证校验、原型最终样貌纪律(#129) |
|
|
248
260
|
| v1.8.3 | 2026-10-08 | 少即是多制品生成纪律(hook 注入);非 npm CLI 平台化安装提示;`lincoln update` 同步刷新外部技能库 |
|
|
249
261
|
| v1.7.0 | 2026-09-05 | SecurityAnalyzer 安全门控;Trace 2.0 事件日志;摩擦学习/知识召回/Trace 浓缩/MR 挖掘;并行专家子代理委托;相关者分析模型 |
|
package/framework/RELEASE.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# Lincoln v1.9.0 Release Notes
|
|
2
|
+
|
|
3
|
+
**Release date:** 2026-10-12
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- **docsify 式 issue-package 门户 + 数字角标注解 (#131 / LEW-76)** — issue-package 的 `index.html` 人读门户整体升级为 docsify 风格的文档承载框架,生成时烘焙、运行时零请求,继续支持 file:// 双击打开与静态托管零部署:
|
|
8
|
+
- **docsify 式门户风格** — 白色侧边栏顶部药丸搜索框、加粗分组标题带 ▸/▾ 折叠箭头、激活页浅绿底 + 绿色左边条;文档内容区去掉窗口卡片,860px 居中大号排版(h1 34px、1.75 行距)、蓝色竖条引用样式;顶部精简为 40px 白色工具条(聚焦/主题/托盘/日期)。
|
|
9
|
+
- **可折叠、可定位的目录** — 目录分组独立折叠(状态存 localStorage)+ 一键全部收起/展开;过滤框按标题/路径匹配并自动展开命中组、高亮定位;文档与原型分组一目了然。右侧说明面板与「必要产物清单」从目录栏移除。
|
|
10
|
+
- **Focus 模式** — 菜单栏按钮或打开原型页自动进入:目录整体隐藏、内容 100% 宽,原型获得最大展示空间,Esc 退出。
|
|
11
|
+
- **完整 Markdown 渲染(marked)** — vendor `marked` v18(MIT,docsify 同款渲染器)替换手写解析器:图片、表格、任务列表等原生元素全支持;mermaid 代码块自动渲染并随门户明暗主题切换;`<script id="docSource">` 内嵌契约不变,全部 PRD 门控校验零回归。
|
|
12
|
+
- **数字角标注解(driver.js)** — vendor `driver.js` v1.9(MIT);原型 YAML 新增 `hotspots: [{target, title, text}]`,在搜索框、字段、卡片等元素上渲染数字角标,hover 弹出说明、点击固定、可整体隐藏,解释不再依赖门户右侧面板,也不再以屏内文字出现。
|
|
13
|
+
- **hash 深链路由** — `#/pages/docs/prd.html` 形式的地址可直接定位到任意文档或原型页,Agent share 链接给人类验收更友好。
|
|
14
|
+
- 顺带修复:结构化原型模板资源引用深度(depth-3 → depth-4)与技能规范不一致导致 `prototype.js` 404 的问题。
|
|
15
|
+
|
|
16
|
+
## Migration Notes
|
|
17
|
+
|
|
18
|
+
- 无破坏性变更:新门户由 `lincoln_index.py` 重新生成 `package-data.js` 后自动生效;进行中的 issue 工作包在包目录内重跑 `scripts/lincoln_index.py`(或任一 `stage_loader.py` 产物记录动作)即完成升级。
|
|
19
|
+
- 原型页的 `doc-*` 注解 meta 已被 `hotspots` 取代:`prototype_artifact_complete` 校验器现要求页面数据含 `hotspots`;存量原型页在下一次 `build-product-prototype` 重渲染时自动迁移。
|
|
20
|
+
- 升级方式:`npm install -g @sushanglewis/lincoln@latest` 后执行 `lincoln update`,即把新门户模板、marked/driver.js 运行时与校验器同步进各 harness 与项目。
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
1
24
|
# Lincoln v1.8.4 Release Notes
|
|
2
25
|
|
|
3
26
|
**Release date:** 2026-10-08
|
package/framework/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"version": "1.9.0",
|
|
3
|
+
"generatedAt": "2026-10-12T03:56:22.196Z",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": ".claude-plugin/hooks.json",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"path": ".claude-plugin/marketplace.json",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "1fa447cb84c758beb21134854712cb938b5bc0e7dc01bccf48047c6b63f118ba"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": ".claude-plugin/plugin.json",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "9eaf9b63df95f32433d655a46a0f976dddedde2e9201908228835cfbc50ff897"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": ".claude/agents/architect.md",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"path": ".claude/skills/build-product-prototype/prompts/main.md",
|
|
175
|
-
"sha256": "
|
|
175
|
+
"sha256": "eb2a23f58f8b0bf28263b03484ff0c672a72f3f10e300fecabb35097cfe5f994"
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"path": ".claude/skills/clarify-requirements/SKILL.md",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"path": ".claude/skills/lc-workflow/validators/validate.py",
|
|
351
|
-
"sha256": "
|
|
351
|
+
"sha256": "5668b9ef229e5c42cfb41cfe75e1c4b7bb5cafdf727f2e18b4257a3a9c41bf4f"
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"path": ".claude/skills/plan-tdd-development/SKILL.md",
|
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
},
|
|
541
541
|
{
|
|
542
542
|
"path": ".version-bump.json",
|
|
543
|
-
"sha256": "
|
|
543
|
+
"sha256": "6abdf12c5f36113acbfc13f2261cded6efb331cea7e6649a0157740b5cc4349a"
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
"path": "CLAUDE.md",
|
|
@@ -556,15 +556,15 @@
|
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
558
|
"path": "README.en.md",
|
|
559
|
-
"sha256": "
|
|
559
|
+
"sha256": "386c243a93a88b13a8e7fde9d6e189014fdc9909246fe38c510a47f278450af6"
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
"path": "README.md",
|
|
563
|
-
"sha256": "
|
|
563
|
+
"sha256": "28e96b5cbbf45f3d710d8d9811a200bc38f6ca5fba804712b103364e33c91f91"
|
|
564
564
|
},
|
|
565
565
|
{
|
|
566
566
|
"path": "RELEASE.md",
|
|
567
|
-
"sha256": "
|
|
567
|
+
"sha256": "ad4237d5b283200e49a7b3b2f2a4387cf12e69e6732c5794bec1a55a3d2da5ee"
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
570
|
"path": "SKILL.md",
|
|
@@ -684,7 +684,7 @@
|
|
|
684
684
|
},
|
|
685
685
|
{
|
|
686
686
|
"path": "scripts/lincoln_index.py",
|
|
687
|
-
"sha256": "
|
|
687
|
+
"sha256": "d9212b5fee3808d031f849b79e2cfb734834859ed126fa319d5c2d0024cacf2b"
|
|
688
688
|
},
|
|
689
689
|
{
|
|
690
690
|
"path": "scripts/lincoln_mr_mine.py",
|
|
@@ -704,7 +704,7 @@
|
|
|
704
704
|
},
|
|
705
705
|
{
|
|
706
706
|
"path": "scripts/lincoln_render.py",
|
|
707
|
-
"sha256": "
|
|
707
|
+
"sha256": "923ff42a64b36c955bab4e0213f7191f1971cb981b2c5a70ff2410e3feea9a3a"
|
|
708
708
|
},
|
|
709
709
|
{
|
|
710
710
|
"path": "scripts/lincoln_role.py",
|
|
@@ -788,7 +788,7 @@
|
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
790
|
"path": "tools/lincoln-installer/package.json",
|
|
791
|
-
"sha256": "
|
|
791
|
+
"sha256": "03b08328e3ccd97f7d989b5c0cac5017c7b09d9ba1685eb8cd36730468829a91"
|
|
792
792
|
},
|
|
793
793
|
{
|
|
794
794
|
"path": "tools/lincoln-installer/src/cli.tsx",
|
|
@@ -1072,11 +1072,11 @@
|
|
|
1072
1072
|
},
|
|
1073
1073
|
{
|
|
1074
1074
|
"path": "tools/lincoln/package-lock.json",
|
|
1075
|
-
"sha256": "
|
|
1075
|
+
"sha256": "4ac004e537b8f6db8348deb2e6821a079f1bd18f893be87a8a03c910e36516f9"
|
|
1076
1076
|
},
|
|
1077
1077
|
{
|
|
1078
1078
|
"path": "tools/lincoln/package.json",
|
|
1079
|
-
"sha256": "
|
|
1079
|
+
"sha256": "da614ee0caea0ae442defae9bf1a90ce857d2b9de15c9983f2ee9d209410f094"
|
|
1080
1080
|
},
|
|
1081
1081
|
{
|
|
1082
1082
|
"path": "tools/lincoln/src/cli.tsx",
|
|
@@ -29,8 +29,6 @@ PACKAGE_DATA_FILENAME = "assets/js/package-data.js"
|
|
|
29
29
|
ARCHIVE_NAV_GROUP = "归档"
|
|
30
30
|
VERSION_COMMENT_RE = re.compile(r"<!--\s*version:\s*(v\d+\.\d+)\s*-->", re.IGNORECASE)
|
|
31
31
|
STATUS_COMMENT_RE = re.compile(r"<!--\s*status:\s*(\w+)\s*-->", re.IGNORECASE)
|
|
32
|
-
LIST_META_KEYS = ("doc-fields", "doc-stories", "doc-rules", "doc-boundaries", "doc-exceptions", "doc-refs")
|
|
33
|
-
LIST_SEPARATOR = "|"
|
|
34
32
|
|
|
35
33
|
|
|
36
34
|
class MetaParser(HTMLParser):
|
|
@@ -71,13 +69,6 @@ def package_relative(path: str, process_slug: str) -> str:
|
|
|
71
69
|
return path[len(prefix) :] if path.startswith(prefix) else path
|
|
72
70
|
|
|
73
71
|
|
|
74
|
-
def split_list_meta(value: str) -> list[str]:
|
|
75
|
-
"""Split a pipe-separated meta value into a list of trimmed non-empty items."""
|
|
76
|
-
if not value:
|
|
77
|
-
return []
|
|
78
|
-
return [item.strip() for item in value.split(LIST_SEPARATOR) if item.strip()]
|
|
79
|
-
|
|
80
|
-
|
|
81
72
|
def extract_html_meta(full_path: Path) -> dict[str, Any]:
|
|
82
73
|
"""Parse meta tags and version/status comments from an HTML page."""
|
|
83
74
|
if not full_path.exists():
|
|
@@ -91,20 +82,15 @@ def extract_html_meta(full_path: Path) -> dict[str, Any]:
|
|
|
91
82
|
|
|
92
83
|
version_match = VERSION_COMMENT_RE.search(text)
|
|
93
84
|
status_match = STATUS_COMMENT_RE.search(text)
|
|
94
|
-
|
|
85
|
+
return {
|
|
95
86
|
"title": parser.meta.get("doc-title") or parser.title or full_path.stem,
|
|
96
87
|
"nav_label": parser.meta.get("nav-label", ""),
|
|
97
88
|
"nav_group": parser.meta.get("nav-group", "Docs"),
|
|
98
89
|
"version": parser.meta.get("doc-version") or (version_match.group(1) if version_match else None),
|
|
99
90
|
"status": status_match.group(1) if status_match else "",
|
|
100
91
|
"uid": parser.meta.get("doc-uid") or parser.meta.get("page-uid", ""),
|
|
101
|
-
"
|
|
102
|
-
"layout": parser.meta.get("doc-layout", ""),
|
|
92
|
+
"markdown": extract_html_markdown(full_path) if 'id="docSource"' in text else "",
|
|
103
93
|
}
|
|
104
|
-
for key in LIST_META_KEYS:
|
|
105
|
-
field = key.replace("doc-", "")
|
|
106
|
-
meta[field] = split_list_meta(parser.meta.get(key, ""))
|
|
107
|
-
return meta
|
|
108
94
|
|
|
109
95
|
|
|
110
96
|
def extract_html_markdown(full_path: Path) -> str:
|
|
@@ -196,15 +182,8 @@ def build_package_data(
|
|
|
196
182
|
"stage": entry.get("stage", ""),
|
|
197
183
|
"gate_passed": entry.get("gate_passed", False),
|
|
198
184
|
"human_confirmed": entry.get("human_confirmed", False),
|
|
199
|
-
"purpose": entry.get("purpose", ""),
|
|
200
|
-
"layout": entry.get("layout", ""),
|
|
201
|
-
"stories": entry.get("stories", []),
|
|
202
|
-
"fields": entry.get("fields", []),
|
|
203
|
-
"rules": entry.get("rules", []),
|
|
204
|
-
"boundaries": entry.get("boundaries", []),
|
|
205
|
-
"exceptions": entry.get("exceptions", []),
|
|
206
|
-
"refs": entry.get("refs", []),
|
|
207
185
|
"uid": entry.get("uid", ""),
|
|
186
|
+
"markdown": entry.get("markdown", ""),
|
|
208
187
|
}
|
|
209
188
|
)
|
|
210
189
|
|
|
@@ -519,7 +519,7 @@ def _inject_meta(html: str, name: str, content: str) -> str:
|
|
|
519
519
|
|
|
520
520
|
|
|
521
521
|
def _inject_annotation_metas(html: str, page_data: dict[str, Any]) -> str:
|
|
522
|
-
"""Inject
|
|
522
|
+
"""Inject doc annotation meta tags from page_data.annotations into <head>."""
|
|
523
523
|
annotations = page_data.get("annotations") if isinstance(page_data, dict) else None
|
|
524
524
|
if not isinstance(annotations, dict):
|
|
525
525
|
return html
|
|
@@ -716,9 +716,11 @@ def render_page(
|
|
|
716
716
|
uid_kind = _resolve_meta_uid_kind(template, target)
|
|
717
717
|
html = _inject_meta(html, uid_kind, uid)
|
|
718
718
|
|
|
719
|
-
# Inject
|
|
720
|
-
#
|
|
721
|
-
|
|
719
|
+
# Inject doc annotation metas for doc pages only. Prototype pages carry
|
|
720
|
+
# their explanations as on-page hotspots (window.LincolnHotspots) instead.
|
|
721
|
+
is_prototype = "/prototype/" in target or PAGE_UID_META_RE.search(template)
|
|
722
|
+
if not is_prototype:
|
|
723
|
+
html = _inject_annotation_metas(html, page_data or {})
|
|
722
724
|
|
|
723
725
|
html = _ensure_version_comment(html, version)
|
|
724
726
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sushanglewis/lincoln",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sushanglewis/lincoln",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.9.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"ink": "^5.2.0",
|