@lark-apaas/coding-steering 0.1.18-dev.21ea0ba → 0.1.18-dev.28c4f05

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.
@@ -16,7 +16,7 @@
16
16
 
17
17
  - 消费方直接读 design.md,靠目录约定找 sidecar 与资产;frontmatter `path` 是唯一文件引用点。
18
18
  - manifest(`manifest.json`,识别靠内部 `schemaVersion` 字面量不靠文件名)服务存储、索引、校验和迁移;消费模型不需要读它。
19
- - `ref/` 是包内可剥离子目录:抽取产出必含(check_v2 不校验其存在性,归位是打包步骤的责任),入库/下发时链路剥离,不进消费上下文。
19
+ - `ref/` 只放 `audit.yaml`(数值出处的人工复核记录,几 KB)。频次原表、聚类原始数据、`extract.json`、重建图、logo 候选图**留在抽取工作目录,不进交付包**——原设计是「下发时链路剥离」,但链路上没有环节真的做剥离,审计材料会连带进消费上下文并占掉包体的大头。
20
20
 
21
21
  ## 1. design.md frontmatter 新增键
22
22
 
@@ -53,10 +53,10 @@ canvas: 1920x1080 # layouts.md 首键;px = round(EMU / sldSz_cx * 1920)
53
53
  themes: [dark, light]
54
54
  default-theme: dark # 双主题包必填(V2-13)
55
55
  colors: # v1 单层扁平,主题进 token 名
56
- dark-surface: "#0A0E1E"
57
- dark-on-surface: "#FFFFFF"
58
- light-surface: "#FFFFFF"
59
- primary: "#3C7FFF" # 共用色不加前缀
56
+ dark-surface: "#RRGGBB"
57
+ dark-on-surface: "#RRGGBB"
58
+ light-surface: "#RRGGBB"
59
+ primary: "#RRGGBB" # 共用色不加前缀
60
60
  ```
61
61
 
62
62
  - token 前缀约定(`dark-X`/`light-X` = 主题专属,无前缀 = 共用)在 `## Usage` 里向消费者写一句;主题机制溯源(clrMap 反转等)落 `ref/audit.yaml`。
@@ -65,7 +65,7 @@ colors: # v1 单层扁平,主题进 token 名
65
65
 
66
66
  ### 1.3 排除色
67
67
 
68
- - **排除色进 `## Hard Rules` 带证据计数**,正向给替代(如「`#FBAE40` 为编辑器参考线色(出现 72 次),非设计色」)。频次原表与 color-confidence 证据进 `ref/`。
68
+ - **排除色进 `## Hard Rules` 带证据计数**,正向给替代(如「`<hex>` 为编辑器参考线色(出现 <N> 次),非设计色」)。频次原表与 color-confidence 证据进 `ref/`。
69
69
  - 排除色断言必须以**解析后频次**为准,`styleRef` 主题兜底引用(不渲染)与真实设计用色分开。
70
70
 
71
71
  ## 2. `assets` 段
@@ -84,7 +84,7 @@ assets:
84
84
  kind: background
85
85
  role: cover # cover | content | section | closing | accent
86
86
  theme: dark
87
- recipe: "linear-gradient(135deg, #0A0E1E 0%, #12204A 100%)" # 可选:CSS 重绘配方
87
+ recipe: "linear-gradient(<angle>, <color> 0%, <color> 100%)" # 可选:CSS 重绘配方
88
88
  bg-content-solid: # 纯色背景:无 path/url,引 colors token
89
89
  kind: background
90
90
  role: content
@@ -123,13 +123,16 @@ layouts:
123
123
  themes: [dark, light] # 深浅孪生合并
124
124
  background: {dark: bg-cover-dark, light: bg-cover-light}
125
125
  slots:
126
- - {role: title, box: [110, 340, 970, 160], type: title}
127
- - {role: logo, box: [120, 121, 235, 74], asset: {dark: logo-on-dark, light: logo-on-light}}
126
+ - {role: title, box: [<x>, <y>, <w>, <h>], type: title}
127
+ - {role: logo, box: [<x>, <y>, <w>, <h>], asset: {dark: logo-on-dark, light: logo-on-light}}
128
+ decor:
129
+ - {box: [<x>, <y>, <w>, <h>], geom: ellipse, css: "<CSS 声明串>"}
128
130
  confidence: high
129
131
  ```
130
132
 
131
133
  - **`background` 三形态**:`<asset-id>` / `{<theme>: <asset-id>}` / `{color: <colors-token>}`(`color` 是保留键,主题名禁止叫 color)。`asset` 两形态:`<asset-id>` / `{<theme>: <asset-id>}`。
132
134
  - **背景安全扩展**:有真实背景图的 archetype 建议写 `text_safe: [x,y,w,h]`、`avoid: [{box: [x,y,w,h], reason: "..."}]`、`pairing_rule: "..."`。这些是消费约束,不参与封闭枚举;用于避免标题、正文、图表、卡片、表格、时间线及其容器外接矩形覆盖背景视觉主体、强光斑或深色透明区;透明容器也不能跨进禁放区。
135
+ - **`decor`(可选)**:这一页无文字的图形骨架——图标托底的圆、卡片、分隔线。每条 `{box, geom, css}`:`box` 定位,`css` 是可直接写进 style 的声明串,`geom` 取源形状的 prst(`ellipse` 另加 `border-radius: 50%`)。层级在背景之上、`slots` 之下;带 `asset` 的槽落在 decor 之上是版式本意,不算重叠。
133
136
  - **`type` 封闭枚举**:`title | subtitle | body | pic | table | chart | media | slide-number | footer`。大数字/序号走 `type: title`,语义由 `role`(如 `big-number`)承担。
134
137
  - **`slots.*.role` 开放不校验**(语义槽位):优先复用已知词表(OOXML ST_SlideLayoutType / Slidev 20 布局 / Google PredefinedLayout,如 big-number、caption、main-point),确无对应再自造。
135
138
  - archetype ≤15(内联降级形态 ≤11);深浅孪生合并为一条;版式溯源/母版取舍进 `ref/`。
@@ -139,8 +142,8 @@ layouts:
139
142
 
140
143
  ```yaml
141
144
  safe-area: # 开放命名 map,可多套边距体系
142
- content: {top: 214, right: 133, bottom: 77, left: 133, applies-to: [content, quote]}
143
- editorial: {left: 120, right: 120, applies-to: [cover, section, closing]}
145
+ content: {top: <px>, right: <px>, bottom: <px>, left: <px>, applies-to: [content, quote]}
146
+ editorial: {left: <px>, right: <px>, applies-to: [cover, section, closing]}
144
147
  confidence: medium
145
148
  ```
146
149