@sushanglewis/lincoln 1.5.4 → 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.
Files changed (95) hide show
  1. package/dist/main.js +425 -51
  2. package/dist/main.js.map +1 -1
  3. package/dist/postinstall.d.ts +9 -2
  4. package/dist/postinstall.js +812 -6
  5. package/dist/postinstall.js.map +1 -1
  6. package/framework/.claude/agents/architect.md +15 -15
  7. package/framework/.claude/agents/default.md +118 -104
  8. package/framework/.claude/agents/designer.md +17 -17
  9. package/framework/.claude/agents/engineer.md +16 -25
  10. package/framework/.claude/agents/external/NOTICES.md +1 -1
  11. package/framework/.claude/agents/external/everything-claude-code/agents/ecc-tdd-guide.md +108 -0
  12. package/framework/.claude/agents/external/everything-claude-code.manifest.yaml +1 -1
  13. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-architect.md +134 -0
  14. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-code-reviewer.md +248 -0
  15. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-designer.md +122 -0
  16. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-qa-tester.md +106 -0
  17. package/framework/.claude/agents/external/wshobson-agents/agents/wshobson-frontend-developer.md +173 -0
  18. package/framework/.claude/agents/frontend-engineer.md +15 -16
  19. package/framework/.claude/agents/knowledge-curator.md +18 -15
  20. package/framework/.claude/agents/pm.md +17 -23
  21. package/framework/.claude/agents/qa.md +17 -13
  22. package/framework/.claude/agents/release-coordinator.md +18 -12
  23. package/framework/.claude/agents/researcher.md +16 -26
  24. package/framework/.claude/harnesses/command-map.yaml +12 -5
  25. package/framework/.claude/hooks/on-session-start.sh +0 -1
  26. package/framework/.claude/hooks/pre-tool-use.sh +3 -3
  27. package/framework/.claude/schemas/agent-definition.schema.json +6 -1
  28. package/framework/.claude/schemas/stage-definition.schema.json +49 -4
  29. package/framework/.claude/skills/build-product-prototype/SKILL.md +1 -1
  30. package/framework/.claude/skills/build-product-prototype/prompts/main.md +89 -26
  31. package/framework/.claude/skills/clarify-requirements/prompts/main.md +80 -14
  32. package/framework/.claude/skills/dependencies.yaml +6 -0
  33. package/framework/.claude/skills/draft-product-design/SKILL.md +2 -0
  34. package/framework/.claude/skills/draft-product-design/prompts/main.md +30 -17
  35. package/framework/.claude/skills/lc-build-codebase-knowledge/SKILL.md +2 -0
  36. package/framework/.claude/skills/lc-explore-opensource/SKILL.md +2 -0
  37. package/framework/.claude/skills/lc-market-research/SKILL.md +1 -1
  38. package/framework/.claude/skills/lc-one-id/SKILL.md +81 -0
  39. package/framework/.claude/skills/lc-one-id/prompts/main.md +35 -0
  40. package/framework/.claude/skills/lc-stakeholder-research/SKILL.md +1 -1
  41. package/framework/.claude/skills/lc-workflow/validators/validate.py +2 -0
  42. package/framework/.claude/skills/lc-workflow-router/SKILL.md +2 -0
  43. package/framework/.claude/stages/build-codebase-knowledge.yaml +10 -10
  44. package/framework/.claude/stages/clarify.yaml +22 -16
  45. package/framework/.claude/stages/explore-opensource.yaml +13 -10
  46. package/framework/.claude/stages/implement.yaml +11 -11
  47. package/framework/.claude/stages/ingest.yaml +13 -10
  48. package/framework/.claude/stages/lc-analyze-frameworks.yaml +13 -10
  49. package/framework/.claude/stages/lc-collect-intelligence.yaml +13 -10
  50. package/framework/.claude/stages/lc-competitive-analysis.yaml +13 -10
  51. package/framework/.claude/stages/lc-first-principles.yaml +13 -10
  52. package/framework/.claude/stages/lc-market-research.yaml +13 -10
  53. package/framework/.claude/stages/lc-product-research.yaml +13 -10
  54. package/framework/.claude/stages/lc-research-report.yaml +13 -10
  55. package/framework/.claude/stages/lc-research-scope.yaml +13 -10
  56. package/framework/.claude/stages/lc-stakeholder-research.yaml +13 -10
  57. package/framework/.claude/stages/lc-storytelling.yaml +13 -10
  58. package/framework/.claude/stages/product-design-docs.yaml +33 -19
  59. package/framework/.claude/stages/product-prototype.yaml +22 -18
  60. package/framework/.claude/stages/propose.yaml +16 -9
  61. package/framework/.claude/stages/split.yaml +13 -9
  62. package/framework/.claude/stages/sync-knowledge.yaml +20 -9
  63. package/framework/.claude/stages/tdd-development-plan.yaml +17 -9
  64. package/framework/.claude/stages/workflow-router.yaml +17 -13
  65. package/framework/.claude/workflows/README.md +25 -3
  66. package/framework/.claude/workflows/bug-fix.yaml +1 -0
  67. package/framework/.claude/workflows/existing-project-iteration.yaml +1 -0
  68. package/framework/.claude/workflows/interview-to-knowledge.yaml +4 -2
  69. package/framework/.claude/workflows/oss-first-design.yaml +1 -0
  70. package/framework/.claude-plugin/marketplace.json +2 -2
  71. package/framework/.claude-plugin/plugin.json +2 -1
  72. package/framework/.version-bump.json +1 -1
  73. package/framework/README.en.md +15 -2
  74. package/framework/README.md +16 -3
  75. package/framework/RELEASE.md +32 -0
  76. package/framework/manifest.json +128 -88
  77. package/framework/scripts/check-prompt-drift.py +657 -0
  78. package/framework/scripts/extract_release_notes.py +79 -0
  79. package/framework/scripts/init-lincoln-branch.sh +6 -0
  80. package/framework/scripts/lincoln_command_map.py +1 -1
  81. package/framework/scripts/lincoln_id.py +333 -0
  82. package/framework/scripts/lincoln_index.py +10 -0
  83. package/framework/scripts/lincoln_prd.py +16 -17
  84. package/framework/scripts/lincoln_render.py +657 -0
  85. package/framework/scripts/run-infrastructure-tests.py +2 -0
  86. package/framework/scripts/stage_loader.py +149 -2
  87. package/framework/scripts/static-check.sh +40 -1
  88. package/framework/scripts/sync-external-agents.sh +2 -0
  89. package/framework/scripts/update_readme_version.py +149 -0
  90. package/framework/scripts/validate_stage.py +80 -1
  91. package/framework/tools/lincoln/package-lock.json +2 -2
  92. package/framework/tools/lincoln/package.json +1 -1
  93. package/framework/tools/lincoln-installer/package.json +1 -1
  94. package/package.json +2 -2
  95. package/framework/.claude/agents/_contract.md +0 -79
@@ -175,7 +175,7 @@ if [[ -n "$TARGET_PATH" ]]; then
175
175
  exit 1
176
176
  fi
177
177
 
178
- if [[ "$NORMALIZED_TARGET" == "$PROCESS_SLUG/prd-v"*.md ]] && is_side_effect "$TOOL_NAME"; then
178
+ if [[ "$NORMALIZED_TARGET" == "$PROCESS_SLUG/prd-v"*.md || "$NORMALIZED_TARGET" == "$PROCESS_SLUG/pages/docs/snapshots/prd-v"*.html ]] && is_side_effect "$TOOL_NAME"; then
179
179
  echo "BLOCKED: PRD snapshots are immutable. Create them with 'python scripts/lincoln_prd.py freeze'." >&2
180
180
  exit 1
181
181
  fi
@@ -193,7 +193,7 @@ if [[ -n "$TARGET_PATH" ]]; then
193
193
  if is_side_effect "$TOOL_NAME"; then
194
194
  if [[ -n "$PROCESS_SLUG" ]]; then
195
195
  case "$NORMALIZED_TARGET" in
196
- recordings/*|*/recordings/*|interviews/*|*/interviews/*|requirements/*|*/requirements/*|designs/*|*/designs/*|openspec/changes/*|*/openspec/changes/*|docs/research/*|*/docs/research/*)
196
+ recordings/*|*/recordings/*|interviews/*|*/interviews/*|requirements/*|*/requirements/*|designs/*|*/designs/*|openspec/changes/*|*/openspec/changes/*|docs/research/*|*/docs/research/*|pages/docs/*|*/pages/docs/*|pages/prototype/*|*/pages/prototype/*|handoffs/*|*/handoffs/*)
197
197
  if [[ "$NORMALIZED_TARGET" != "$PROCESS_SLUG/"* ]]; then
198
198
  echo "BLOCKED: process artifacts must be written under '$PROCESS_SLUG/'." >&2
199
199
  exit 1
@@ -202,7 +202,7 @@ if [[ -n "$TARGET_PATH" ]]; then
202
202
  esac
203
203
  else
204
204
  case "$NORMALIZED_TARGET" in
205
- recordings/*|*/recordings/*|interviews/*|*/interviews/*|requirements/*|*/requirements/*|designs/*|*/designs/*|openspec/changes/*|*/openspec/changes/*|docs/research/*|*/docs/research/*)
205
+ recordings/*|*/recordings/*|interviews/*|*/interviews/*|requirements/*|*/requirements/*|designs/*|*/designs/*|openspec/changes/*|*/openspec/changes/*|docs/research/*|*/docs/research/*|pages/docs/*|*/pages/docs/*|pages/prototype/*|*/pages/prototype/*|handoffs/*|*/handoffs/*)
206
206
  echo "BLOCKED: process artifacts must be written under an initialized <process_slug>/." >&2
207
207
  exit 1
208
208
  ;;
@@ -21,7 +21,12 @@
21
21
  },
22
22
  "model": {
23
23
  "type": "string",
24
- "enum": ["haiku", "sonnet", "opus"]
24
+ "enum": ["haiku", "sonnet", "opus", "fable"]
25
+ },
26
+ "language": {
27
+ "type": "string",
28
+ "enum": ["zh-CN", "en"],
29
+ "description": "Primary language of the agent prompt body"
25
30
  },
26
31
  "tools": {
27
32
  "type": "array",
@@ -9,7 +9,7 @@
9
9
  "id",
10
10
  "name",
11
11
  "description",
12
- "templates",
12
+ "workflows",
13
13
  "prerequisite_stage",
14
14
  "next_stage",
15
15
  "human_gate",
@@ -40,7 +40,7 @@
40
40
  "minLength": 1,
41
41
  "description": "What this stage does and when it is triggered"
42
42
  },
43
- "templates": {
43
+ "workflows": {
44
44
  "oneOf": [
45
45
  {
46
46
  "type": "string",
@@ -154,6 +154,47 @@
154
154
  },
155
155
  "additionalProperties": false
156
156
  },
157
+ "artifact_templates": {
158
+ "type": "object",
159
+ "description": "Maps artifact path templates to HTML/template files used to render them",
160
+ "additionalProperties": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ }
164
+ },
165
+ "variables": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string",
169
+ "pattern": "^[a-z][a-z0-9_]*$"
170
+ },
171
+ "description": "Variable names used in this stage's path templates and commands"
172
+ },
173
+ "execution_mode": {
174
+ "type": "string",
175
+ "enum": ["team", "solo", "both"],
176
+ "default": "both",
177
+ "description": "Execution mode this stage supports"
178
+ },
179
+ "primary_action": {
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "description": "Primary action name that corresponds to the workflow step action"
183
+ },
184
+ "references": {
185
+ "type": "object",
186
+ "properties": {
187
+ "skill_prompt": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "agent_guide": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ }
195
+ },
196
+ "additionalProperties": false
197
+ },
157
198
  "context": {
158
199
  "type": "object",
159
200
  "required": ["goal"],
@@ -177,7 +218,7 @@
177
218
  },
178
219
  "constraints": {
179
220
  "type": "string",
180
- "description": "Additional constraints and guardrails"
221
+ "description": "Stage-specific constraints and guardrails (generic constraints live in default.md)"
181
222
  }
182
223
  },
183
224
  "additionalProperties": false
@@ -213,12 +254,16 @@
213
254
  "artifacts_present",
214
255
  "audio_format_supported",
215
256
  "previous_stage_completed",
257
+ "any_of_previous_completed",
216
258
  "human_approved",
217
259
  "gate_review_passed",
218
260
  "handoff_contract_valid",
219
261
  "handoff_versions_match",
220
262
  "prd_has_required_sections",
221
- "prd_snapshot_present"
263
+ "prd_snapshot_present",
264
+ "artifact_meta_complete",
265
+ "ids_valid",
266
+ "portal_index_fresh"
222
267
  ]
223
268
  },
224
269
  "args": {
@@ -14,8 +14,8 @@ inputs:
14
14
  outputs:
15
15
  - "{process_slug}/pages/docs/fields.html"
16
16
  - "{process_slug}/pages/docs/ui-spec.html"
17
- - "{process_slug}/designs/{design_id}/prototype.pen"
18
17
  - "{process_slug}/pages/prototype/**/*.html"
18
+ - "{process_slug}/designs/{design_id}/prototype.pen"
19
19
  required_tools:
20
20
  - Read
21
21
  - Bash
@@ -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`). A Pencil prototype is optional; the HTML prototype is the primary review artifact.
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
- Use the following read-only templates as the style/layout reference. Copy/adapt them into the issue package; do not modify the templates themselves.
12
-
13
- - `.claude/templates/issue-package/page-prototype.html.tpl` — minimal starter page with theme sync support.
14
- - `.claude/templates/issue-package/prototypes/app/main/page.html.tpl` — main app window with sidebar + WebView placeholder.
15
- - `.claude/templates/issue-package/prototypes/app/onboarding/page.html.tpl` — login/onboarding card.
16
- - `.claude/templates/issue-package/prototypes/app/settings/page.html.tpl` — two-column settings page.
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 `.claude/templates/issue-package/page-doc.html.tpl` with screen/form fields, data type, required/optional status, validation, default value, copy, error state, and source data object.
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
- 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 in the cluster has complete annotation meta tags before starting the next cluster. This prevents agent context exhaustion and keeps each page's documentation and interactions complete.
47
- 6. Create interactive HTML prototypes under `{process_slug}/pages/prototype/{app,web,mobile}/` by adapting the reference templates above. Pick the right shell (`frameApp`, `frameWeb`, or `frameMobile`) from `LincolnPrototype.ui` for the product form-factor. Every page must:
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 the theme sync IIFE shown in the starter template.
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="...">` with a short Chinese label for the left nav.
52
- - Include the annotation meta tags `doc-purpose`, `doc-layout`, `doc-fields`, `doc-boundaries`, `doc-exceptions`. Also include `doc-stories`, `doc-rules`, `doc-refs` when they add clarity, so the portal right panel explains functionality, layout, fields, boundary cases, and exception flows.
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 `.claude/templates/issue-package/page-doc.html.tpl`. Embed the Markdown source in the `<script type="text/markdown" id="docSource">` block and include a `<!-- version: v1.0 -->` marker. Required sections:
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 same doc-page template.
36
- 8. Generate the root-level PRD at `{process_slug}/pages/docs/prd.html` using `.claude/templates/issue-package/page-doc.html.tpl`. It must include:
37
- - `<!-- version: v1.0 -->` marker inside the `docSource` block.
38
- - Meta tags: `doc-title`, `nav-group="Docs"`, `doc-version="v1.0"`, and a stable `doc-uid`.
39
- - All required sections: 1.需求背景, 2.用户故事, 3.功能拆解, 4.业务流程图, 5.验收标准, 6.业务规则, 7.非功能需求, 8.关联系统/接口, 9.相关产物链接, 10.风险与开放问题.
40
- - A links table in section 9 pointing to interviews, requirements.html, user-stories.html, and downstream design/prototype/OpenSpec artifacts.
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`.
@@ -45,6 +45,11 @@ skills:
45
45
  license: MIT
46
46
  required_skills:
47
47
  - gsd-import
48
+ - gsd-discuss-phase
49
+ - gsd-spec-phase
50
+ - gsd-ui-phase
51
+ - gsd-plan-phase
52
+ - gsd-mvp-phase
48
53
  - gsd-docs-update
49
54
  - gsd-forensics
50
55
  - gsd-ns-review
@@ -134,6 +139,7 @@ skills:
134
139
  - oh-my-claudecode:ralph
135
140
  - oh-my-claudecode:ultrawork
136
141
  - oh-my-claudecode:deep-interview
142
+ - oh-my-claudecode:designer
137
143
  - oh-my-claudecode:ai-slop-cleaner
138
144
  - oh-my-claudecode:wiki
139
145
  - oh-my-claudecode:writer-memory
@@ -21,7 +21,9 @@ outputs:
21
21
  - "{process_slug}/pages/docs/page-map.html"
22
22
  - "{process_slug}/pages/docs/version-log.html"
23
23
  - "{process_slug}/pages/docs/api-list.html"
24
+ - "{process_slug}/pages/docs/handoff-pm-to-ux-v*.html"
24
25
  - "{process_slug}/handoffs/pm-to-ux/pm-to-ux.handoff.yaml"
26
+ - "{process_slug}/handoffs/pm-to-ux/master-handoff-pm-to-ux-v*.md"
25
27
  required_tools:
26
28
  - Read
27
29
  - Bash
@@ -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,27 +21,40 @@ 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 `.claude/templates/issue-package/page-doc.html.tpl`. Each page embeds Markdown in `<script type="text/markdown" id="docSource">` with a `<!-- version: v1.0 -->` marker and meta tags (`doc-title`, `nav-label`, `nav-group`, `doc-version`, `doc-uid`). Also include the annotation tags `doc-purpose`, `doc-layout`, `doc-fields`, `doc-boundaries`, `doc-exceptions` (and `doc-stories`, `doc-rules`, `doc-refs` when useful) so the portal right panel explains functionality, layout, fields, boundary cases, and exception flows:
25
- - `design-review.html`: PM-facing entry point with decision summary, scope, links to all design docs, open questions, and approval checklist.
26
- - `scenarios.html`: target users, primary scenarios, boundary scenarios, and non-goals.
27
- - `feature-catalog.html`: concise feature list, priority, acceptance mapping, and source requirement links.
28
- - `data-model.html`: core entities, fields, constraints, validation rules, and state transitions.
29
- - `flows.html`: Mermaid user flow, business flow, screen flow, sequence diagram, and architecture diagram.
30
- - `page-map.html`: page inventory, page relationships, navigation, and routing/state notes.
31
- - `feasibility.html`: business feasibility, technical feasibility, current official framework/library options, usable open-source projects, risks, and recommended stack.
32
- - `version-log.html`: design decision version history and rationale.
33
- - `api-list.html`: internal and external APIs/data contracts the feature depends on.
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
- 5. Keep all documents traceable to the approved requirement and transcript timestamps where available.
36
- 6. Update the root `{process_slug}/pages/docs/prd.html` section 9 "相关产物链接" with links to the new design documents. If the PRD already has an approved snapshot (`pages/docs/snapshots/prd-v*.html`), warn the PM that any content change requires bumping the version marker and re-freezing via `python scripts/lincoln_prd.py freeze`.
37
- 7. Ask the PM to review `design-review.html` and linked docs (they can open `{process_slug}/index.html` in a browser).
38
- 8. When the PM confirms, add `<!-- status: approved -->` to `design-review.html`.
39
- 9. Run `python scripts/stage_loader.py --stage product-design-docs --action record-artifacts`.
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.
47
+ 6. Keep all documents traceable to the approved requirement and transcript timestamps where available.
48
+ 7. Update the root `{process_slug}/pages/docs/prd.html` section 9 "相关产物链接" with links to the new design documents and handoff artifacts. If the PRD already has an approved snapshot (`pages/docs/snapshots/prd-v*.html`), warn the PM that any content change requires bumping the version marker and re-freezing via `python scripts/lincoln_prd.py freeze`.
49
+ 8. Ask the PM to review `design-review.html` and linked docs (they can open `{process_slug}/index.html` in a browser).
50
+ 9. When the PM confirms, add `<!-- status: approved -->` to `design-review.html`.
51
+ 10. Run `python scripts/stage_loader.py --stage product-design-docs --action record-artifacts`.
40
52
 
41
53
  ## Rules
42
54
 
43
55
  - Use Chinese for PM-facing content unless the requirements are in English.
44
56
  - Keep documents short and reviewable; prefer tables and Mermaid diagrams over long prose.
45
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`.
46
59
  - Do not create a Pencil prototype in this step.
47
60
  - After approval, tell the user to run: `claude build-product-prototype <session_id> <design_id>`.
@@ -2,6 +2,8 @@
2
2
  name: lc-build-codebase-knowledge
3
3
  description: Use when starting Lincoln on an existing project with source code but no feature knowledge base yet.
4
4
  version: 1.0.0
5
+ outputs:
6
+ - "knowledge/00-index.md"
5
7
  ---
6
8
 
7
9
  # Lincoln Build Codebase Knowledge
@@ -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
@@ -9,7 +9,7 @@ inputs:
9
9
  description: 研究主题或产品决策背景
10
10
  required: false
11
11
  outputs:
12
- - "{process_slug}/research/{session_id}/market-research.md"
12
+ - "{process_slug}/research/{session_id}/market.md"
13
13
  required_tools:
14
14
  - Bash
15
15
  - Read
@@ -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 不存在或类型非法,脚本会返回非零退出码;此时应向用户汇报,而不是继续基于缺失信息推进。