@sushanglewis/lincoln 1.5.5 → 1.6.1
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/dist/main.js +425 -51
- package/dist/main.js.map +1 -1
- package/dist/postinstall.d.ts +9 -2
- package/dist/postinstall.js +812 -6
- package/dist/postinstall.js.map +1 -1
- package/framework/.claude/agents/architect.md +15 -15
- package/framework/.claude/agents/default.md +118 -104
- package/framework/.claude/agents/designer.md +16 -51
- package/framework/.claude/agents/engineer.md +16 -25
- package/framework/.claude/agents/frontend-engineer.md +15 -16
- package/framework/.claude/agents/knowledge-curator.md +18 -15
- package/framework/.claude/agents/pm.md +16 -75
- package/framework/.claude/agents/qa.md +17 -13
- package/framework/.claude/agents/release-coordinator.md +18 -12
- package/framework/.claude/agents/researcher.md +16 -26
- package/framework/.claude/harnesses/command-map.yaml +12 -5
- package/framework/.claude/hooks/on-session-start.sh +0 -1
- package/framework/.claude/schemas/agent-definition.schema.json +6 -1
- package/framework/.claude/schemas/stage-definition.schema.json +49 -4
- package/framework/.claude/skills/build-product-prototype/prompts/main.md +89 -26
- package/framework/.claude/skills/clarify-requirements/prompts/main.md +80 -14
- package/framework/.claude/skills/draft-product-design/prompts/main.md +24 -12
- package/framework/.claude/skills/lc-build-codebase-knowledge/SKILL.md +2 -0
- package/framework/.claude/skills/lc-explore-opensource/SKILL.md +2 -0
- package/framework/.claude/skills/lc-market-research/SKILL.md +1 -1
- package/framework/.claude/skills/lc-one-id/SKILL.md +81 -0
- package/framework/.claude/skills/lc-one-id/prompts/main.md +35 -0
- package/framework/.claude/skills/lc-stakeholder-research/SKILL.md +1 -1
- package/framework/.claude/skills/lc-workflow-router/SKILL.md +2 -0
- package/framework/.claude/stages/build-codebase-knowledge.yaml +10 -10
- package/framework/.claude/stages/clarify.yaml +21 -15
- package/framework/.claude/stages/explore-opensource.yaml +13 -10
- package/framework/.claude/stages/implement.yaml +11 -11
- package/framework/.claude/stages/ingest.yaml +13 -10
- package/framework/.claude/stages/lc-analyze-frameworks.yaml +13 -10
- package/framework/.claude/stages/lc-collect-intelligence.yaml +13 -10
- package/framework/.claude/stages/lc-competitive-analysis.yaml +13 -10
- package/framework/.claude/stages/lc-first-principles.yaml +13 -10
- package/framework/.claude/stages/lc-market-research.yaml +13 -10
- package/framework/.claude/stages/lc-product-research.yaml +13 -10
- package/framework/.claude/stages/lc-research-report.yaml +13 -10
- package/framework/.claude/stages/lc-research-scope.yaml +13 -10
- package/framework/.claude/stages/lc-stakeholder-research.yaml +13 -10
- package/framework/.claude/stages/lc-storytelling.yaml +13 -10
- package/framework/.claude/stages/product-design-docs.yaml +30 -18
- package/framework/.claude/stages/product-prototype.yaml +20 -17
- package/framework/.claude/stages/propose.yaml +16 -9
- package/framework/.claude/stages/split.yaml +13 -9
- package/framework/.claude/stages/sync-knowledge.yaml +20 -9
- package/framework/.claude/stages/tdd-development-plan.yaml +17 -9
- package/framework/.claude/stages/workflow-router.yaml +17 -13
- package/framework/.claude/workflows/bug-fix.yaml +1 -0
- package/framework/.claude/workflows/existing-project-iteration.yaml +1 -0
- package/framework/.claude/workflows/interview-to-knowledge.yaml +1 -0
- package/framework/.claude/workflows/oss-first-design.yaml +1 -0
- package/framework/.claude-plugin/marketplace.json +2 -2
- package/framework/.claude-plugin/plugin.json +2 -1
- package/framework/.version-bump.json +1 -1
- package/framework/README.en.md +15 -2
- package/framework/README.md +16 -3
- package/framework/RELEASE.md +32 -0
- package/framework/manifest.json +93 -73
- package/framework/scripts/check-prompt-drift.py +132 -1
- package/framework/scripts/extract_release_notes.py +79 -0
- package/framework/scripts/init-lincoln-branch.sh +6 -0
- package/framework/scripts/lincoln_command_map.py +1 -1
- package/framework/scripts/lincoln_id.py +333 -0
- package/framework/scripts/lincoln_index.py +10 -0
- package/framework/scripts/lincoln_prd.py +16 -17
- package/framework/scripts/lincoln_render.py +657 -0
- package/framework/scripts/run-infrastructure-tests.py +2 -0
- package/framework/scripts/stage_loader.py +149 -2
- package/framework/scripts/static-check.sh +1 -1
- package/framework/scripts/update_readme_version.py +149 -0
- package/framework/scripts/validate_stage.py +80 -1
- package/framework/tools/lincoln/package-lock.json +2 -2
- package/framework/tools/lincoln/package.json +1 -1
- package/framework/tools/lincoln-installer/package-lock.json +2 -2
- package/framework/tools/lincoln-installer/package.json +1 -1
- package/package.json +2 -2
- package/framework/.claude/agents/_contract.md +0 -79
|
@@ -4,29 +4,16 @@ You are executing the Lincoln workflow step `product-prototype`: turn approved p
|
|
|
4
4
|
|
|
5
5
|
## Goal
|
|
6
6
|
|
|
7
|
-
Create field and UI specifications as HTML doc pages, and produce a high-fidelity interactive HTML prototype that the PM can inspect directly in the issue-package portal (`{process_slug}/index.html`).
|
|
7
|
+
Create field and UI specifications as HTML doc pages, and produce a high-fidelity interactive HTML prototype that the PM can inspect directly in the issue-package portal (`{process_slug}/index.html`). The HTML prototype is the primary review artifact; a Pencil prototype is optional and produced only if the PM explicitly asks for it.
|
|
8
8
|
|
|
9
9
|
## Reference templates
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- `.claude/templates/issue-package/page-
|
|
14
|
-
- `.claude/templates/issue-package/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- `.claude/templates/issue-package/prototypes/app/overlays/page.html.tpl` — avatar menu / about / toast overlays.
|
|
18
|
-
- `.claude/templates/issue-package/prototypes/app/tray/page.html.tpl` — system-tray scenario controller. When the product has a macOS menubar presence, create thin scenario pages under `pages/prototype/app/tray/` showing at minimum: default state, unread-badge state, and menu-open state. These pages must **not** redraw the tray inside the app prototype; instead they send `postMessage({type:'lincoln-tray-state', unread:<int>, open:<bool>}, '*')` to the portal so the portal-level macOS tray updates. See the tray template for the exact snippet.
|
|
19
|
-
- `.claude/templates/issue-package/prototypes/app/org/page.html.tpl` — organization list.
|
|
20
|
-
- `.claude/templates/issue-package/prototypes/web/dashboard/page.html.tpl` — web dashboard shell.
|
|
21
|
-
- `.claude/templates/issue-package/prototypes/web/list/page.html.tpl` — web list view shell.
|
|
22
|
-
- `.claude/templates/issue-package/prototypes/web/form/page.html.tpl` — web form shell.
|
|
23
|
-
- `.claude/templates/issue-package/prototypes/web/detail/page.html.tpl` — web detail shell.
|
|
24
|
-
- `.claude/templates/issue-package/prototypes/mobile/home/page.html.tpl` — mobile home feed shell.
|
|
25
|
-
- `.claude/templates/issue-package/prototypes/mobile/chat/page.html.tpl` — mobile chat shell.
|
|
26
|
-
- `.claude/templates/issue-package/prototypes/mobile/settings/page.html.tpl` — mobile settings list shell.
|
|
27
|
-
- `.claude/templates/issue-package/prototypes/mobile/profile/page.html.tpl` — mobile profile shell.
|
|
28
|
-
- `.claude/templates/issue-package/assets/prototype.css` — shared styles (tokens, dark mode, window shell, sidebar, forms, overlays, web/mobile shells).
|
|
29
|
-
- `.claude/templates/issue-package/assets/prototype.js` — shared UI builders and mock data (`window.LincolnPrototype`), including `frameApp`, `frameWeb`, `frameMobile`.
|
|
11
|
+
The default rendering templates are:
|
|
12
|
+
|
|
13
|
+
- `.claude/templates/issue-package/page-doc-structured.html.tpl` — structured doc page used for `fields.html` and `ui-spec.html`.
|
|
14
|
+
- `.claude/templates/issue-package/page-prototype-structured.html.tpl` — data-driven prototype page used for all `pages/prototype/**/*.html`.
|
|
15
|
+
|
|
16
|
+
You may still read the categorized example templates under `.claude/templates/issue-package/prototypes/` for layout inspiration, but generate pages through `python scripts/lincoln_render.py` rather than copying templates by hand.
|
|
30
17
|
|
|
31
18
|
## Input
|
|
32
19
|
|
|
@@ -37,22 +24,98 @@ Use the following read-only templates as the style/layout reference. Copy/adapt
|
|
|
37
24
|
|
|
38
25
|
1. Verify `{process_slug}/pages/docs/design-review.html` contains `<!-- status: approved -->` or `[x] PM 已确认设计文档`.
|
|
39
26
|
2. Read the approved design package under `{process_slug}/pages/docs/`, including `flows.html` and `page-map.html`.
|
|
40
|
-
3. Write `{process_slug}/pages/docs/fields.html` using
|
|
27
|
+
3. Write `{process_slug}/pages/docs/fields.html` using the structured renderer:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
python scripts/lincoln_render.py \
|
|
31
|
+
--stage product-prototype \
|
|
32
|
+
--target {process_slug}/pages/docs/fields.html \
|
|
33
|
+
--title "字段说明" --nav-label "字段" --version v1.0 --uid fields \
|
|
34
|
+
--data {process_slug}/pages/docs/fields.yaml
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The YAML should contain a `fields` array (optionally grouped under `groups`):
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
intro: "本页面列出所有 screen/form 字段规格。"
|
|
41
|
+
annotations:
|
|
42
|
+
doc-purpose: "字段规格"
|
|
43
|
+
doc-fields: "字段名 — 类型 — 必填 — 说明"
|
|
44
|
+
fields:
|
|
45
|
+
- name: "手机号"
|
|
46
|
+
type: "string"
|
|
47
|
+
required: true
|
|
48
|
+
validation: "大陆手机号正则"
|
|
49
|
+
default: ""
|
|
50
|
+
copy: "请输入手机号"
|
|
51
|
+
error: "手机号格式不正确"
|
|
52
|
+
source: "model/user"
|
|
53
|
+
```
|
|
54
|
+
|
|
41
55
|
4. Write `{process_slug}/pages/docs/ui-spec.html` covering the interaction-document delivery standards:
|
|
42
56
|
- 用户场景与流程: who, when, goal, trigger, completion criteria.
|
|
43
57
|
- 界面流转图: screen-to-screen flow mapped to the business flow in `flows.html`.
|
|
44
58
|
- 页面交互说明: per-screen layout elements, interaction rules (events, responses, navigation), and field validation/error handling.
|
|
45
59
|
- 交互 Demo/原型: links to the HTML prototype pages under `pages/prototype/` and a summary of key interactions.
|
|
46
|
-
|
|
47
|
-
|
|
60
|
+
|
|
61
|
+
Use the structured renderer with `--data` containing `sections`, `pages`, and `interactions` as appropriate.
|
|
62
|
+
|
|
63
|
+
5. **Plan prototype generation granularity.** Before writing prototype pages, list every screen from `flows.html` and `page-map.html`. Group them 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 annotation meta tags before starting the next cluster.
|
|
64
|
+
|
|
65
|
+
6. Create interactive HTML prototypes under `{process_slug}/pages/prototype/{app,web,mobile}/` using the structured prototype renderer:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python scripts/lincoln_render.py \
|
|
69
|
+
--stage product-prototype \
|
|
70
|
+
--target {process_slug}/pages/prototype/web/dashboard/page.html \
|
|
71
|
+
--title "仪表盘" --nav-label "仪表盘" --nav-group "Prototype" --uid page-dashboard \
|
|
72
|
+
--data {process_slug}/pages/prototype/web/dashboard/page.yaml
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Prototype YAML schema:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
layout:
|
|
79
|
+
type: web # web | app | mobile
|
|
80
|
+
shell: dashboard # dashboard | list | form | detail | main | onboarding | settings | overlays | tray | org
|
|
81
|
+
title: "仪表盘"
|
|
82
|
+
active: dashboard
|
|
83
|
+
navItems:
|
|
84
|
+
- {id: dashboard, label: 概览, href: ./dashboard/page.html}
|
|
85
|
+
- {id: list, label: 列表, href: ./list/page.html}
|
|
86
|
+
annotations:
|
|
87
|
+
doc-purpose: "展示核心指标与快捷入口"
|
|
88
|
+
doc-layout: "顶部导航 | 指标卡片网格 | 列表区"
|
|
89
|
+
doc-fields: "..."
|
|
90
|
+
doc-stories: "..."
|
|
91
|
+
doc-rules: "..."
|
|
92
|
+
doc-boundaries: "..."
|
|
93
|
+
doc-exceptions: "..."
|
|
94
|
+
doc-refs: "flows.html | page-map.html"
|
|
95
|
+
components:
|
|
96
|
+
- type: html
|
|
97
|
+
uid: dashboard-metrics
|
|
98
|
+
props:
|
|
99
|
+
html: '<div class="metric-grid">...'>
|
|
100
|
+
- type: wv
|
|
101
|
+
props:
|
|
102
|
+
kind: chat
|
|
103
|
+
interactions:
|
|
104
|
+
- trigger: "点击指标卡片"
|
|
105
|
+
action: "跳转到详情页"
|
|
106
|
+
target: "detail/page.html"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Every page must:
|
|
48
110
|
- Link to `../../../assets/prototype.css` and `../../../assets/prototype.js` (depth 3) or `../../../../assets/...` (depth 4) depending on its path.
|
|
49
|
-
- Include
|
|
111
|
+
- Include theme sync support (built into the structured template).
|
|
50
112
|
- Include `<meta name="prototype-base" content="../../../">` (or `../../../../` for depth 4).
|
|
51
|
-
- Include `<meta name="page-uid" content="...">`, `<meta name="nav-group" content="...">`, and `<meta name="nav-label" content="...">`
|
|
52
|
-
-
|
|
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; annotations come from the YAML `annotations` block).
|
|
114
|
+
- Provide the full annotation meta tags so the portal right panel explains functionality, layout, fields, boundary cases, and exception flows.
|
|
53
115
|
- 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.
|
|
54
116
|
- Assign a stable `data-uid` attribute to every interactive element, screen region, and WebView placeholder.
|
|
55
117
|
- Override `LincolnPrototype.data` in the page script for issue-specific mock data (user, org, webviews, settings, unread items).
|
|
118
|
+
|
|
56
119
|
7. Optionally create or update `{process_slug}/designs/<design_id>/prototype.pen` with Pencil tools if the PM explicitly asks for a Pencil prototype. If you use Pencil tools, call `get_editor_state(include_schema: true)` first and use `snapshot_layout` to check for clipping/overlap.
|
|
57
120
|
8. Update the root `{process_slug}/pages/docs/prd.html` section 9 "相关产物链接" with the `ui-spec.html`, `fields.html`, and HTML prototype links. If the PRD already has an approved snapshot, warn the PM that changes require a version bump and re-freeze via `python scripts/lincoln_prd.py freeze`.
|
|
58
121
|
9. Ask the PM to open `{process_slug}/index.html` in a browser, toggle the theme switch in the macOS menubar, and review both light and dark renderings of each prototype page inside the portal.
|
|
@@ -20,24 +20,90 @@ Produce a clear, agreed-upon `{process_slug}/pages/docs/requirements.html` and t
|
|
|
20
20
|
## Steps
|
|
21
21
|
|
|
22
22
|
1. Read `{process_slug}/interviews/<session-id>/transcript.md`, `summary.md`, and `raw-insights.md`.
|
|
23
|
-
2. Draft an initial `{process_slug}/pages/docs/requirements.html` using
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
2. Draft an initial `{process_slug}/pages/docs/requirements.html` using `python scripts/lincoln_render.py --stage clarify --target {process_slug}/pages/docs/requirements.html --title "需求文档" --nav-label "需求" --version v1.0 --uid requirements --data {process_slug}/pages/docs/requirements.yaml`. The YAML data file should follow this schema:
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
intro: "一句话概括本需求。"
|
|
27
|
+
annotations:
|
|
28
|
+
doc-purpose: "说明本次需求要解决的核心问题"
|
|
29
|
+
doc-layout: "单页文档"
|
|
30
|
+
doc-stories: "作为 <角色> 我想要 <目标> 以便 <价值>"
|
|
31
|
+
doc-rules: "列出关键业务规则"
|
|
32
|
+
doc-boundaries: "列出边界情况"
|
|
33
|
+
doc-exceptions: "列出异常流"
|
|
34
|
+
sections:
|
|
35
|
+
- title: "背景"
|
|
36
|
+
content: "..."
|
|
37
|
+
- title: "问题"
|
|
38
|
+
content: "..."
|
|
39
|
+
- title: "用户"
|
|
40
|
+
content: "..."
|
|
41
|
+
- title: "方案"
|
|
42
|
+
content: "..."
|
|
43
|
+
- title: "验收标准"
|
|
44
|
+
content: "..."
|
|
45
|
+
- title: "非目标"
|
|
46
|
+
content: "..."
|
|
47
|
+
- title: "开放问题"
|
|
48
|
+
content: "..."
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The renderer will inject the YAML as `pageData` and render structured sections automatically. You may also pass `--markdown` for a free-form supplement.
|
|
31
52
|
3. Identify 1-3 ambiguities or missing details, and tag each with its Johari quadrant (认知象限): 知道自己知道 → 复述确认题; 知道自己不知道 → 直接回答 + coach; 不知道自己知道 → 展示已有资产; 不知道自己不知道 → 探查题.
|
|
32
53
|
4. Ask the human PM these questions one batch at a time in the terminal, using the quadrant-appropriate style.
|
|
33
54
|
5. Update `requirements.html` based on the answers (always rewrite the full file; do not mutate in-place).
|
|
34
55
|
6. Repeat until the PM confirms the requirements are clear.
|
|
35
|
-
7. Also generate `{process_slug}/pages/docs/user-stories.html` from the finalized requirements using the
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
7. Also generate `{process_slug}/pages/docs/user-stories.html` from the finalized requirements using the structured renderer with `--data` containing a `stories` array:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
intro: "基于已确认需求提炼的用户故事清单。"
|
|
60
|
+
annotations:
|
|
61
|
+
doc-purpose: "用户故事全景"
|
|
62
|
+
stories:
|
|
63
|
+
- who: "作为 访客用户"
|
|
64
|
+
want: "我想要 通过微信扫码登录"
|
|
65
|
+
so: "以便 不用注册密码"
|
|
66
|
+
acceptance: "扫码后 3 秒内完成登录"
|
|
67
|
+
source: "prd#section-2"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
8. Generate the root-level PRD at `{process_slug}/pages/docs/prd.html` using the structured renderer with `--stage clarify --uid prd`. The data YAML must include `intro`, `annotations`, and `sections` for the 10 required PRD sections:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
intro: "一句话 PRD 概述。"
|
|
74
|
+
annotations:
|
|
75
|
+
doc-purpose: "XXX 产品需求文档"
|
|
76
|
+
doc-stories: "..."
|
|
77
|
+
doc-rules: "..."
|
|
78
|
+
doc-boundaries: "..."
|
|
79
|
+
doc-exceptions: "..."
|
|
80
|
+
doc-refs: "requirements.html | user-stories.html"
|
|
81
|
+
sections:
|
|
82
|
+
- title: "1. 需求背景"
|
|
83
|
+
content: "..."
|
|
84
|
+
- title: "2. 用户故事"
|
|
85
|
+
content: "..."
|
|
86
|
+
- title: "3. 功能拆解"
|
|
87
|
+
content: "..."
|
|
88
|
+
- title: "4. 业务流程图"
|
|
89
|
+
content: "..."
|
|
90
|
+
- title: "5. 验收标准"
|
|
91
|
+
content: "..."
|
|
92
|
+
- title: "6. 业务规则"
|
|
93
|
+
content: "..."
|
|
94
|
+
- title: "7. 非功能需求"
|
|
95
|
+
content: "..."
|
|
96
|
+
- title: "8. 关联系统/接口"
|
|
97
|
+
content: "..."
|
|
98
|
+
- title: "9. 相关产物链接"
|
|
99
|
+
content: "| 产物 | 路径 | 状态 |"
|
|
100
|
+
- title: "10. 风险与开放问题"
|
|
101
|
+
content: "..."
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
It must also carry:
|
|
105
|
+
- `<!-- version: v1.0 -->` marker (added automatically by the renderer from `--version`).
|
|
106
|
+
- Meta tags: `doc-title`, `nav-group="Docs"`, `doc-version="v1.0"`, and a stable `doc-uid` (all injected by the renderer).
|
|
41
107
|
9. When the PM confirms, add an approval marker inside `requirements.html`: `<!-- status: approved -->`.
|
|
42
108
|
10. After human approval, run `python scripts/lincoln_prd.py freeze` to create the immutable snapshot `{process_slug}/pages/docs/snapshots/prd-v1.0.html`.
|
|
43
109
|
11. Run `python scripts/stage_loader.py --stage clarify --action record-artifacts` to persist the artifact paths and refresh `{process_slug}/assets/js/package-data.js`.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# draft-product-design
|
|
2
2
|
|
|
3
|
-
You are executing the Lincoln workflow step `product-design-docs`: turn approved requirements into a concise product design review package for the human PM.
|
|
3
|
+
You are executing the Lincoln workflow step `product-design-docs`: turn approved requirements into a concise product design review package (a set of HTML documents) for the human PM.
|
|
4
4
|
|
|
5
5
|
## Goal
|
|
6
6
|
|
|
7
|
-
Create `{process_slug}/pages/docs/` HTML design documents with enough product, data, flow, feasibility, and technical framing for PM review and later development planning, without creating unnecessary review burden.
|
|
7
|
+
Create `{process_slug}/pages/docs/` HTML design documents with enough product, data, flow, feasibility, and technical framing for PM review and later development planning, without creating unnecessary review burden. This step does **not** produce UI specs, field specs, or prototypes — those belong to the next stage `product-prototype`.
|
|
8
8
|
|
|
9
9
|
## Input
|
|
10
10
|
|
|
@@ -21,16 +21,27 @@ Create `{process_slug}/pages/docs/` HTML design documents with enough product, d
|
|
|
21
21
|
|
|
22
22
|
1. Validate that `{process_slug}/pages/docs/requirements.html` is approved (contains `<!-- status: approved -->`).
|
|
23
23
|
2. Read `{process_slug}/pages/docs/requirements.html`, `user-stories.html`, and the root-level `{process_slug}/pages/docs/prd.html`.
|
|
24
|
-
3. Produce the design package under `{process_slug}/pages/docs/` using
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
3. Produce the design package under `{process_slug}/pages/docs/` using `python scripts/lincoln_render.py --stage product-design-docs --target <path> --data <yaml>`. Each page uses the structured doc template; provide a YAML data file with `intro`, `annotations`, and the domain-specific keys below. The renderer injects the annotation metas (`doc-purpose`, `doc-layout`, `doc-fields`, `doc-boundaries`, `doc-exceptions`, plus `doc-stories`, `doc-rules`, `doc-refs` when useful) so the portal right panel explains functionality, layout, fields, boundary cases, and exception flows.
|
|
25
|
+
|
|
26
|
+
Common command pattern:
|
|
27
|
+
```bash
|
|
28
|
+
python scripts/lincoln_render.py \
|
|
29
|
+
--stage product-design-docs \
|
|
30
|
+
--target issue-<N>/pages/docs/<page>.html \
|
|
31
|
+
--title "<标题>" --nav-label "<导航标签>" --version v1.0 --uid <uid> \
|
|
32
|
+
--data issue-<N>/pages/docs/<page>.yaml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Page-specific data keys:
|
|
36
|
+
- `design-review.html`: `sections` (decision summary, scope, links, open questions, approval checklist).
|
|
37
|
+
- `scenarios.html`: `sections` plus optional `personas`, `primary`, `boundary`, `non_goals` arrays.
|
|
38
|
+
- `feature-catalog.html`: `features` array (`id`, `title`, `priority`, `acceptance`, `source`).
|
|
39
|
+
- `data-model.html`: `entities` array (`name`, `fields`, `constraints`, `states`).
|
|
40
|
+
- `flows.html`: `flows` array (`name`, `type`, `mermaid`, `steps`).
|
|
41
|
+
- `page-map.html`: `pages` array (`id`, `title`, `path`, `links`, `notes`).
|
|
42
|
+
- `feasibility.html`: `sections` plus `risks` and `options` arrays.
|
|
43
|
+
- `version-log.html`: `sections` plus `entries` array (`version`, `date`, `author`, `changes`, `rationale`).
|
|
44
|
+
- `api-list.html`: `apis` array (`name`, `method`, `endpoint`, `purpose`, `contract`).
|
|
34
45
|
4. Create the PM→UX handoff contract at `{process_slug}/handoffs/pm-to-ux/pm-to-ux.handoff.yaml` referencing the approved design docs and PRD versions.
|
|
35
46
|
5. Create the human-readable PM→UX handoff portal page at `{process_slug}/pages/docs/handoff-pm-to-ux-v1.0.html` and the narrative master handoff document at `{process_slug}/handoffs/pm-to-ux/master-handoff-pm-to-ux-v1.0.md`. These summarize core decisions, scope, open questions, and the context pack for the receiving UX Agent.
|
|
36
47
|
6. Keep all documents traceable to the approved requirement and transcript timestamps where available.
|
|
@@ -44,5 +55,6 @@ Create `{process_slug}/pages/docs/` HTML design documents with enough product, d
|
|
|
44
55
|
- Use Chinese for PM-facing content unless the requirements are in English.
|
|
45
56
|
- Keep documents short and reviewable; prefer tables and Mermaid diagrams over long prose.
|
|
46
57
|
- For technical frameworks and open-source projects, check current official docs or primary repositories before recommending.
|
|
58
|
+
- Do not create UI specs, field specs, or prototypes in this step. Those are produced in the next stage `product-prototype`.
|
|
47
59
|
- Do not create a Pencil prototype in this step.
|
|
48
60
|
- After approval, tell the user to run: `claude build-product-prototype <session_id> <design_id>`.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: lc-explore-opensource
|
|
3
3
|
description: Use during product design when the requirement can be solved or informed by existing open-source projects.
|
|
4
4
|
version: 1.0.0
|
|
5
|
+
outputs:
|
|
6
|
+
- "{process_slug}/docs/research/{change_name}-oss-options.md"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Lincoln Explore Open Source
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lc-one-id
|
|
3
|
+
description: |
|
|
4
|
+
查询并维护 Lincoln one-id 索引,按功能点、页面、字段等 ID 定位相关产物。
|
|
5
|
+
当你需要追溯某个 feature/page/field/doc 对应的设计文档、字段规格、原型页或实现产物时,调用本 skill。
|
|
6
|
+
triggers:
|
|
7
|
+
- "one-id"
|
|
8
|
+
- "lincoln_id"
|
|
9
|
+
- "按 id 查询"
|
|
10
|
+
- "feature 关联"
|
|
11
|
+
- "页面 id"
|
|
12
|
+
- "字段 id"
|
|
13
|
+
inputs:
|
|
14
|
+
- name: query
|
|
15
|
+
description: |
|
|
16
|
+
自然语言查询或 exact CLI 子命令。
|
|
17
|
+
例如:
|
|
18
|
+
- "lookup page/web-dashboard"
|
|
19
|
+
- "related feature/checkout-redesign"
|
|
20
|
+
- "list --type field"
|
|
21
|
+
- "create page/list-page --title 列表页 --path issue-9999-test/pages/prototype/web/list/page.html"
|
|
22
|
+
required: true
|
|
23
|
+
outputs:
|
|
24
|
+
- one-id 条目详情或关联产物路径列表
|
|
25
|
+
required_tools:
|
|
26
|
+
- Bash
|
|
27
|
+
- Read
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# lc-one-id
|
|
31
|
+
|
|
32
|
+
## Purpose
|
|
33
|
+
|
|
34
|
+
Using [lc-one-id] to 查询并维护 Lincoln one-id 索引。
|
|
35
|
+
|
|
36
|
+
one-id 是 Lincoln 跨阶段追溯的核心机制:PM/UX 阶段为页面、功能点、字段等建立稳定 ID,UE、研发、QA 阶段通过该 ID 查找相关产物,而不是凭路径猜测。
|
|
37
|
+
|
|
38
|
+
one-id 索引文件位于 `{process_slug}/.lincoln/one-id/` 下,由 `scripts/lincoln_id.py` 管理。
|
|
39
|
+
|
|
40
|
+
## When to use
|
|
41
|
+
|
|
42
|
+
- downstream 阶段(TDD 计划、实现、验收)需要确认某个 feature/page/field 的上游产物。
|
|
43
|
+
- 创建或更新 one-id 条目时。
|
|
44
|
+
- 检查某个 ID 是否已存在或查找关联项时。
|
|
45
|
+
|
|
46
|
+
## How to use
|
|
47
|
+
|
|
48
|
+
本 skill 会把你的 `query` 解析为 `scripts/lincoln_id.py` 命令,并通过 Bash 执行。
|
|
49
|
+
|
|
50
|
+
常用命令:
|
|
51
|
+
|
|
52
|
+
- 查询单个条目:
|
|
53
|
+
```bash
|
|
54
|
+
scripts/lincoln_id.py lookup <type>/<id>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- 查询某个条目的所有关联项:
|
|
58
|
+
```bash
|
|
59
|
+
scripts/lincoln_id.py related <type>/<id>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- 按类型列出所有条目:
|
|
63
|
+
```bash
|
|
64
|
+
scripts/lincoln_id.py list --type <page|feature|field|doc>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- 创建或更新条目:
|
|
68
|
+
```bash
|
|
69
|
+
scripts/lincoln_id.py create <type>/<id> \
|
|
70
|
+
--title "<title>" \
|
|
71
|
+
--path "<relative-path>" \
|
|
72
|
+
--source "<origin>" \
|
|
73
|
+
--relation "<type>/<id>"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`scripts/lincoln_id.py` 会自动发现当前工作区最新的 `issue-*/workflow-stage.yaml`,本 skill 不传递 `--state-file`。如果自动发现指向了错误的 issue 包,先让目标包成为最新 mtime,或清理旧沙盒包。
|
|
77
|
+
|
|
78
|
+
## Output handling
|
|
79
|
+
|
|
80
|
+
- 如果查询成功,返回条目 YAML 内容或关联列表,并据此读取对应产物文件。
|
|
81
|
+
- 如果 ID 不存在或类型非法,脚本会返回非零退出码;此时应向用户汇报,而不是继续基于缺失信息推进。
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# lc-one-id
|
|
2
|
+
|
|
3
|
+
你是 Lincoln 的 one-id 查询助手。你的唯一任务是把用户的查询意图转换为 `scripts/lincoln_id.py` 命令并执行,然后返回结构化结果。
|
|
4
|
+
|
|
5
|
+
## one-id 类型
|
|
6
|
+
|
|
7
|
+
允许的类型前缀:
|
|
8
|
+
|
|
9
|
+
- `page/` — 页面,如 `page/web-dashboard`
|
|
10
|
+
- `feature/` — 功能点,如 `feature/checkout-redesign`
|
|
11
|
+
- `field/` — 字段,如 `field/order-count`
|
|
12
|
+
- `doc/` — 文档,如 `doc/ui-spec`
|
|
13
|
+
|
|
14
|
+
## 命令映射
|
|
15
|
+
|
|
16
|
+
| 意图 | Bash 命令 |
|
|
17
|
+
|---|---|
|
|
18
|
+
| 查询单个 ID | `scripts/lincoln_id.py lookup <type>/<id>` |
|
|
19
|
+
| 查询关联项 | `scripts/lincoln_id.py related <type>/<id>` |
|
|
20
|
+
| 按类型列出 | `scripts/lincoln_id.py list --type <type>` |
|
|
21
|
+
| 创建/更新条目 | `scripts/lincoln_id.py create <type>/<id> --title "..." --path "..." --source "..." [--relation "<type>/<id>"]` |
|
|
22
|
+
|
|
23
|
+
## 执行规则
|
|
24
|
+
|
|
25
|
+
1. 如果 `query` 已经是合法的 CLI 子命令(如 `lookup page/web-dashboard`),直接拼接到 `scripts/lincoln_id.py` 后执行。
|
|
26
|
+
2. 如果 `query` 是自然语言,先推断意图和 ID,再生成对应命令。
|
|
27
|
+
3. 通过 Bash 运行命令,捕获 stdout/stderr 和 exit code。
|
|
28
|
+
4. exit code 为 0 时,返回结果摘要和关键字段(`path`、`title`、`relations`)。
|
|
29
|
+
5. exit code 非 0 时,明确告知用户失败原因,不要基于缺失或错误信息继续假设。
|
|
30
|
+
6. `lincoln_id.py` 会自动发现当前工作区最新的 `issue-*/workflow-stage.yaml`,不要传递 `--state-file`。如果它指向了错误的 issue 包,先通过 `touch issue-<N>/workflow-stage.yaml` 让目标包成为最新,或清理旧的沙盒包。
|
|
31
|
+
|
|
32
|
+
## 返回格式
|
|
33
|
+
|
|
34
|
+
- 成功:用简洁中文说明“查询到 X 个关联项”或“条目详情”,并列出相关产物路径。
|
|
35
|
+
- 失败:说明命令、退出码和错误信息,建议下一步动作。
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: lc-workflow-router
|
|
3
3
|
description: Use at the start of a Lincoln session to run session intake (recon, situation judgment, Johari confirmation) and select the most appropriate workflow template.
|
|
4
4
|
version: 1.1.0
|
|
5
|
+
outputs:
|
|
6
|
+
- "{process_slug}/workflow-stage.yaml"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Lincoln Workflow Router
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
schema_version:
|
|
1
|
+
schema_version: 3.0.0
|
|
2
2
|
id: build-codebase-knowledge
|
|
3
3
|
name: Build Codebase Knowledge
|
|
4
4
|
description: 'Scans existing source code and builds knowledge base
|
|
@@ -8,31 +8,31 @@ description: 'Scans existing source code and builds knowledge base
|
|
|
8
8
|
feature knowledge base. Triggered by existing-project-iteration
|
|
9
9
|
|
|
10
10
|
template after workflow-router.'
|
|
11
|
-
|
|
11
|
+
workflows:
|
|
12
12
|
- existing-project-iteration
|
|
13
13
|
prerequisite_stage: workflow-router
|
|
14
14
|
next_stage: clarify
|
|
15
15
|
human_gate: false
|
|
16
|
+
execution_mode: solo
|
|
17
|
+
primary_action: lc-build-codebase-knowledge
|
|
16
18
|
agent:
|
|
17
19
|
primary: lc-knowledge-curator
|
|
18
20
|
reviewers:
|
|
19
21
|
- lc-engineer
|
|
20
22
|
handoff_to: lc-pm
|
|
21
23
|
skills:
|
|
22
|
-
required:
|
|
24
|
+
required:
|
|
25
|
+
- lincoln:lc-build-codebase-knowledge
|
|
23
26
|
optional: []
|
|
24
27
|
artifacts:
|
|
25
28
|
required:
|
|
26
29
|
- knowledge/00-index.md
|
|
30
|
+
references:
|
|
31
|
+
skill_prompt: .claude/skills/lc-build-codebase-knowledge/SKILL.md
|
|
32
|
+
agent_guide: .claude/agents/knowledge-curator.md
|
|
27
33
|
context:
|
|
28
34
|
goal: 为已有源码项目构建功能知识库,使后续 PM 迭代能基于事实。
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- 禁止修改 {process_slug}/recordings/ 中的原始文件。
|
|
32
|
-
|
|
33
|
-
- 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
|
|
34
|
-
|
|
35
|
-
- 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
|
|
35
|
+
execution: "调用 lc-build-codebase-knowledge skill 扫描现有源码库,构建业务与技术知识索引,产出 knowledge/00-index.md 与 knowledge/03-features/ 下的功能知识文档,作为后续 PM 迭代的事实基础。"
|
|
36
36
|
gates:
|
|
37
37
|
entry:
|
|
38
38
|
- check: previous_stage_completed
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
schema_version:
|
|
1
|
+
schema_version: 3.0.0
|
|
2
2
|
id: clarify
|
|
3
3
|
name: Clarify
|
|
4
4
|
description: 'Explores requirements, resolves ambiguity, and produces
|
|
5
5
|
|
|
6
6
|
confirmed requirements before design work begins.'
|
|
7
|
-
|
|
7
|
+
workflows:
|
|
8
|
+
- bug-fix
|
|
9
|
+
- design-spike
|
|
10
|
+
- existing-project-iteration
|
|
11
|
+
- interview-to-knowledge
|
|
12
|
+
- oss-first-design
|
|
8
13
|
prerequisite_stage: ingest
|
|
9
14
|
next_stage: product-design-docs
|
|
10
15
|
human_gate: true
|
|
16
|
+
execution_mode: both
|
|
17
|
+
primary_action: clarify-requirements
|
|
18
|
+
variables:
|
|
19
|
+
- process_slug
|
|
20
|
+
artifact_templates:
|
|
21
|
+
'{process_slug}/pages/docs/requirements.html': .claude/templates/issue-package/page-doc-structured.html.tpl
|
|
22
|
+
'{process_slug}/pages/docs/user-stories.html': .claude/templates/issue-package/page-doc-structured.html.tpl
|
|
23
|
+
'{process_slug}/pages/docs/prd.html': .claude/templates/issue-package/page-doc-structured.html.tpl
|
|
24
|
+
'{process_slug}/pages/docs/snapshots/prd-v*.html': .claude/templates/issue-package/page-doc-structured.html.tpl
|
|
11
25
|
agent:
|
|
12
26
|
primary: lc-pm
|
|
13
27
|
reviewers:
|
|
@@ -28,21 +42,13 @@ artifacts:
|
|
|
28
42
|
- '{process_slug}/pages/docs/prd.html'
|
|
29
43
|
optional:
|
|
30
44
|
- '{process_slug}/pages/docs/snapshots/prd-v*.html'
|
|
45
|
+
references:
|
|
46
|
+
skill_prompt: .claude/skills/clarify-requirements/SKILL.md
|
|
47
|
+
agent_guide: .claude/agents/pm.md
|
|
31
48
|
context:
|
|
32
49
|
goal: 基于访谈产物(逐字稿、摘要、初始洞察)与人类 PM 进行多轮澄清,形成统一、可追溯、已确认的需求文档,并将 PRD 置于 HTML 门户({process_slug}/pages/docs/prd.html)作为串联后续所有阶段的主线文档与单一事实来源。人类读者通过 {process_slug}/index.html 浏览所有产物。
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- 禁止修改 {process_slug}/recordings/ 中的原始文件。
|
|
36
|
-
|
|
37
|
-
- 本阶段设有 human_gate,必须获得人类 PM 显式确认后才能进入下一阶段。
|
|
38
|
-
|
|
39
|
-
- PRD 必须位于 {process_slug}/pages/docs/prd.html,并携带 <!-- version: vX.Y --> 版本标记;确认后通过 scripts/lincoln_prd.py freeze 生成不可变的 pages/docs/snapshots/prd-vX.Y.html 快照。
|
|
40
|
-
|
|
41
|
-
- PRD 是产研流程的主线文档,需在后续阶段持续维护「相关产物链接」章节,指向设计、原型、OpenSpec、实现等产物。
|
|
42
|
-
|
|
43
|
-
- 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
|
|
44
|
-
|
|
45
|
-
- 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
|
|
50
|
+
execution: "调用 clarify-requirements skill 与人类 PM 进行多轮澄清对话,基于访谈产物识别歧义并达成共识;产出 requirements/user-stories/prd 三个 HTML 文档,PRD 携带 <!-- version: vX.Y --> 版本标记,确认后通过 scripts/lincoln_prd.py freeze 生成不可变的快照。"
|
|
51
|
+
constraints: "- PRD 必须位于 {process_slug}/pages/docs/prd.html,并携带 <!-- version: vX.Y --> 版本标记;确认后通过 scripts/lincoln_prd.py freeze 生成不可变的 pages/docs/snapshots/prd-vX.Y.html 快照。\n\n - PRD 是产研流程的主线文档,需在后续阶段持续维护「相关产物链接」章节,指向设计、原型、OpenSpec、实现等产物。"
|
|
46
52
|
gates:
|
|
47
53
|
entry:
|
|
48
54
|
- check: previous_stage_completed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
schema_version:
|
|
1
|
+
schema_version: 3.0.0
|
|
2
2
|
id: explore-opensource
|
|
3
3
|
name: Explore Open Source
|
|
4
4
|
description: 'Researches existing open-source projects that can inform
|
|
@@ -6,31 +6,34 @@ description: 'Researches existing open-source projects that can inform
|
|
|
6
6
|
or solve the current requirement. Triggered by oss-first-design
|
|
7
7
|
|
|
8
8
|
template after clarify.'
|
|
9
|
-
|
|
9
|
+
workflows:
|
|
10
10
|
- oss-first-design
|
|
11
11
|
prerequisite_stage: clarify
|
|
12
12
|
next_stage: product-design-docs
|
|
13
13
|
human_gate: false
|
|
14
|
+
execution_mode: solo
|
|
15
|
+
primary_action: lc-explore-opensource
|
|
16
|
+
variables:
|
|
17
|
+
- process_slug
|
|
18
|
+
- change_name
|
|
14
19
|
agent:
|
|
15
20
|
primary: lc-researcher
|
|
16
21
|
reviewers:
|
|
17
22
|
- lc-engineer
|
|
18
23
|
handoff_to: lc-pm
|
|
19
24
|
skills:
|
|
20
|
-
required:
|
|
25
|
+
required:
|
|
26
|
+
- lincoln:lc-explore-opensource
|
|
21
27
|
optional: []
|
|
22
28
|
artifacts:
|
|
23
29
|
required:
|
|
24
30
|
- '{process_slug}/docs/research/{change_name}-oss-options.md'
|
|
31
|
+
references:
|
|
32
|
+
skill_prompt: .claude/skills/lc-explore-opensource/SKILL.md
|
|
33
|
+
agent_guide: .claude/agents/researcher.md
|
|
25
34
|
context:
|
|
26
35
|
goal: 在设计阶段探索开源方案,避免从零造轮子,并为实现提供参考。
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- 禁止修改 {process_slug}/recordings/ 中的原始文件。
|
|
30
|
-
|
|
31
|
-
- 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
|
|
32
|
-
|
|
33
|
-
- 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
|
|
36
|
+
execution: "调用 lc-explore-opensource skill 调研可复用的开源方案,评估其适配性、许可与维护状况,产出 {process_slug}/docs/research/{change_name}-oss-options.md,为产品设计与实现提供决策参考。"
|
|
34
37
|
gates:
|
|
35
38
|
entry:
|
|
36
39
|
- check: previous_stage_completed
|