@sushanglewis/lincoln 1.6.2 → 1.7.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.
Files changed (54) hide show
  1. package/framework/.claude/agents/pm.md +2 -2
  2. package/framework/.claude/agents/security-reviewer.md +57 -0
  3. package/framework/.claude/harnesses/codex.yaml +31 -2
  4. package/framework/.claude/harnesses/command-map.yaml +4 -0
  5. package/framework/.claude/harnesses/opencode.yaml +33 -3
  6. package/framework/.claude/hooks/hooks.yaml +37 -0
  7. package/framework/.claude/hooks/on-session-start.sh +20 -5
  8. package/framework/.claude/hooks/on-stop.sh +22 -0
  9. package/framework/.claude/hooks/pre-tool-use.sh +22 -0
  10. package/framework/.claude/mcp/mcp.yaml +34 -0
  11. package/framework/.claude/policies/friction.yaml +18 -0
  12. package/framework/.claude/policies/security.yaml +46 -0
  13. package/framework/.claude/schemas/design-review-feedback.json +32 -0
  14. package/framework/.claude/schemas/stage-definition.schema.json +22 -0
  15. package/framework/.claude/skills/clarify-requirements/SKILL.md +1 -0
  16. package/framework/.claude/skills/clarify-requirements/prompts/main.md +83 -80
  17. package/framework/.claude/skills/draft-product-design/prompts/main.md +27 -14
  18. package/framework/.claude/stages/clarify.yaml +7 -5
  19. package/framework/.claude/stages/phase-1-p0-design.yaml +44 -0
  20. package/framework/.claude/stages/phase-1-p0-implement.yaml +47 -0
  21. package/framework/.claude/stages/phase-2-p1-design.yaml +53 -0
  22. package/framework/.claude/stages/phase-2-p1-implement.yaml +45 -0
  23. package/framework/.claude/stages/product-design-docs.yaml +6 -6
  24. package/framework/.claude/workflows/framework-self-improvement.yaml +100 -0
  25. package/framework/.claude/workflows/interview-to-knowledge.yaml +1 -0
  26. package/framework/.claude-plugin/marketplace.json +2 -2
  27. package/framework/.claude-plugin/plugin.json +1 -1
  28. package/framework/.version-bump.json +1 -1
  29. package/framework/README.en.md +24 -5
  30. package/framework/README.md +24 -5
  31. package/framework/RELEASE.md +41 -0
  32. package/framework/SKILL.md +15 -6
  33. package/framework/manifest.json +96 -56
  34. package/framework/scripts/check-harness-drift.sh +11 -1
  35. package/framework/scripts/lincoln-setup.py +17 -0
  36. package/framework/scripts/lincoln_condenser.py +110 -0
  37. package/framework/scripts/lincoln_friction.py +266 -0
  38. package/framework/scripts/lincoln_harness_adapter.py +185 -13
  39. package/framework/scripts/lincoln_mr_mine.py +146 -0
  40. package/framework/scripts/lincoln_recall.py +142 -0
  41. package/framework/scripts/lincoln_render.py +209 -6
  42. package/framework/scripts/lincoln_trace.py +119 -3
  43. package/framework/scripts/security_analyzer.py +234 -0
  44. package/framework/scripts/stage_loader.py +124 -1
  45. package/framework/tools/lincoln/package-lock.json +2 -2
  46. package/framework/tools/lincoln/package.json +1 -1
  47. package/framework/tools/lincoln-installer/package.json +6 -1
  48. package/package.json +6 -1
  49. package/framework/.claude/agents/external/everything-claude-code/agents/ecc-tdd-guide.md +0 -108
  50. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-architect.md +0 -134
  51. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-code-reviewer.md +0 -248
  52. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-designer.md +0 -122
  53. package/framework/.claude/agents/external/oh-my-claudecode/agents/omc-qa-tester.md +0 -106
  54. package/framework/.claude/agents/external/wshobson-agents/agents/wshobson-frontend-developer.md +0 -173
@@ -20,99 +20,101 @@ 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 `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: "..."
23
+ 2. Draft an initial `{process_slug}/pages/docs/requirements.html` using the Markdown-first renderer. Prefer free-form Markdown with big sections over rigid YAML structures when that makes the requirement clearer:
24
+
25
+ ```bash
26
+ python scripts/lincoln_render.py \
27
+ --stage clarify \
28
+ --target {process_slug}/pages/docs/requirements.html \
29
+ --title "需求文档" \
30
+ --markdown {process_slug}/pages/docs/requirements.md
49
31
  ```
50
32
 
51
- The renderer will inject the YAML as `pageData` and render structured sections automatically. You may also pass `--markdown` for a free-form supplement.
52
- 3. Identify 1-3 ambiguities or missing details, and tag each with its Johari quadrant (认知象限): 知道自己知道 → 复述确认题; 知道自己不知道 → 直接回答 + coach; 不知道自己知道 → 展示已有资产; 不知道自己不知道 → 探查题.
53
- 4. Ask the human PM these questions one batch at a time in the terminal, using the quadrant-appropriate style.
54
- 5. Update `requirements.html` based on the answers (always rewrite the full file; do not mutate in-place).
55
- 6. Repeat until the PM confirms the requirements are clear.
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"
33
+ Write `{process_slug}/pages/docs/requirements.md` as a regular Markdown document. Use H2 headings for the major chapters (e.g. `## 背景`, `## 问题`, `## 用户`, `## 方案`, `## 验收标准`, `## 非目标`, `## 开放问题`). Within each chapter you may use paragraphs, bullet lists, tables, and ` ```mermaid ` diagrams freely. If a rigid table (e.g. a user-story table) is clearer, you may still create a YAML `--data` file and use `page-doc-structured.html.tpl`.
34
+
35
+ The renderer will derive `nav-label`, `version`, and `uid` automatically if omitted. Include `<!-- version: v1.0 -->` near the top of the Markdown file.
36
+ 3. Perform a stakeholder analysis and produce `{process_slug}/pages/docs/stakeholders.html`.
37
+
38
+ First, check whether `{process_slug}/research/{session_id}/stakeholders.md` already exists from the `pm-research` workflow. If it does, read it and use it as a starting point rather than starting from scratch.
39
+
40
+ Identify all stakeholders that are relevant to the requirement. For each stakeholder, capture at least the following dimensions in a structured table:
41
+
42
+ | Dimension | Description |
43
+ |-----------|-------------|
44
+ | 角色名称 | A concise role label (e.g., 最终用户, 需求提出方, 建设方, 运营方, 成本承担方, 方向决策者, 影响者/守门人). |
45
+ | 具体是谁 | The actual person, team, or group, if known. |
46
+ | 与需求的关系 | How they interact with the product or requirement. |
47
+ | 权力/影响力 | Their ability to affect decisions or outcomes (高/中/低 + 一句话说明). |
48
+ | 利益诉求 | What they want from this product or requirement. |
49
+ | 经济价值 | Monetary, efficiency, or cost-related value they gain or lose. |
50
+ | 情绪价值 | Emotional or experiential value (e.g., 愉悦感, 安全感, 掌控感, 归属感). |
51
+ | 个人实现价值 | Self-actualization value (e.g., 成长, 成就感, 认同感, 影响力). |
52
+ | 心理预期 | Their implicit expectations, anxieties, or assumptions. |
53
+ | 潜在冲突 | Tensions or misalignments with other stakeholders. |
54
+ | 应对策略 | How the product team should engage or satisfy this stakeholder. |
55
+
56
+ Also capture stakeholder relationships: who depends on whom, who can block whom, and who shares goals.
57
+
58
+ Render the artifact:
59
+
60
+ ```bash
61
+ python scripts/lincoln_render.py \
62
+ --stage clarify \
63
+ --target {process_slug}/pages/docs/stakeholders.html \
64
+ --title "相关者分析" \
65
+ --markdown {process_slug}/pages/docs/stakeholders.md
66
+ ```
67
+
68
+ Write `{process_slug}/pages/docs/stakeholders.md` as a regular Markdown document with H2 chapters such as `## 相关者清单`, `## 关系与冲突`, `## 关键洞察`, `## 开放问题`. Include `<!-- version: v1.0 -->` near the top.
69
+ 4. Identify 1-3 ambiguities or missing details, and tag each with its Johari quadrant (认知象限): 知道自己知道 → 复述确认题; 知道自己不知道 → 直接回答 + coach; 不知道自己知道 → 展示已有资产; 不知道自己不知道 → 探查题.
70
+ 5. Ask the human PM these questions one batch at a time in the terminal, using the quadrant-appropriate style.
71
+ 6. Update `requirements.md` and `stakeholders.md` based on the answers and re-render both `requirements.html` and `stakeholders.html` (always rewrite the Markdown source and re-render; do not mutate HTML in-place).
72
+ 7. Repeat until the PM confirms the requirements are clear.
73
+ 8. Also generate `{process_slug}/pages/docs/user-stories.html`. You may either write a Markdown file or use the structured renderer with `--data` containing a `stories` array, whichever fits the material:
74
+
75
+ ```bash
76
+ python scripts/lincoln_render.py \
77
+ --stage clarify \
78
+ --target {process_slug}/pages/docs/user-stories.html \
79
+ --title "用户故事" \
80
+ --markdown {process_slug}/pages/docs/user-stories.md
68
81
  ```
69
82
 
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: "..."
83
+ 9. Generate the root-level PRD at `{process_slug}/pages/docs/prd.html` using the Markdown-first renderer:
84
+
85
+ ```bash
86
+ python scripts/lincoln_render.py \
87
+ --stage clarify \
88
+ --target {process_slug}/pages/docs/prd.html \
89
+ --title "产品需求文档" \
90
+ --markdown {process_slug}/pages/docs/prd.md
102
91
  ```
103
92
 
93
+ Write `{process_slug}/pages/docs/prd.md` with at least these H2 chapters, but feel free to add, merge, or reorder them to best tell the story:
94
+
95
+ - `## 1. 需求背景`
96
+ - `## 2. 用户故事`
97
+ - `## 3. 功能拆解`
98
+ - `## 4. 业务流程图` (use ` ```mermaid ` diagrams)
99
+ - `## 5. 验收标准`
100
+ - `## 6. 业务规则`
101
+ - `## 7. 非功能需求`
102
+ - `## 8. 关联系统/接口`
103
+ - `## 9. 相关产物链接`
104
+ - `## 10. 风险与开放问题`
105
+
104
106
  It must also carry:
105
- - `<!-- version: v1.0 -->` marker (added automatically by the renderer from `--version`).
107
+ - `<!-- version: v1.0 -->` marker (added automatically by the renderer from the Markdown file or `--version`).
106
108
  - Meta tags: `doc-title`, `nav-group="Docs"`, `doc-version="v1.0"`, and a stable `doc-uid` (all injected by the renderer).
107
- 9. When the PM confirms, add an approval marker inside `requirements.html`: `<!-- status: approved -->`.
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`.
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`.
109
+ 10. When the PM confirms, add an approval marker inside `requirements.html`: `<!-- status: approved -->`.
110
+ 11. After human approval, run `python scripts/lincoln_prd.py freeze` to create the immutable snapshot `{process_slug}/pages/docs/snapshots/prd-v1.0.html`.
111
+ 12. 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`.
110
112
 
111
113
  ## Human Interaction Rules
112
114
 
113
115
  - Ask at most 3 questions per turn.
114
116
  - After each answer, update the document and show the changed sections.
115
- - If the PM edits `requirements.html` or `prd.html` directly and runs `workflow-continue`, re-read the file and continue from there.
117
+ - If the PM edits `requirements.html`, `stakeholders.html`, or `prd.html` directly and runs `workflow-continue`, re-read the file and continue from there.
116
118
  - Do not proceed to the next step until the PM explicitly confirms (e.g., says "confirm" or "确认").
117
119
 
118
120
  ## 认知象限确认(Johari)
@@ -134,6 +136,7 @@ Produce a clear, agreed-upon `{process_slug}/pages/docs/requirements.html` and t
134
136
  ## Output Artifacts
135
137
 
136
138
  - `{process_slug}/pages/docs/requirements.html`
139
+ - `{process_slug}/pages/docs/stakeholders.html`
137
140
  - `{process_slug}/pages/docs/user-stories.html`
138
141
  - `{process_slug}/pages/docs/prd.html` (root-level PRD, versioned)
139
142
  - `{process_slug}/pages/docs/snapshots/prd-v1.0.html` (immutable snapshot after approval)
@@ -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 `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.
24
+ 3. Produce the design package under `{process_slug}/pages/docs/`. Use the Markdown-first template for narrative documents and the structured template only when a fixed table is clearer.
25
25
 
26
- Common command pattern:
26
+ Default to Markdown for: `design-review`, `scenarios`, `feasibility`, `version-log`.
27
+ Use structured data (`--data`) only when a rigid table is genuinely better: `feature-catalog`, `data-model`, `page-map`, `api-list`.
28
+ For `flows`, prefer a Markdown file with ` ```mermaid ` diagrams.
29
+
30
+ Simplified single-page command:
27
31
  ```bash
28
32
  python scripts/lincoln_render.py \
29
33
  --stage product-design-docs \
30
34
  --target issue-<N>/pages/docs/<page>.html \
31
- --title "<标题>" --nav-label "<导航标签>" --version v1.0 --uid <uid> \
32
- --data issue-<N>/pages/docs/<page>.yaml
35
+ --title "<标题>" \
36
+ --markdown issue-<N>/pages/docs/<page>.md
37
+ ```
38
+
39
+ You can also render the whole missing package in one call:
40
+ ```bash
41
+ python scripts/lincoln_render.py \
42
+ --render-stage \
43
+ --stage product-design-docs \
44
+ --state-file issue-<N>/workflow-stage.yaml
33
45
  ```
46
+ This creates only the pages that do not yet exist. If a matching `.md` file exists, it is used automatically; otherwise the page is created empty for you to fill afterwards.
34
47
 
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`).
48
+ Page-specific guidance:
49
+ - `design-review.md`: H2 chapters such as `## 决策摘要`, `## 范围`, `## 链接`, `## 开放问题`, `## 审批清单`.
50
+ - `scenarios.md`: `## 主要场景`, `## 边界场景`, `## 非目标`, plus persona descriptions and Mermaid flowcharts.
51
+ - `feature-catalog.md`: either a Markdown table or a YAML `features` array.
52
+ - `data-model.md`: either Markdown entity sections or a YAML `entities` array.
53
+ - `flows.md`: Markdown with ` ```mermaid ` flowcharts and numbered step lists.
54
+ - `page-map.md`: either a Markdown table or a YAML `pages` array.
55
+ - `feasibility.md`: H2 chapters such as `## 风险`, `## 方案对比`, `## 建议`.
56
+ - `version-log.md`: H2 chapters plus a Markdown table of version entries.
57
+ - `api-list.md`: either a Markdown table or a YAML `apis` array.
45
58
  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.
46
59
  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
60
  6. Keep all documents traceable to the approved requirement and transcript timestamps where available.
@@ -18,10 +18,11 @@ primary_action: clarify-requirements
18
18
  variables:
19
19
  - process_slug
20
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
21
+ '{process_slug}/pages/docs/requirements.html': .claude/templates/issue-package/page-doc.html.tpl
22
+ '{process_slug}/pages/docs/stakeholders.html': .claude/templates/issue-package/page-doc.html.tpl
23
+ '{process_slug}/pages/docs/user-stories.html': .claude/templates/issue-package/page-doc.html.tpl
24
+ '{process_slug}/pages/docs/prd.html': .claude/templates/issue-package/page-doc.html.tpl
25
+ '{process_slug}/pages/docs/snapshots/prd-v*.html': .claude/templates/issue-package/page-doc.html.tpl
25
26
  agent:
26
27
  primary: lc-pm
27
28
  reviewers:
@@ -38,6 +39,7 @@ skills:
38
39
  artifacts:
39
40
  required:
40
41
  - '{process_slug}/pages/docs/requirements.html'
42
+ - '{process_slug}/pages/docs/stakeholders.html'
41
43
  - '{process_slug}/pages/docs/user-stories.html'
42
44
  - '{process_slug}/pages/docs/prd.html'
43
45
  optional:
@@ -47,7 +49,7 @@ references:
47
49
  agent_guide: .claude/agents/pm.md
48
50
  context:
49
51
  goal: 基于访谈产物(逐字稿、摘要、初始洞察)与人类 PM 进行多轮澄清,形成统一、可追溯、已确认的需求文档,并将 PRD 置于 HTML 门户({process_slug}/pages/docs/prd.html)作为串联后续所有阶段的主线文档与单一事实来源。人类读者通过 {process_slug}/index.html 浏览所有产物。
50
- execution: "调用 clarify-requirements skill 与人类 PM 进行多轮澄清对话,基于访谈产物识别歧义并达成共识;产出 requirements/user-stories/prd 三个 HTML 文档,PRD 携带 <!-- version: vX.Y --> 版本标记,确认后通过 scripts/lincoln_prd.py freeze 生成不可变的快照。"
52
+ execution: "调用 clarify-requirements skill 与人类 PM 进行多轮澄清对话,基于访谈产物识别歧义并达成共识;产出 requirements、stakeholders、user-stories、prd 四个 HTML 文档,PRD 携带 <!-- version: vX.Y --> 版本标记,确认后通过 scripts/lincoln_prd.py freeze 生成不可变的快照。"
51
53
  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、实现等产物。"
52
54
  gates:
53
55
  entry:
@@ -0,0 +1,44 @@
1
+ schema_version: 3.0.0
2
+ id: phase-1-p0-design
3
+ name: Phase 1 P0 Design
4
+ description: 'Design Phase 1 / P0 recommendations from the LEW-70 research baseline:
5
+
6
+ SecurityAnalyzer + ConfirmationPolicy, harness distribution for
7
+
8
+ Claude Code/Codex/OpenCode, and declarative hook/MCP configuration.
9
+
10
+ '
11
+ prerequisite_stage: explore-opensource
12
+ next_stage: phase-1-p0-implement
13
+ human_gate: true
14
+ agent:
15
+ primary: lc-architect
16
+ reviewers:
17
+ - lc-engineer
18
+ handoff_to: lc-pm
19
+ skills:
20
+ required: []
21
+ optional: []
22
+ artifacts:
23
+ required:
24
+ - '{process_slug}/designs/phase-1-p0-harness-security-design.md'
25
+ context:
26
+ goal: 'Produce an approved design document for the highest-priority borrowable
27
+
28
+ patterns before any implementation PR is opened.
29
+
30
+ '
31
+ constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
32
+
33
+ - human_gate 必须获得人类 PM 显式确认。
34
+
35
+ '
36
+ gates:
37
+ entry:
38
+ - check: previous_stage_completed
39
+ args:
40
+ - explore-opensource
41
+ exit:
42
+ - check: artifacts_present
43
+ workflows:
44
+ - framework-self-improvement
@@ -0,0 +1,47 @@
1
+ schema_version: 3.0.0
2
+ id: phase-1-p0-implement
3
+ name: Phase 1 P0 Implement
4
+ description: 'Implement Phase 1 / P0 recommendations from the approved design document.
5
+
6
+ '
7
+ prerequisite_stage: phase-1-p0-design
8
+ next_stage: phase-2-p1-design
9
+ human_gate: false
10
+ agent:
11
+ primary: lc-engineer
12
+ reviewers:
13
+ - lc-qa
14
+ handoff_to: lc-pm
15
+ skills:
16
+ required: []
17
+ optional: []
18
+ artifacts:
19
+ required:
20
+ - .claude/policies/security.yaml
21
+ - .claude/hooks/pre-tool-use.sh
22
+ - .claude/hooks/hooks.yaml
23
+ - .claude/mcp/mcp.yaml
24
+ - .claude/harnesses/codex.yaml
25
+ - .claude/harnesses/opencode.yaml
26
+ - scripts/security_analyzer.py
27
+ - scripts/lincoln_harness_adapter.py
28
+ - scripts/lincoln-setup.py
29
+ - scripts/check-harness-drift.sh
30
+ context:
31
+ goal: 'Implement the approved P0 design and verify with tests and static checks.
32
+
33
+ '
34
+ constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
35
+
36
+ - 所有变更必须通过测试与 static-check.sh。
37
+
38
+ '
39
+ gates:
40
+ entry:
41
+ - check: previous_stage_completed
42
+ args:
43
+ - phase-1-p0-design
44
+ exit:
45
+ - check: artifacts_present
46
+ workflows:
47
+ - framework-self-improvement
@@ -0,0 +1,53 @@
1
+ schema_version: 3.0.0
2
+ id: phase-2-p1-design
3
+ name: Phase 2 P1 Design
4
+ description: 'Design Phase 2 / P1 recommendations from the LEW-70 research baseline:
5
+
6
+ friction-based learning + recall precheck, EventLog + Condenser,
7
+
8
+ skill marketplace + git caching, sub-agent delegation, and MR knowledge mining.
9
+
10
+ '
11
+ prerequisite_stage: phase-1-p0-implement
12
+ next_stage: phase-2-p1-implement
13
+ human_gate: true
14
+ agent:
15
+ primary: lc-architect
16
+ reviewers:
17
+ - lc-engineer
18
+ - lc-researcher
19
+ handoff_to: lc-pm
20
+ parallel_specialists:
21
+ - lc-architect
22
+ - lc-security-reviewer
23
+ merge_strategy: priority
24
+ output_schema: .claude/schemas/design-review-feedback.json
25
+ skills:
26
+ required: []
27
+ optional: []
28
+ artifacts:
29
+ required:
30
+ - '{process_slug}/designs/phase-2-p1-learning-eventlog-subagents-design.md'
31
+ context:
32
+ goal: 'Produce an approved design document for P1 borrowable patterns before
33
+
34
+ any implementation PR is opened.
35
+
36
+ '
37
+ constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
38
+
39
+ - human_gate 必须获得人类 PM 显式确认。
40
+
41
+ - Lincoln 不自研底层执行器;所有设计必须适配 Claude Code / Codex / OpenCode。
42
+
43
+ '
44
+ gates:
45
+ entry:
46
+ - check: previous_stage_completed
47
+ args:
48
+ - phase-1-p0-implement
49
+ exit:
50
+ - check: artifacts_present
51
+ - check: human_approved
52
+ workflows:
53
+ - framework-self-improvement
@@ -0,0 +1,45 @@
1
+ schema_version: 3.0.0
2
+ id: phase-2-p1-implement
3
+ name: Phase 2 P1 Implement
4
+ description: 'Implement Phase 2 / P1 recommendations from the approved design document.
5
+
6
+ '
7
+ prerequisite_stage: phase-2-p1-design
8
+ next_stage: product-design-docs
9
+ human_gate: false
10
+ agent:
11
+ primary: lc-engineer
12
+ reviewers:
13
+ - lc-qa
14
+ handoff_to: lc-pm
15
+ skills:
16
+ required: []
17
+ optional: []
18
+ artifacts:
19
+ required:
20
+ - .claude/policies/friction.yaml
21
+ - .claude/schemas/design-review-feedback.json
22
+ - scripts/lincoln_friction.py
23
+ - scripts/lincoln_recall.py
24
+ - scripts/lincoln_condenser.py
25
+ - scripts/lincoln_mr_mine.py
26
+ - scripts/lincoln_trace.py
27
+ - scripts/stage_loader.py
28
+ context:
29
+ goal: 'Implement the approved P1 design and verify with tests and static checks.
30
+
31
+ '
32
+ constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
33
+
34
+ - 所有变更必须通过测试与 static-check.sh。
35
+
36
+ '
37
+ gates:
38
+ entry:
39
+ - check: previous_stage_completed
40
+ args:
41
+ - phase-2-p1-design
42
+ exit:
43
+ - check: artifacts_present
44
+ workflows:
45
+ - framework-self-improvement
@@ -16,16 +16,16 @@ primary_action: draft-product-design
16
16
  variables:
17
17
  - process_slug
18
18
  artifact_templates:
19
- '{process_slug}/pages/docs/design-review.html': .claude/templates/issue-package/page-doc-structured.html.tpl
20
- '{process_slug}/pages/docs/scenarios.html': .claude/templates/issue-package/page-doc-structured.html.tpl
19
+ '{process_slug}/pages/docs/design-review.html': .claude/templates/issue-package/page-doc.html.tpl
20
+ '{process_slug}/pages/docs/scenarios.html': .claude/templates/issue-package/page-doc.html.tpl
21
21
  '{process_slug}/pages/docs/feature-catalog.html': .claude/templates/issue-package/page-doc-structured.html.tpl
22
22
  '{process_slug}/pages/docs/data-model.html': .claude/templates/issue-package/page-doc-structured.html.tpl
23
- '{process_slug}/pages/docs/flows.html': .claude/templates/issue-package/page-doc-structured.html.tpl
24
- '{process_slug}/pages/docs/feasibility.html': .claude/templates/issue-package/page-doc-structured.html.tpl
23
+ '{process_slug}/pages/docs/flows.html': .claude/templates/issue-package/page-doc.html.tpl
24
+ '{process_slug}/pages/docs/feasibility.html': .claude/templates/issue-package/page-doc.html.tpl
25
25
  '{process_slug}/pages/docs/page-map.html': .claude/templates/issue-package/page-doc-structured.html.tpl
26
- '{process_slug}/pages/docs/version-log.html': .claude/templates/issue-package/page-doc-structured.html.tpl
26
+ '{process_slug}/pages/docs/version-log.html': .claude/templates/issue-package/page-doc.html.tpl
27
27
  '{process_slug}/pages/docs/api-list.html': .claude/templates/issue-package/page-doc-structured.html.tpl
28
- '{process_slug}/pages/docs/handoff-pm-to-ux-v*.html': .claude/templates/issue-package/page-doc-structured.html.tpl
28
+ '{process_slug}/pages/docs/handoff-pm-to-ux-v*.html': .claude/templates/issue-package/page-doc.html.tpl
29
29
  agent:
30
30
  primary: lc-pm
31
31
  reviewers:
@@ -0,0 +1,100 @@
1
+ workflow:
2
+ name: framework-self-improvement
3
+ version: 1.0.0
4
+ description: 持续改进 Lincoln 框架本身的工作流(安全门控、harness 分发、摩擦学习、事件追踪、子代理委托)
5
+ execution_mode: team
6
+ engine: everything-claude-code
7
+
8
+ steps:
9
+ - id: workflow-router
10
+ name: 工作流路由
11
+ description: 会话开场引导后,选择最适合当前场景的工作流模板
12
+ action: lc-workflow-router
13
+
14
+ - id: clarify
15
+ name: 需求澄清
16
+ description: 与人类 PM 多轮澄清,形成统一需求文档
17
+ human_gate: true
18
+ action: clarify-requirements
19
+ artifacts:
20
+ - "{process_slug}/pages/docs/requirements.html"
21
+ exit_checks:
22
+ - check: requirements_has_background_problem_solution_acceptance
23
+ - check: human_approved
24
+
25
+ - id: explore-opensource
26
+ name: 开源方案探索
27
+ description: 调研可复用的开源方案并记录决策
28
+ action: lc-explore-opensource
29
+ artifacts:
30
+ - "{process_slug}/docs/research/{change_name}-oss-options.md"
31
+ exit_checks:
32
+ - check: oss_research_complete
33
+
34
+ - id: phase-1-p0-design
35
+ name: Phase 1 P0 设计
36
+ description: 设计 P0 安全门控与 harness 分发方案
37
+ human_gate: true
38
+ action: draft-product-design
39
+ artifacts:
40
+ - "{process_slug}/designs/phase-1-p0-harness-security-design.md"
41
+ exit_checks:
42
+ - check: design_docs_complete
43
+ - check: design_docs_human_approved
44
+
45
+ - id: phase-1-p0-implement
46
+ name: Phase 1 P0 实现
47
+ description: 实现 P0 安全门控与 harness 分发
48
+ action: implement
49
+ artifacts:
50
+ - ".claude/policies/security.yaml"
51
+ - ".claude/hooks/pre-tool-use.sh"
52
+ - ".claude/hooks/hooks.yaml"
53
+ - ".claude/mcp/mcp.yaml"
54
+ - ".claude/harnesses/codex.yaml"
55
+ - ".claude/harnesses/opencode.yaml"
56
+ - "scripts/security_analyzer.py"
57
+ - "scripts/lincoln_harness_adapter.py"
58
+ - "scripts/lincoln-setup.py"
59
+ - "scripts/check-harness-drift.sh"
60
+ exit_checks:
61
+ - check: artifacts_present
62
+
63
+ - id: phase-2-p1-design
64
+ name: Phase 2 P1 设计
65
+ description: 设计 P1 摩擦学习、事件追踪扩展、子代理委托与 MR 知识挖掘方案
66
+ human_gate: true
67
+ action: draft-product-design
68
+ artifacts:
69
+ - "{process_slug}/designs/phase-2-p1-learning-eventlog-subagents-design.md"
70
+ exit_checks:
71
+ - check: design_docs_complete
72
+ - check: design_docs_human_approved
73
+
74
+ - id: phase-2-p1-implement
75
+ name: Phase 2 P1 实现
76
+ description: 实现 P1 摩擦学习、事件追踪扩展、子代理委托与 MR 知识挖掘
77
+ action: implement
78
+ artifacts:
79
+ - ".claude/policies/friction.yaml"
80
+ - ".claude/schemas/design-review-feedback.json"
81
+ - "scripts/lincoln_friction.py"
82
+ - "scripts/lincoln_recall.py"
83
+ - "scripts/lincoln_condenser.py"
84
+ - "scripts/lincoln_mr_mine.py"
85
+ - "scripts/lincoln_trace.py"
86
+ - "scripts/stage_loader.py"
87
+ exit_checks:
88
+ - check: artifacts_present
89
+
90
+ - id: sync-knowledge
91
+ name: 同步到知识库
92
+ description: 将业务与技术知识沉淀到 Obsidian vault
93
+ trigger: on_pr_merge
94
+ action: sync-to-knowledge
95
+ artifacts:
96
+ - "knowledge/03-features/{feature_slug}.md"
97
+ exit_checks:
98
+ - check: feature_doc_has_business_and_technical_sections
99
+ - check: feature_doc_has_links
100
+ - check: no_conflict_with_existing_knowledge
@@ -46,6 +46,7 @@ workflow:
46
46
  human_gate: true
47
47
  artifacts:
48
48
  - "{process_slug}/pages/docs/requirements.html"
49
+ - "{process_slug}/pages/docs/stakeholders.html"
49
50
  - "{process_slug}/pages/docs/user-stories.html"
50
51
  - "{process_slug}/pages/docs/prd.html"
51
52
  optional_artifacts:
@@ -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.6.2",
12
+ "version": "1.7.0",
13
13
  "author": {
14
14
  "name": "Lincoln contributors"
15
15
  },
@@ -28,5 +28,5 @@
28
28
  ]
29
29
  }
30
30
  ],
31
- "version": "1.6.2"
31
+ "version": "1.7.0"
32
32
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lincoln",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "AI-Native product R&D collaboration system for Conductor + Claude Code + OpenSpec + GitHub + Obsidian",
5
5
  "author": {
6
6
  "name": "Lincoln contributors"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.2",
2
+ "version": "1.7.0",
3
3
  "manifests": [
4
4
  {
5
5
  "path": ".claude-plugin/plugin.json",