@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
@@ -1,12 +1,17 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: lc-research-scope
3
3
  name: 界定研究范围
4
- description: '与 PM 澄清研究目标、问题、范围与验收标准,输出已确认的研究 brief。'
5
- templates:
4
+ description: 与 PM 澄清研究目标、问题、范围与验收标准,输出已确认的研究 brief。
5
+ workflows:
6
6
  - pm-research
7
7
  prerequisite_stage: workflow-router
8
8
  next_stage: lc-first-principles
9
9
  human_gate: true
10
+ execution_mode: solo
11
+ primary_action: lc-research-scope
12
+ variables:
13
+ - process_slug
14
+ - session_id
10
15
  agent:
11
16
  primary: lc-pm
12
17
  reviewers:
@@ -19,15 +24,13 @@ skills:
19
24
  artifacts:
20
25
  required:
21
26
  - '{process_slug}/research/{session_id}/scope.md'
27
+ references:
28
+ skill_prompt: .claude/skills/lc-research-scope/SKILL.md
29
+ agent_guide: .claude/agents/pm.md
22
30
  context:
23
31
  goal: 与 PM 澄清研究目标、问题、范围与验收标准,输出已确认的研究 brief。
24
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml 或 .context/workflow/pm-research.yaml。
25
-
26
- - 本阶段产物写入 {process_slug}/research/{session_id}/。
27
-
28
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
29
-
30
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
32
+ execution: "调用 lc-research-scope skill 与 PM 多轮澄清研究目标、问题、范围与验收标准,输出已确认的 scope.md,作为后续各研究阶段的单一事实来源。"
33
+ constraints: "- 本阶段产物写入 {process_slug}/research/{session_id}/。"
31
34
  gates:
32
35
  entry:
33
36
  - check: previous_stage_completed
@@ -1,12 +1,17 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: lc-stakeholder-research
3
3
  name: 相关者研究
4
- description: '识别并研究用户、买单方、建设方、维护方等关键相关者及其诉求。'
5
- templates:
4
+ description: 识别并研究用户、买单方、建设方、维护方等关键相关者及其诉求。
5
+ workflows:
6
6
  - pm-research
7
7
  prerequisite_stage: lc-first-principles
8
8
  next_stage: lc-market-research
9
9
  human_gate: false
10
+ execution_mode: solo
11
+ primary_action: lc-stakeholder-research
12
+ variables:
13
+ - process_slug
14
+ - session_id
10
15
  agent:
11
16
  primary: lc-researcher
12
17
  reviewers:
@@ -19,15 +24,13 @@ skills:
19
24
  artifacts:
20
25
  required:
21
26
  - '{process_slug}/research/{session_id}/stakeholders.md'
27
+ references:
28
+ skill_prompt: .claude/skills/lc-stakeholder-research/SKILL.md
29
+ agent_guide: .claude/agents/researcher.md
22
30
  context:
23
31
  goal: 识别并研究用户、买单方、建设方、维护方等关键相关者及其诉求。
24
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml 或 .context/workflow/pm-research.yaml。
25
-
26
- - 本阶段产物写入 {process_slug}/research/{session_id}/。
27
-
28
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
29
-
30
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
32
+ execution: "调用 lc-stakeholder-research skill 识别并研究用户、买单方、建设方、维护方等关键相关者,找到他们的发声渠道并分析其诉求,输出 stakeholders.md。"
33
+ constraints: "- 本阶段产物写入 {process_slug}/research/{session_id}/。"
31
34
  gates:
32
35
  entry:
33
36
  - check: previous_stage_completed
@@ -1,12 +1,17 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: lc-storytelling
3
3
  name: 体系化论述
4
- description: '基于金字塔原理将研究成果结构化为可说服决策者的故事体系。'
5
- templates:
4
+ description: 基于金字塔原理将研究成果结构化为可说服决策者的故事体系。
5
+ workflows:
6
6
  - pm-research
7
7
  prerequisite_stage: lc-collect-intelligence
8
8
  next_stage: lc-research-report
9
9
  human_gate: false
10
+ execution_mode: solo
11
+ primary_action: lc-storytelling
12
+ variables:
13
+ - process_slug
14
+ - session_id
10
15
  agent:
11
16
  primary: lc-pm
12
17
  reviewers:
@@ -19,15 +24,13 @@ skills:
19
24
  artifacts:
20
25
  required:
21
26
  - '{process_slug}/research/{session_id}/narrative.md'
27
+ references:
28
+ skill_prompt: .claude/skills/lc-storytelling/SKILL.md
29
+ agent_guide: .claude/agents/pm.md
22
30
  context:
23
31
  goal: 基于金字塔原理将研究成果结构化为可说服决策者的故事体系。
24
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml 或 .context/workflow/pm-research.yaml。
25
-
26
- - 本阶段产物写入 {process_slug}/research/{session_id}/。
27
-
28
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
29
-
30
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
32
+ execution: "调用 lc-storytelling skill 基于金字塔原理与科学论述逻辑,将研究成果结构化为可说服决策者的故事,输出 narrative.md。"
33
+ constraints: "- 本阶段产物写入 {process_slug}/research/{session_id}/。"
31
34
  gates:
32
35
  entry:
33
36
  - check: previous_stage_completed
@@ -1,13 +1,31 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: product-design-docs
3
3
  name: Product Design Docs
4
- description: 'Produces the design-review package based on confirmed
5
-
6
- requirements. May include early OpenSpec drafts.'
7
- templates: all
4
+ description: 基于已确认需求生成产品设计评审文档包(design-review、scenarios、feature-catalog、data-model、flows、feasibility、page-map、version-log、api-list 等 HTML),并完成 PM→UX 交接产物。
5
+ workflows:
6
+ - bug-fix
7
+ - design-spike
8
+ - existing-project-iteration
9
+ - interview-to-knowledge
10
+ - oss-first-design
8
11
  prerequisite_stage: clarify
9
12
  next_stage: product-prototype
10
13
  human_gate: true
14
+ execution_mode: both
15
+ primary_action: draft-product-design
16
+ variables:
17
+ - process_slug
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
21
+ '{process_slug}/pages/docs/feature-catalog.html': .claude/templates/issue-package/page-doc-structured.html.tpl
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
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
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
11
29
  agent:
12
30
  primary: lc-pm
13
31
  reviewers:
@@ -17,12 +35,12 @@ agent:
17
35
  handoff_to: lc-designer
18
36
  skills:
19
37
  required:
38
+ - lincoln:draft-product-design
20
39
  - superpowers:brainstorming
21
40
  - superpowers:writing-plans
22
41
  optional:
23
42
  - gsd:spec-phase
24
43
  - oh-my-claudecode:plan
25
- - openspec:propose
26
44
  artifacts:
27
45
  required:
28
46
  - '{process_slug}/pages/docs/design-review.html'
@@ -34,22 +52,18 @@ artifacts:
34
52
  - '{process_slug}/pages/docs/page-map.html'
35
53
  - '{process_slug}/pages/docs/version-log.html'
36
54
  - '{process_slug}/pages/docs/api-list.html'
55
+ - '{process_slug}/pages/docs/handoff-pm-to-ux-v*.html'
37
56
  - '{process_slug}/handoffs/pm-to-ux/pm-to-ux.handoff.yaml'
57
+ - '{process_slug}/handoffs/pm-to-ux/master-handoff-pm-to-ux-v*.md'
58
+ references:
59
+ skill_prompt: .claude/skills/draft-product-design/SKILL.md
60
+ agent_guide: .claude/agents/pm.md
38
61
  context:
39
- goal: 将已确认的需求转化为面向人类 PM 评审的简洁产品设计文档包,并完成 PM→UX 交接产物(agent-agent 契约),使人类 UX 能基于统一认知驱动 UX Agent。所有产物通过 {process_slug}/index.html 门户访问。
40
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
41
-
42
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
43
-
44
- - 本阶段设有 human_gate,必须获得人类 PM 显式确认后才能进入下一阶段。
45
-
46
- - 本阶段 exit gate 要求 `handoffs/pm-to-ux/pm-to-ux.handoff.yaml` 存在。
47
-
48
- - handoff_to 为 lc-designer / lc-frontend-engineer;接收方 Agent 必须从 `handoffs/pm-to-ux/pm-to-ux.handoff.yaml` 开始读取,再按 `context_pack` 顺序读取 Tier-2 文档。
49
-
50
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
62
+ goal: 将已确认的需求转化为面向人类 PM 评审的简洁产品设计文档包(design-review/scenarios/feature-catalog/data-model/flows/feasibility/page-map/version-log/api-list 等 HTML),并完成 PM→UX 交接产物(agent-agent 契约),使人类 UX 能基于统一认知驱动 UX Agent。所有产物通过 {process_slug}/index.html 门户访问。
63
+ execution: 调用 draft-product-design skill 基于已确认的需求生成设计文档包(HTML 页面),并产出 PM→UX handoff 契约(pm-to-ux.handoff.yaml + master-handoff-pm-to-ux-v*.md),作为 UX 阶段接收方的入口。UI 规范、字段规范与可交互原型由下一阶段的 product-prototype 负责,不在本阶段产出。
64
+ constraints: '- 本阶段 exit gate 要求 `handoffs/pm-to-ux/pm-to-ux.handoff.yaml` 存在。
51
65
 
52
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
66
+ - handoff_to 为 lc-designer;接收方 Agent 必须从 `handoffs/pm-to-ux/pm-to-ux.handoff.yaml` 开始读取,再按 `context_pack` 顺序读取 Tier-2 文档。'
53
67
  gates:
54
68
  entry:
55
69
  - check: previous_stage_completed
@@ -1,15 +1,24 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: product-prototype
3
3
  name: Product Prototype
4
- description: Generates UI specs, field specs, and optionally Pencil prototypes (prototype.pen is produced by UI after the UX node).
5
- templates:
6
- - interview-to-knowledge
7
- - existing-project-iteration
4
+ description: 基于已确认设计文档生成字段规格、UI 规格和可交互 HTML 原型(pages/prototype/**/*.html)。Pencil 原型(prototype.pen)为可选,由 UI 在 UX 节点之后按需产出。
5
+ workflows:
8
6
  - design-spike
7
+ - existing-project-iteration
8
+ - interview-to-knowledge
9
9
  - oss-first-design
10
10
  prerequisite_stage: product-design-docs
11
11
  next_stage: tdd-development-plan
12
12
  human_gate: true
13
+ execution_mode: both
14
+ primary_action: build-product-prototype
15
+ variables:
16
+ - process_slug
17
+ - design_id
18
+ artifact_templates:
19
+ '{process_slug}/pages/docs/ui-spec.html': .claude/templates/issue-package/page-doc-structured.html.tpl
20
+ '{process_slug}/pages/docs/fields.html': .claude/templates/issue-package/page-doc-structured.html.tpl
21
+ '{process_slug}/pages/prototype/**/*.html': .claude/templates/issue-package/page-prototype-structured.html.tpl
13
22
  agent:
14
23
  primary: lc-designer
15
24
  reviewers:
@@ -18,6 +27,7 @@ agent:
18
27
  handoff_to: lc-engineer
19
28
  skills:
20
29
  required:
30
+ - lincoln:build-product-prototype
21
31
  - superpowers:brainstorming
22
32
  optional:
23
33
  - gsd:ui-phase
@@ -27,22 +37,16 @@ artifacts:
27
37
  required:
28
38
  - '{process_slug}/pages/docs/ui-spec.html'
29
39
  - '{process_slug}/pages/docs/fields.html'
40
+ - '{process_slug}/pages/prototype/**/*.html'
30
41
  optional:
31
42
  - '{process_slug}/designs/{design_id}/prototype.pen'
32
- - '{process_slug}/pages/prototype/**/*.html'
43
+ references:
44
+ skill_prompt: .claude/skills/build-product-prototype/SKILL.md
45
+ agent_guide: .claude/agents/designer.md
33
46
  context:
34
- goal: 将已确认的产品设计文档转化为开发可用的 UI/字段规格 HTML 文档;`prototype.pen` 由 UI 在 UX 节点之后产出,因此在本阶段 PM→UX 交接中视为 optional。所有产物通过 {process_slug}/index.html 门户访问。
35
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
36
-
37
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
38
-
39
- - 本阶段设有 human_gate,必须获得人类 PM 显式确认后才能进入下一阶段。
40
-
41
- - `prototype.pen` 为 UI 阶段产物,在 PM→UX 交接中不作为 required artifact。
42
-
43
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
44
-
45
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
47
+ goal: 将已确认的产品设计文档转化为开发可用的 UI/字段规格 HTML 文档与高保真 HTML 交互原型。HTML 原型是本阶段的主要评审产物;`prototype.pen` 由 UI 在 UX 节点之后按需产出,在本阶段视为 optional。所有产物通过 {process_slug}/index.html 门户访问。
48
+ execution: 调用 build-product-prototype skill 基于已确认的设计文档生成 fields.html、ui-spec.html 以及 pages/prototype/ 下的高保真 HTML 交互原型;Pencil 原型(prototype.pen)为 optional,仅在 PM 明确要求时由 UI 在 UX 节点之后产出。
49
+ constraints: '- `{process_slug}/pages/prototype/**/*.html` 为 required 高保真 HTML 交互原型;`prototype.pen` 为 optional UI 阶段产物。'
46
50
  gates:
47
51
  entry:
48
52
  - check: previous_stage_completed
@@ -1,13 +1,22 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: propose
3
3
  name: Propose
4
4
  description: 'Generates a complete OpenSpec change proposal including
5
5
 
6
6
  proposal.md, design.md, tasks.md, and specs/ directory.'
7
- templates: all
7
+ workflows:
8
+ - bug-fix
9
+ - existing-project-iteration
10
+ - interview-to-knowledge
11
+ - oss-first-design
8
12
  prerequisite_stage: tdd-development-plan
9
13
  next_stage: split
10
14
  human_gate: false
15
+ execution_mode: both
16
+ primary_action: propose-with-openspec
17
+ variables:
18
+ - process_slug
19
+ - change_name
11
20
  agent:
12
21
  primary: lc-engineer
13
22
  reviewers:
@@ -16,6 +25,7 @@ agent:
16
25
  handoff_to: lc-pm
17
26
  skills:
18
27
  required:
28
+ - lincoln:propose-with-openspec
19
29
  - openspec:propose
20
30
  optional:
21
31
  - superpowers:verification-before-completion
@@ -26,16 +36,13 @@ artifacts:
26
36
  - '{process_slug}/openspec/changes/{change_name}/design.md'
27
37
  - '{process_slug}/openspec/changes/{change_name}/tasks.md'
28
38
  - '{process_slug}/openspec/changes/{change_name}/specs/'
39
+ references:
40
+ skill_prompt: .claude/skills/propose-with-openspec/SKILL.md
41
+ agent_guide: .claude/agents/engineer.md
29
42
  context:
30
43
  goal: 基于已确认的 TDD 研发计划,调用 OpenSpec CLI 生成标准变更提案 artifact 目录(`{process_slug}/openspec/changes/{change_name}/`),将
31
44
  TDD 计划转化为结构化的 OpenSpec 变更提案,作为后续 GitHub Issues 拆分和研发实现的依据。
32
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
33
-
34
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
35
-
36
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
37
-
38
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
45
+ execution: 调用 propose-with-openspec skill,通过 OpenSpec CLI 读取 tdd-plan.html 并生成标准变更提案目录,包含 proposal.md、design.md、tasks.md 与 specs/,作为后续 GitHub Issues 拆分与研发实现的依据。
39
46
  gates:
40
47
  entry:
41
48
  - check: previous_stage_completed
@@ -1,13 +1,19 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: split
3
3
  name: Split
4
4
  description: 'Breaks OpenSpec tasks into parallel, independently implementable
5
5
 
6
6
  GitHub Issues with clear boundaries and acceptance criteria.'
7
- templates: all
7
+ workflows:
8
+ - bug-fix
9
+ - existing-project-iteration
10
+ - interview-to-knowledge
11
+ - oss-first-design
8
12
  prerequisite_stage: propose
9
13
  next_stage: implement
10
14
  human_gate: false
15
+ execution_mode: both
16
+ primary_action: split-to-github
11
17
  agent:
12
18
  primary: lc-pm
13
19
  reviewers:
@@ -16,6 +22,7 @@ agent:
16
22
  handoff_to: lc-engineer
17
23
  skills:
18
24
  required:
25
+ - lincoln:split-to-github
19
26
  - superpowers:dispatching-parallel-agents
20
27
  optional:
21
28
  - gsd:phase
@@ -23,15 +30,12 @@ skills:
23
30
  artifacts:
24
31
  required:
25
32
  - .github/linked-issues.yaml
33
+ references:
34
+ skill_prompt: .claude/skills/split-to-github/SKILL.md
35
+ agent_guide: .claude/agents/pm.md
26
36
  context:
27
37
  goal: 将 OpenSpec 变更提案中的 tasks 拆分为可执行的 GitHub Issues,建立从需求到代码追踪的完整链路。
28
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
29
-
30
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
31
-
32
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
33
-
34
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
38
+ execution: 调用 split-to-github skill 读取 OpenSpec 变更提案中的 tasks,拆分为边界清晰、可独立实施的 GitHub Issues,并写入 .github/linked-issues.yaml 维护任务与 issue 的双向映射。
35
39
  gates:
36
40
  entry:
37
41
  - check: previous_stage_completed
@@ -1,4 +1,4 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: sync-knowledge
3
3
  name: Sync Knowledge
4
4
  description: 'After PR merge, updates Obsidian vault and archives milestone
@@ -6,16 +6,30 @@ description: 'After PR merge, updates Obsidian vault and archives milestone
6
6
  artifacts, generating feature docs, decision docs, and interview
7
7
 
8
8
  summaries.'
9
- templates: all
9
+ workflows:
10
+ - bug-fix
11
+ - design-spike
12
+ - existing-project-iteration
13
+ - interview-to-knowledge
14
+ - oss-first-design
10
15
  prerequisite_stage: implement
11
16
  next_stage: null
12
17
  human_gate: false
18
+ execution_mode: both
19
+ primary_action: sync-to-knowledge
20
+ variables:
21
+ - pr_number
22
+ - session_id
23
+ - requirement_id
24
+ - feature_slug
25
+ - decision_id
13
26
  agent:
14
27
  primary: lc-knowledge-curator
15
28
  reviewers:
16
29
  - lc-release-coordinator
17
30
  skills:
18
31
  required:
32
+ - lincoln:sync-to-knowledge
19
33
  - gsd:docs-update
20
34
  optional:
21
35
  - gsd:forensics
@@ -31,15 +45,12 @@ artifacts:
31
45
  - knowledge/02-requirements/{requirement_id}.md
32
46
  - knowledge/03-features/{feature_slug}.md
33
47
  - knowledge/04-decisions/{decision_id}.md
48
+ references:
49
+ skill_prompt: .claude/skills/sync-to-knowledge/SKILL.md
50
+ agent_guide: .claude/agents/knowledge-curator.md
34
51
  context:
35
52
  goal: PR 合并后,将代码变更、Issue 讨论、设计决策沉淀到项目 Obsidian 知识库,确保业务知识和技术知识双轨保存,形成可追溯的知识资产。
36
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
37
-
38
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
39
-
40
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
41
-
42
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
53
+ execution: "调用 sync-to-knowledge skill 在 PR 合并后将代码变更、Issue 讨论与设计决策写入 Obsidian vault(knowledge/01-interviews、02-requirements、03-features、04-decisions),并在 .github/lincoln-sync-queue/pr-{pr_number}.yaml 记录同步状态。"
43
54
  gates:
44
55
  entry:
45
56
  - check: previous_stage_completed
@@ -1,13 +1,23 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: tdd-development-plan
3
3
  name: TDD Development Plan
4
4
  description: 'Produces tdd-plan.html with red/green/refactor sequences,
5
5
 
6
6
  test scenarios, and task slices ready for OpenSpec proposal.'
7
- templates: all
7
+ workflows:
8
+ - bug-fix
9
+ - existing-project-iteration
10
+ - interview-to-knowledge
11
+ - oss-first-design
8
12
  prerequisite_stage: product-prototype
9
13
  next_stage: propose
10
14
  human_gate: false
15
+ execution_mode: both
16
+ primary_action: plan-tdd-development
17
+ variables:
18
+ - process_slug
19
+ artifact_templates:
20
+ '{process_slug}/pages/docs/tdd-plan.html': .claude/templates/issue-package/page-doc.html.tpl
11
21
  agent:
12
22
  primary: lc-engineer
13
23
  reviewers:
@@ -16,6 +26,7 @@ agent:
16
26
  handoff_to: lc-engineer
17
27
  skills:
18
28
  required:
29
+ - lincoln:plan-tdd-development
19
30
  - superpowers:writing-plans
20
31
  - superpowers:test-driven-development
21
32
  optional:
@@ -25,15 +36,12 @@ skills:
25
36
  artifacts:
26
37
  required:
27
38
  - '{process_slug}/pages/docs/tdd-plan.html'
39
+ references:
40
+ skill_prompt: .claude/skills/plan-tdd-development/SKILL.md
41
+ agent_guide: .claude/agents/engineer.md
28
42
  context:
29
43
  goal: 基于已确认的产品设计文档、字段规格、UI 规格和 Pencil 原型,生成可执行的测试驱动研发计划(`tdd-plan.html`),作为从产品设计到 OpenSpec 变更提案的桥梁。所有产物通过 {process_slug}/index.html 门户访问。
30
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
31
-
32
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
33
-
34
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
35
-
36
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
44
+ execution: "调用 plan-tdd-development skill 基于已确认的产品设计文档、字段规格、UI 规格和 Pencil 原型,生成包含验收映射、测试场景与任务切片的 tdd-plan.html,作为 OpenSpec 提案的输入。"
37
45
  gates:
38
46
  entry:
39
47
  - check: previous_stage_completed
@@ -1,4 +1,4 @@
1
- schema_version: 2.0.0
1
+ schema_version: 3.0.0
2
2
  id: workflow-router
3
3
  name: Workflow Router
4
4
  description: 'Entry point. Runs session intake (overview recon, situation judgment,
@@ -6,10 +6,19 @@ description: 'Entry point. Runs session intake (overview recon, situation judgme
6
6
  Johari confirmation) on cold start, assesses repository context, selects the most
7
7
 
8
8
  appropriate workflow template, and initializes workflow-stage.'
9
- templates: all
9
+ workflows:
10
+ - bug-fix
11
+ - design-spike
12
+ - existing-project-iteration
13
+ - oss-first-design
14
+ - pm-research
10
15
  prerequisite_stage: null
11
16
  next_stage: null
12
17
  human_gate: true
18
+ execution_mode: both
19
+ primary_action: lc-workflow-router
20
+ variables:
21
+ - process_slug
13
22
  agent:
14
23
  primary: lc-pm
15
24
  reviewers:
@@ -17,6 +26,7 @@ agent:
17
26
  handoff_to: lc-pm
18
27
  skills:
19
28
  required:
29
+ - lincoln:lc-workflow-router
20
30
  - superpowers:bootstrap
21
31
  optional:
22
32
  - gsd:new-project
@@ -25,19 +35,13 @@ skills:
25
35
  artifacts:
26
36
  required:
27
37
  - '{process_slug}/workflow-stage.yaml'
38
+ references:
39
+ skill_prompt: .claude/skills/lc-workflow-router/SKILL.md
40
+ agent_guide: .claude/agents/pm.md
28
41
  context:
29
42
  goal: 在会话启动时先做概览级摸排与处境判断(冷启动开场引导),经用户确认后选择最适合的 Lincoln 工作流模板。
30
- constraints: '- 仅通过 scripts/stage_loader.py 更新 {process_slug}/workflow-stage.yaml。
31
-
32
- - 开场摸排为概览级:只读操作 ≤ 8 次,不读源码实现,不做深度扫描(禁用 lc-build-codebase-knowledge)。
33
-
34
- - 禁止修改 {process_slug}/recordings/ 中的原始文件。
35
-
36
- - 本阶段设有 human_gate,必须获得人类 PM 显式确认后才能进入下一阶段。
37
-
38
- - 门控评估优先使用 AI 能力:读取产物并推理其完整性,而非仅依赖脚本化检查。
39
-
40
- - 详细执行步骤、模板与工具见对应 skill prompt 和 .claude/agents/<primary_agent>.md。'
43
+ execution: 调用 lc-workflow-router skill 的 intake 流程:执行概览级摸排与处境判断,向人类 PM 提出 Johari 确认问题,经用户确认目标与执行路径后选择最匹配的工作流模板并初始化 {process_slug}/workflow-stage.yaml。
44
+ constraints: '- 开场摸排为概览级:只读操作 ≤ 8 次,不读源码实现,不做深度扫描(禁用 lc-build-codebase-knowledge)。'
41
45
  gates:
42
46
  entry: []
43
47
  exit:
@@ -73,13 +73,35 @@
73
73
  - **Skill(技能)**:阶段可调用的方法论子技能或 Lincoln 原生技能,由阶段 yaml 的 `skills` 字段声明。
74
74
  - **Role(角色)**:阶段默认 Agent 角色(pm、designer、engineer、qa、researcher、knowledge-curator、release-coordinator)。
75
75
 
76
+ ## 单一权威来源(SSOT)与产物路径一致性
77
+
78
+ Lincoln 有四层配置可能引用同一产物路径,修改时必须同步,否则 Agent 会拿到脱钩的指引:
79
+
80
+ | 事实 | 权威来源 | 副本(必须与权威一致) |
81
+ |---|---|---|
82
+ | 产物路径 / 必交性 | `.claude/stages/<stage>.yaml` 的 `artifacts` | workflow `.yaml` 的 `artifacts`/`optional_artifacts`、对应 skill 的 `SKILL.md` `outputs`、agent `.md` 的产物规范 |
83
+ | 阶段顺序 | workflow `.yaml` 的 `steps` | stage `.yaml` 的 `prerequisite_stage` / `next_stage` |
84
+ | 主执行 skill | workflow step 的 `action` | stage `.yaml` `skills.required` 首位、agent `.md` 可调用技能 |
85
+ | 外部 skill 依赖 | `.claude/skills/dependencies.yaml` | stage `.yaml` `skills.required/optional` 中的 namespaced skill |
86
+
87
+ 仓库提供 `scripts/check-prompt-drift.py` 自动校验以上四层一致性。本地修改后、提交前必须运行:
88
+
89
+ ```bash
90
+ ./scripts/check-prompt-drift.py --strict --focus pm # PM 三阶段必须绿
91
+ ./scripts/check-prompt-drift.py --strict # 全量校验(逐步推进)
92
+ ```
93
+
94
+ PM 三阶段(`clarify` / `product-design-docs` / `product-prototype`)的 drift 为阻塞项,其余阶段可在严格模式外先报告后治理。
95
+
76
96
  ## 如何新增工作流
77
97
 
78
98
  1. 在本目录创建 `<workflow-name>.yaml`,声明 `execution_mode: solo|team`。
79
99
  2. 遵循 [`workflow-template.schema.json`](../schemas/workflow-template.schema.json) 的字段约定(`execution_mode` 为必填)。
80
- 3. 运行 `python3 "${CLAUDE_PLUGIN_ROOT:-${LINCOLN_HOME:-$HOME/.lincoln/current}}/scripts/lincoln_command_map.py" --refresh` 自动在 `.claude/harnesses/command-map.yaml` 登记 `lc-wf-<name>` 等命令,并同步 `.claude-plugin/plugin.json`,然后运行 `python3 "${CLAUDE_PLUGIN_ROOT:-${LINCOLN_HOME:-$HOME/.lincoln/current}}/scripts/lincoln-setup.py" generate-harness --harness codex --harness opencode` 重新生成适配产物。
81
- 4. 在 `.claude/skills/lc-wf/SKILL.md` 的命令映射表中补充触发词。
82
- 5. 更新本 README 的**快速路由表**和**工作流详解**。
100
+ 3. 若工作流使用已有 stage,必须保持该 stage 的 `artifacts` 与 workflow step 的 `artifacts`/`optional_artifacts` 一致;新增 stage 时同步更新 `.claude/skills/dependencies.yaml` 中引用的 skill。
101
+ 4. 运行 `./scripts/check-prompt-drift.py --strict --focus pm` 确认无漂移。
102
+ 5. 运行 `python3 "${CLAUDE_PLUGIN_ROOT:-${LINCOLN_HOME:-$HOME/.lincoln/current}}/scripts/lincoln_command_map.py" --refresh` 自动在 `.claude/harnesses/command-map.yaml` 登记 `lc-wf-<name>` 等命令,并同步 `.claude-plugin/plugin.json`,然后运行 `python3 "${CLAUDE_PLUGIN_ROOT:-${LINCOLN_HOME:-$HOME/.lincoln/current}}/scripts/lincoln-setup.py" generate-harness --harness codex --harness opencode` 重新生成适配产物。
103
+ 6. 在 `.claude/skills/lc-wf/SKILL.md` 的命令映射表中补充触发词。
104
+ 7. 更新本 README 的**快速路由表**和**工作流详解**。
83
105
 
84
106
  ## 相关文件
85
107
 
@@ -66,6 +66,7 @@ workflow:
66
66
  - id: implement
67
67
  name: 研发实现
68
68
  description: 按 TDD 实施并完成验证
69
+ action: implement
69
70
  human_gate: true
70
71
 
71
72
  - id: sync-knowledge
@@ -91,6 +91,7 @@ workflow:
91
91
  - id: implement
92
92
  name: 研发实现
93
93
  description: 按 TDD 实施并完成验证
94
+ action: implement
94
95
  human_gate: true
95
96
 
96
97
  - id: sync-knowledge
@@ -78,6 +78,7 @@ workflow:
78
78
  - "{process_slug}/pages/docs/api-list.html"
79
79
  - "{process_slug}/pages/docs/handoff-pm-to-ux-v*.html"
80
80
  - "{process_slug}/handoffs/pm-to-ux/pm-to-ux.handoff.yaml"
81
+ - "{process_slug}/handoffs/pm-to-ux/master-handoff-pm-to-ux-v*.md"
81
82
  exit_checks:
82
83
  - check: design_docs_complete
83
84
  args: ["{design_id}"]
@@ -86,7 +87,7 @@ workflow:
86
87
 
87
88
  - id: product-prototype
88
89
  name: 产品原型
89
- description: 基于已确认设计文档生成字段、界面规格;prototype.pen 由 UI 在 UX 节点之后产出,本阶段 optional
90
+ description: 基于已确认设计文档生成字段、界面规格与高保真 HTML 交互原型;Pencil 原型 optional
90
91
  entry_checks:
91
92
  - check: product_design_approved
92
93
  args: ["{design_id}"]
@@ -95,8 +96,8 @@ workflow:
95
96
  artifacts:
96
97
  - "{process_slug}/pages/docs/ui-spec.html"
97
98
  - "{process_slug}/pages/docs/fields.html"
98
- optional_artifacts:
99
99
  - "{process_slug}/pages/prototype/**/*.html"
100
+ optional_artifacts:
100
101
  - "{process_slug}/designs/{design_id}/prototype.pen"
101
102
  exit_checks:
102
103
  - check: prototype_artifact_complete
@@ -153,6 +154,7 @@ workflow:
153
154
  - id: implement
154
155
  name: 研发实现
155
156
  description: 人类研发团队基于 Issues 开发并提交 PR
157
+ action: implement
156
158
  entry_checks:
157
159
  - check: issues_ready
158
160
  args: ["{session_id}"]
@@ -85,6 +85,7 @@ workflow:
85
85
  - id: implement
86
86
  name: 研发实现
87
87
  description: 按 TDD 实施并完成验证
88
+ action: implement
88
89
  human_gate: true
89
90
 
90
91
  - id: sync-knowledge