@open-press/cli 0.3.0 → 0.5.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.
- package/dist/cli.js +20 -37
- package/package.json +1 -1
- package/template/core/CHANGELOG.md +43 -0
- package/template/core/engine/cli.mjs +6 -0
- package/template/core/engine/commands/_shared.mjs +9 -2
- package/template/core/engine/commands/deploy.mjs +3 -3
- package/template/core/engine/commands/dev.mjs +25 -2
- package/template/core/engine/commands/doctor.mjs +229 -0
- package/template/core/engine/commands/pdf.mjs +3 -3
- package/template/core/engine/commands/preview.mjs +4 -4
- package/template/core/engine/commands/upgrade.mjs +117 -0
- package/template/core/package.json +3 -1
- package/template/core/vite.config.ts +26 -11
- package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/chapters/03-agent-skills-contributors/content/01-agent-skills-contributors.mdx +2 -3
- package/template/core/.turbo/turbo-test.log +0 -341
- package/template/skills/chinese-ai-writing-polish/SKILL.md +0 -195
- package/template/skills/claude-document/SKILL.md +0 -66
- package/template/skills/editorial-monograph/SKILL.md +0 -73
- package/template/skills/openpress/SKILL.md +0 -114
- package/template/skills/openpress/references/cli-commands.md +0 -31
- package/template/skills/openpress/references/local-review.md +0 -43
- package/template/skills/openpress-deploy/SKILL.md +0 -69
- package/template/skills/openpress-deploy/references/cloudflare-pages.md +0 -51
- package/template/skills/openpress-design/SKILL.md +0 -51
- package/template/skills/openpress-design/references/pdf-safe-css.md +0 -29
- package/template/skills/openpress-design/references/responsive-fixed-layout.md +0 -48
- package/template/skills/openpress-design/references/theme-and-components.md +0 -77
- package/template/skills/openpress-diagram-drawing/SKILL.md +0 -44
- package/template/skills/openpress-diagram-drawing/references/diagram-patterns.md +0 -93
- package/template/skills/openpress-document-hierarchy/SKILL.md +0 -81
- package/template/skills/openpress-document-hierarchy/agents/openai.yaml +0 -4
- package/template/skills/openpress-document-hierarchy/references/data-structures-outline.md +0 -115
- package/template/skills/openpress-init/SKILL.md +0 -84
- package/template/skills/openpress-style-pack-contributor/SKILL.md +0 -62
- package/template/skills/openpress-style-pack-contributor/references/starter-contract.md +0 -49
- package/template/skills/openpress-update/SKILL.md +0 -88
- package/template/skills/openpress-writing/SKILL.md +0 -68
- package/template/skills/openpress-writing/references/source-and-writing-rules.md +0 -120
- package/template/skills/teaching-notes-writing/SKILL.md +0 -54
- package/template/skills/teaching-notes-writing/references/programming.md +0 -65
- package/template/skills/teaching-notes-writing/references/teaching-patterns.md +0 -60
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/chapters/01-document-shape/chapter.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/chapters/01-document-shape/content/01-document-shape.mdx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/chapters/02-review-loop/chapter.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/chapters/02-review-loop/content/01-review-loop.mdx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/components/ChapterOpenerVisual.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/components/Page.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/design.md +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/index.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/media/README.md +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/openpress.config.mjs +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/README.md +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/base/page-contract.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/base/print.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/base/typography.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/fonts.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/page-surfaces/back-cover.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/page-surfaces/chapter-opener.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/page-surfaces/cover.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/page-surfaces/toc.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/patterns/_chart-frame.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/patterns/figure-grid.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/patterns/table-utilities.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/shell/reader-controls.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/tokens.css +0 -0
- /package/template/{skills/claude-document/starter → packs/claude-document}/openpress.config.mjs +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/chapters/01-product-and-use-cases/content/01-product-and-use-cases.mdx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/chapters/02-workflow/content/01-workflow.mdx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/chapters/04-validation-deploy/content/01-validation-deploy.mdx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/ChapterOpenerVisual/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/Page.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/TokenSwatchGrid/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/TokenSwatchGrid/style.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/TypeSpecimen/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/components/TypeSpecimen/style.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/design.md +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/media/README.md +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/openpress.config.mjs +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/README.md +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/base/page-contract.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/base/print.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/base/typography.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/fonts.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/page-surfaces/back-cover.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/page-surfaces/chapter-opener.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/page-surfaces/cover.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/page-surfaces/toc.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/patterns/_chart-frame.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/patterns/figure-grid.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/patterns/table-utilities.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/shell/reader-controls.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/document/theme/tokens.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/editorial-monograph}/openpress.config.mjs +0 -0
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: chinese-ai-writing-polish
|
|
3
|
-
description: Use when producing or editing Traditional Chinese professional content, especially business, product, proposal, report, pitch, website, documentation, or marketing copy that may contain AI-like sentence patterns, empty contrast phrasing, vague transformation slogans, exaggerated claims, or repetitive polished-but-thin language.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 中文 AI 語句避雷 Writing Skill
|
|
7
|
-
|
|
8
|
-
這是一個 **portable writing skill**:可獨立使用,也可由 `openpress-writing` 載入。當輸出語言為繁體中文的專業內容時,本 skill 提供句型、用詞、表格文字、被動句、反向句的判斷規則。
|
|
9
|
-
|
|
10
|
-
## 與其他 Skill 的關係
|
|
11
|
-
|
|
12
|
-
- 在 open-press 文件中,由 `openpress-writing` 在繁體中文內容時載入。
|
|
13
|
-
- 若同時載入多個 portable writing skill(如本 skill + `teaching-notes-writing`),衝突解決依 `openpress-writing` 內的優先順序。
|
|
14
|
-
- 本 skill 不規範 open-press 的 source 路徑、CLI、驗證、輸出、部署或 style pack 套用流程;系統操作一律回到 `openpress` 分流,再由它決定是否交給其他 openpress-* skill。
|
|
15
|
-
|
|
16
|
-
## 目標
|
|
17
|
-
|
|
18
|
-
產出專業、可用、可交付的中文內容。優先保留事實、判斷、對象、行動與結果;避免用看似漂亮但資訊量低的 AI 腔句型填補內容。
|
|
19
|
-
|
|
20
|
-
## 核心原則
|
|
21
|
-
|
|
22
|
-
- 直接說明主張,不用戲劇化轉折包裝薄弱論點。
|
|
23
|
-
- 用具體名詞、動詞、情境與結果取代抽象口號。
|
|
24
|
-
- 每段只承擔一個重點:對象、問題、做法、效果要清楚。
|
|
25
|
-
- 能量化就量化;不能量化就說清楚觀察依據。
|
|
26
|
-
- 避免過度承諾。沒有證據時,不寫「最佳」「顛覆」「重新定義」「革命性」。
|
|
27
|
-
- 寫給讀者要做的決策,不寫給文字本身好看。
|
|
28
|
-
- 反向說法只作為少量 hook 使用;一般段落應直接說產品做了什麼,讓讀者第一秒掌握重點。
|
|
29
|
-
- 表格文字要像表格,不要像段落。欄位名稱已經交代語意時,儲存格避免重複「驗證」「支援」「已完成」「用於」等附帶動詞,優先保留名詞、數據、狀態與結果。
|
|
30
|
-
- 避免同一小節反覆提及相同主詞。段落開頭已建立產品、公司或創辦人時,後續句子可用「產品」「平台」「團隊」「這項規劃」承接,或在語意清楚時省略主詞。
|
|
31
|
-
|
|
32
|
-
## 高風險 AI 腔句型
|
|
33
|
-
|
|
34
|
-
| 避免句型 | 問題 | 改寫方向 |
|
|
35
|
-
| --- | --- | --- |
|
|
36
|
-
| 這不是 A,而是 B | 用對比製造深度,但常沒有新增資訊;若太常使用,讀者第一秒抓不到重點 | 直接說 B 的具體功能、價值或差異;只有在需要與差異很大的系統做對比時,才可作為 hook 使用 |
|
|
37
|
-
| 不只是 A,更是 B | 結構老套,容易把兩個空泛名詞堆在一起 | 拆成「目前能做什麼」與「因此帶來什麼結果」 |
|
|
38
|
-
| 把每一次的 A 都變成 B | 過度願景化,缺少執行機制 | 說明每次 A 發生時,系統或流程實際記錄、判斷、提醒、產出什麼 |
|
|
39
|
-
| 讓 X 不再只是 Y | 轉折感強但資訊密度低 | 直接描述 X 現在新增的能力或使用情境 |
|
|
40
|
-
| 從 A 到 B,全面升級 | 範圍過大,缺少可驗證細節 | 列出升級的項目、使用者感受到的變化、限制條件 |
|
|
41
|
-
| 重新定義 A | 宣稱過大,通常無法證明 | 改成「改善 A 中的某個具體環節」 |
|
|
42
|
-
| 打造一個有溫度的 A | 抽象且常見,難以落地 | 寫出哪個互動、回饋或服務讓使用者感受到差異 |
|
|
43
|
-
| 賦能、賦予、開啟新篇章 | 商業套話,容易顯得空泛 | 改成「支援」「協助」「提供」「降低」「縮短」「提升」 |
|
|
44
|
-
| 在這個快速變動的時代 | 開場空泛,與主題連結弱 | 直接進入讀者面臨的具體問題 |
|
|
45
|
-
| 真正的 A,不是 B,而是 C | 像演講稿金句,不像專業說明 | 改成可被檢驗的判斷或標準 |
|
|
46
|
-
| 每一個 A,都值得被 B | 情緒化且泛用 | 指出哪些 A 需要 B,以及原因 |
|
|
47
|
-
| 透過 A,讓 B 更 C | 過度依賴「透過」「讓」串句 | 改成主詞明確的動作句:「A 會整理 B,並標示 C」 |
|
|
48
|
-
| 讓 X 可以被/能被 Y | 被動句包裝,主詞與責任不清,容易寫成「讓資料能被使用」「讓問題可以被看見」這類空泛句 | 改成主詞明確的主動句:「系統整理 X,供 Y 使用」「教師可用 X 判斷 Y」 |
|
|
49
|
-
| X 可以被/能被 Y | 過度使用被動語態,讀者難以判斷誰執行動作、產出什麼結果 | 改成「誰使用 X 做什麼」或「系統如何處理 X」 |
|
|
50
|
-
|
|
51
|
-
## 改寫方法
|
|
52
|
-
|
|
53
|
-
1. 找出句子的實際意思:這句話到底要說功能、差異、願景、成果,還是情緒?
|
|
54
|
-
2. 刪掉套語骨架:移除「不是...而是...」「不只是...更是...」「把每一次...都變成...」。
|
|
55
|
-
3. 補上具體資訊:誰在什麼情境下,做了什麼,得到什麼結果。
|
|
56
|
-
4. 檢查證據強度:若沒有資料支持,就降低語氣,改成「有助於」「可協助」「目標是」。
|
|
57
|
-
5. 用短句收斂:一句話只放一個主要判斷,避免連續堆疊抽象名詞。
|
|
58
|
-
|
|
59
|
-
## 主詞延續規則
|
|
60
|
-
|
|
61
|
-
中文商業文件不需要每一句都重複產品名或公司名。當小節標題、段落第一句或前一句已經建立主詞,後續句子應自然承接。
|
|
62
|
-
|
|
63
|
-
| 避免寫法 | 問題 | 建議寫法 |
|
|
64
|
-
| --- | --- | --- |
|
|
65
|
-
| `QJudge 目前是一人公司……因此 QJudge 現階段雖然以一人公司形態推進……` | 同一資訊重複兩次,讀者會覺得段落在原地打轉 | 第一段交代現況,後段改寫為「現階段雖然團隊規模小,但產品不是孤立開發。」 |
|
|
66
|
-
| `QJudge 的組織化不會……QJudge 會……QJudge 需要……` | 產品名過度重複,語氣僵硬 | `組織化不會……後續會……下一階段需要……` |
|
|
67
|
-
| `本產品支援……本產品提供……本產品能夠……` | 每句都重啟主詞,段落節奏笨重 | 第一處保留產品名,後續用「系統」「平台」「功能」或直接接動作 |
|
|
68
|
-
|
|
69
|
-
判斷標準:
|
|
70
|
-
|
|
71
|
-
- 同一段出現同一產品名超過 2 次,先檢查是否可省略或替換。
|
|
72
|
-
- 若前一句已明確說明主詞,下一句不要再用相同名詞開頭。
|
|
73
|
-
- 主詞替換應服務清楚度,不要為了變化而使用模糊代稱;讀者會誤解時才保留完整主詞。
|
|
74
|
-
- 結論句可回到產品名,但不應重複前文已講過的狀態或背景。
|
|
75
|
-
|
|
76
|
-
## 表格文字規則
|
|
77
|
-
|
|
78
|
-
表格的欄位名稱已經提供上下文,儲存格應減少完整句與重複動詞,讓讀者快速掃描。
|
|
79
|
-
|
|
80
|
-
| 避免寫法 | 問題 | 建議寫法 |
|
|
81
|
-
| --- | --- | --- |
|
|
82
|
-
| 規模:`60 人受測` | 欄位已寫「規模」,`受測` 多餘 | `60 人` |
|
|
83
|
-
| 已驗證能力:`驗證程式上機等特殊題型也能在線上完成作答與監考` | 欄位已寫「已驗證能力」,開頭再寫「驗證」重複 | `程式上機等特殊題型可在線上完成作答與監考` |
|
|
84
|
-
| 平台開發狀態:`已支援正式課程建立考試` | 狀態欄已有「已上線」,備註再寫「已支援」冗餘 | `正式課程考試建立;多題型作答介面` |
|
|
85
|
-
| 備註:`可用於考前到場簽到、身分確認與考生狀態整理` | `可用於` 不增加資訊 | `考前到場簽到、身分確認與考生狀態整理` |
|
|
86
|
-
|
|
87
|
-
判斷標準:
|
|
88
|
-
|
|
89
|
-
- 欄位叫「規模」時,儲存格只放數字與單位。
|
|
90
|
-
- 欄位叫「狀態」時,儲存格只放狀態,不再補「目前」「已經」。
|
|
91
|
-
- 欄位叫「能力」「功能」「備註」時,儲存格用名詞片語或短句,不用完整說明段。
|
|
92
|
-
- 同一列若需要補充因果或限制,移到表格前後段落,不塞進儲存格。
|
|
93
|
-
|
|
94
|
-
## 反向說法使用邊界
|
|
95
|
-
|
|
96
|
-
「不是 A,而是 B」「不只是 A,更是 B」這類反向句,不應作為常規說明段落的開頭。它會先要求讀者理解一個被否定的對象,再等待真正主張出現,容易讓評審或讀者第一秒抓不到重點。
|
|
97
|
-
|
|
98
|
-
可使用的情境:
|
|
99
|
-
|
|
100
|
-
- **對比差異很大的系統**:例如需要說明 QJudge 與 LMS、Google Forms、一般題庫或 OJ 平台的根本差異。
|
|
101
|
-
- **段落 hook**:用一句話打開對比,但下一句必須立刻接具體差異,例如功能、流程、資料、責任邊界或使用者行為。
|
|
102
|
-
- **避免連續使用**:同一章節若已用過一次反向句,後續段落應改用正向敘述。
|
|
103
|
-
|
|
104
|
-
不建議的情境:
|
|
105
|
-
|
|
106
|
-
- **說明產品功能時**:直接寫系統要求使用者做什麼、系統記錄什麼、產出什麼結果。
|
|
107
|
-
- **說明願景時**:直接寫未來要支援的題型、資料流或評量方式,不要用金句包裝。
|
|
108
|
-
- **說明價值時**:直接寫降低多少人力、縮短哪個流程、保留哪些紀錄。
|
|
109
|
-
|
|
110
|
-
判斷標準:如果刪掉「不是 A」後,句子仍然能直接說清楚 B 的功能或價值,就應該刪掉反向開頭。
|
|
111
|
-
|
|
112
|
-
## 改寫範例
|
|
113
|
-
|
|
114
|
-
### 例 1:產品定位
|
|
115
|
-
|
|
116
|
-
避免:
|
|
117
|
-
|
|
118
|
-
> 這不是一個解題平台,而是一個陪伴學生持續成長的學習夥伴。
|
|
119
|
-
|
|
120
|
-
建議:
|
|
121
|
-
|
|
122
|
-
> QJudge 會記錄學生的提交紀錄、錯誤類型與修正歷程,讓學生回看自己的卡點,也讓教師掌握班級常見問題。
|
|
123
|
-
|
|
124
|
-
### 例 2:學習歷程
|
|
125
|
-
|
|
126
|
-
避免:
|
|
127
|
-
|
|
128
|
-
> 把每一次練習都變成成長的契機。
|
|
129
|
-
|
|
130
|
-
建議:
|
|
131
|
-
|
|
132
|
-
> 每次練習後,系統會保留題目、提交結果、錯誤訊息與修改紀錄,方便學生比較前後版本並整理弱點。
|
|
133
|
-
|
|
134
|
-
### 例 3:商業提案
|
|
135
|
-
|
|
136
|
-
避免:
|
|
137
|
-
|
|
138
|
-
> 我們不只是提供工具,更是協助教育現場重新定義程式學習。
|
|
139
|
-
|
|
140
|
-
建議:
|
|
141
|
-
|
|
142
|
-
> 我們提供自動批改、作業派發、學習紀錄與班級分析,協助教師減少批改時間,並更早發現學生的共同錯誤。
|
|
143
|
-
|
|
144
|
-
### 例 4:網站文案
|
|
145
|
-
|
|
146
|
-
避免:
|
|
147
|
-
|
|
148
|
-
> 在 AI 快速發展的時代,打造更智慧、更有溫度的學習體驗。
|
|
149
|
-
|
|
150
|
-
建議:
|
|
151
|
-
|
|
152
|
-
> 學生提交程式後,系統會即時回傳測資結果與錯誤提示;教師可在後台查看完成率、錯誤分布與個別進度。
|
|
153
|
-
|
|
154
|
-
## 可用句型
|
|
155
|
-
|
|
156
|
-
- `X 是給 [使用者] 在 [情境] 中完成 [任務] 的 [產品類型]。`
|
|
157
|
-
- `[功能] 會在 [觸發時機] 自動 [動作],供 [使用者] [具體行動]。`
|
|
158
|
-
- `相較於 [既有做法],[方案] 減少了 [成本或阻力],並保留 [必要能力]。`
|
|
159
|
-
- `這項設計解決的是 [具體問題],不是泛稱的 [抽象願景]。`
|
|
160
|
-
- `目前版本支援 [能力 A]、[能力 B]、[能力 C];尚未涵蓋 [限制]。`
|
|
161
|
-
- `若目標是 [決策或成果],建議優先呈現 [證據或指標]。`
|
|
162
|
-
|
|
163
|
-
## 用字偏好
|
|
164
|
-
|
|
165
|
-
- 優先使用:支援、協助、提供、記錄、整理、比對、標示、提醒、降低、縮短、提升、追蹤、檢視。
|
|
166
|
-
- 謹慎使用:打造、賦能、顛覆、革新、重新定義、全方位、沉浸式、無縫、前所未有、有溫度。
|
|
167
|
-
- 避免連續使用抽象名詞:體驗、價值、願景、場景、生態系、解決方案、影響力。
|
|
168
|
-
- 專業內容應使用繁體中文與台灣常用語感;避免不必要的簡體詞與翻譯腔。
|
|
169
|
-
|
|
170
|
-
## 英文技術術語處理
|
|
171
|
-
|
|
172
|
-
不要為了「全中文」而強硬翻譯英文技術術語。判斷標準:
|
|
173
|
-
|
|
174
|
-
| 情境 | 處理方式 |
|
|
175
|
-
| --- | --- |
|
|
176
|
-
| 業界已普及、讀者一看就懂的英文詞 | 直接保留英文,例如 `edge case`、`spec`、`rubric`、`pipeline`、`SOP`、`KPI`、`API`、`OAuth` |
|
|
177
|
-
| 存在更精準、不引起誤會的中文說法 | 用中文,例如「鑑別度」「採購週期」「監考流程」 |
|
|
178
|
-
| 直譯結果晦澀或失準 | 用英文,或改寫情境描述(例:`edge case` 不要硬翻成「邊角案例」,可寫「教學現場的例外事件」或「平常想不到的特殊情境」) |
|
|
179
|
-
| 同一份文件中已先出現英文原詞 | 後續沿用英文,不要混用兩種譯名 |
|
|
180
|
-
|
|
181
|
-
判斷時優先看「讀者第一秒抓到意思」與「精準度」,而不是「中英文比例」。專業讀者(評審、業界)對常見英文術語的辨識度通常高於彆扭的直譯。
|
|
182
|
-
|
|
183
|
-
## 交付前檢查
|
|
184
|
-
|
|
185
|
-
- 是否出現「這不是...而是...」「不只是...更是...」「把每一次...都變成...」或其變體?
|
|
186
|
-
- 是否出現「讓 X 可以被/能被 Y」「X 可以被/能被 Y」「資料被使用」這類被動包裝句?
|
|
187
|
-
- 若使用反向說法,是否是為了和差異很大的系統做對比?下一句是否立刻接具體差異?
|
|
188
|
-
- 每段是否至少有一個明確主詞與一個具體動作?
|
|
189
|
-
- 形容詞是否能被證據支持?不能支持就刪掉或降級。
|
|
190
|
-
- 是否用功能、流程、數據、限制取代口號?
|
|
191
|
-
- 讀者看完是否知道下一步可以判斷、操作或相信什麼?
|
|
192
|
-
|
|
193
|
-
## 使用規則
|
|
194
|
-
|
|
195
|
-
當輸出中文內容時,先以本 Skill 掃描草稿。若草稿含有高風險 AI 腔句型,必須改寫為具體、可驗證、可交付的版本;除非使用者明確要求保留宣傳式、演講式或高度修辭化的語氣。
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claude-document
|
|
3
|
-
description: Use when starting or applying a warm Claude-like A4 document style pack for polished notes, briefs, specs, research summaries, learning material, or structured working documents.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Claude Document
|
|
7
|
-
|
|
8
|
-
An open-press style pack for Claude-like working documents: warm paper, generous fixed pages, deep blue-gray headings, serif display titles, structured tables, concise figures, and calm editorial rhythm.
|
|
9
|
-
|
|
10
|
-
This is a **local style pack**. It is not an Anthropic brand package and should not imply official Claude or Anthropic affiliation.
|
|
11
|
-
|
|
12
|
-
## Visual Signature
|
|
13
|
-
|
|
14
|
-
- **Surface**: A4 fixed pages with a warm paper texture and subtle vertical rhythm.
|
|
15
|
-
- **Type**: serif display headings, sans body text, monospace code.
|
|
16
|
-
- **Color**: deep blue-gray ink, muted blue labels, warm hairlines, restrained block backgrounds.
|
|
17
|
-
- **Content components**: tables, figure captions, code blocks when needed, optional full-page chapter openers.
|
|
18
|
-
- **Pagination**: fixed page ratio; overflow is a content/component problem, not a reason to let pages grow.
|
|
19
|
-
|
|
20
|
-
## Suitable For
|
|
21
|
-
|
|
22
|
-
- polished working notes;
|
|
23
|
-
- product briefs, specs, and research summaries;
|
|
24
|
-
- learning material and internal documentation;
|
|
25
|
-
- public documents that need a calm, Claude-like editorial surface.
|
|
26
|
-
|
|
27
|
-
## Not Suitable For
|
|
28
|
-
|
|
29
|
-
- marketing landing pages;
|
|
30
|
-
- slide decks or 16:9 talks without changing page geometry tokens;
|
|
31
|
-
- dashboards or interactive app documentation.
|
|
32
|
-
|
|
33
|
-
## Related Packs
|
|
34
|
-
|
|
35
|
-
- `editorial-monograph` — hairline-driven, more formal long-form (whitepapers, monographs, academic-leaning). Choose it when the document is heavier and needs IBM-Carbon-style restraint instead of warm Claude tone.
|
|
36
|
-
|
|
37
|
-
## Apply To A Workspace
|
|
38
|
-
|
|
39
|
-
Use `openpress` to initialize a workspace with pack name `claude-document`. This skill only defines the pack's visual scope and starter content; `openpress` owns the command surface and validation workflow.
|
|
40
|
-
|
|
41
|
-
After applying, use `openpress` for source-boundary and command decisions. Typical editable source areas are:
|
|
42
|
-
|
|
43
|
-
- `document/index.tsx` — cover, TOC shell, back cover, metadata;
|
|
44
|
-
- `document/chapters/**/*.mdx` — content;
|
|
45
|
-
- `document/theme/tokens.css` — color, typography, spacing, page geometry;
|
|
46
|
-
- `document/design.md` — public style contract that future agents follow.
|
|
47
|
-
|
|
48
|
-
Content rules (table captions, figure numbering, etc.) live in `openpress-writing`; this skill does not redefine them.
|
|
49
|
-
|
|
50
|
-
## Do / Don't
|
|
51
|
-
|
|
52
|
-
Do:
|
|
53
|
-
|
|
54
|
-
- Keep figures focused on one concept, decision, or relationship.
|
|
55
|
-
- Prefer semantic figures, tables, and concise prose over decorative blocks.
|
|
56
|
-
- Keep chapter openers optional and use them only when major sections benefit from a book-like divider.
|
|
57
|
-
|
|
58
|
-
Don't:
|
|
59
|
-
|
|
60
|
-
- Put private names, customer data, deployment secrets, or project-specific author data in the starter.
|
|
61
|
-
- Shrink text below readable print size to hide overflow.
|
|
62
|
-
- Add large decorative gradients, dark sci-fi backgrounds, or brand-heavy visual noise.
|
|
63
|
-
|
|
64
|
-
## Deep Rules
|
|
65
|
-
|
|
66
|
-
The detailed rules live in `starter/document/design.md`. Once the pack is copied into a workspace, that file becomes the project-level design contract for both users and agents.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: editorial-monograph
|
|
3
|
-
description: Use when starting or applying a quiet, hairline-driven A4 editorial style pack for long-form monographs, reports, proposals, whitepapers, product specs, or academic documents.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Editorial Monograph
|
|
7
|
-
|
|
8
|
-
A document style for **嚴肅長文**——日系簡約 + IBM Carbon hairline 風格的衍生,適合產品提案書、白皮書、研究報告、規格文件等需要 A4 印製、章節結構清楚、長段閱讀的場合。
|
|
9
|
-
|
|
10
|
-
This is a **style-pack skill**: it ships SKILL rules plus a runnable `starter/` document workspace (React/MDX entry, theme, design doc, sample chapters). Use `openpress` to initialize a workspace with pack name `editorial-monograph`; this skill does not own the command surface.
|
|
11
|
-
|
|
12
|
-
## Visual Signature
|
|
13
|
-
|
|
14
|
-
- **Type**: serif 章首(Noto Serif TC / Source Han Serif TC)+ sans body(IBM Plex Sans / PingFang TC)
|
|
15
|
-
- **Lines**: 1px hairline + dotted underline for links;不用 box-shadow / gradient
|
|
16
|
-
- **Color**: 黑白灰主體 + 三色 status accent(warn / success / info)+ chart palette(gold / coral / dark)
|
|
17
|
-
- **Layout**: A4 固定版面、章首占整頁、TOC 帶頁碼但不顯示 footer、可選章節 mini cover、figure / table 自動編號
|
|
18
|
-
- **Chapter numbering**: default `01 / 02 / 2.1`(pagination + CSS `::before`);可改 `一、二、(一)` 或 `Chapter 1 / §1.1`,token 與 selector 在 starter 內 `theme/base/typography.css` 與 `design.md` 的 Typography Scale / Chapter & Section Numbering 段
|
|
19
|
-
|
|
20
|
-
## Suitable For
|
|
21
|
-
|
|
22
|
-
- product proposal / business plan
|
|
23
|
-
- whitepaper / spec / requirements doc
|
|
24
|
-
- academic monograph / long-form research report
|
|
25
|
-
- editorial-format business report
|
|
26
|
-
|
|
27
|
-
## Not Suitable For
|
|
28
|
-
|
|
29
|
-
- slide deck(請改 page-geometry tokens 至 16:9 或另用 deck-oriented style pack)
|
|
30
|
-
- poster / one-pager
|
|
31
|
-
- marketing landing page
|
|
32
|
-
|
|
33
|
-
## Related Packs
|
|
34
|
-
|
|
35
|
-
- `claude-document` — warmer paper, Claude-like rhythm. Choose it when the document is closer to a working brief / spec / note than a formal monograph.
|
|
36
|
-
|
|
37
|
-
## Apply To A Workspace
|
|
38
|
-
|
|
39
|
-
Use `openpress` to initialize a target workspace with this pack. Then:
|
|
40
|
-
|
|
41
|
-
1. Fill `title` / `subtitle` / `organization` in `openpress.config.mjs` and `document/index.tsx`.
|
|
42
|
-
2. Ask `openpress` to choose the validation/export/render commands needed to confirm the workspace is healthy.
|
|
43
|
-
3. Use `openpress` for the source-boundary decision; typical editable source areas are `document/chapters/**/*.mdx` for content, `document/index.tsx` for cover/TOC/back-cover, and `document/theme/tokens.css` for visual tokens.
|
|
44
|
-
|
|
45
|
-
Content rules (table captions, figure numbering, etc.) live in `openpress-writing`; this skill does not redefine them.
|
|
46
|
-
|
|
47
|
-
## Do / Don't
|
|
48
|
-
|
|
49
|
-
**Do:**
|
|
50
|
-
|
|
51
|
-
- 換 brand color:改 `tokens.css` 內 `--openpress-chart-gold` 或新增 `--openpress-brand-accent`
|
|
52
|
-
- 換字體:改 `--openpress-font-serif` / `--openpress-font-body` 的字體棧;需要跨 mobile / iPad 穩定時,同步更新 `theme/fonts.css` 載入 webfont,不要只靠 `local(...)`
|
|
53
|
-
- 加新 page kind(divider / appendix-cover):在 `theme/page-surfaces/` 新增 CSS;已有 `chapter-opener` 可作書籍/教材章節 mini cover
|
|
54
|
-
- 換編號樣式(一、二、 or §1.1):改 `theme/base/typography.css` 的 `::before content`,搭 `@counter-style`
|
|
55
|
-
- 改 page 尺寸(B5 / Letter / 投影片):改 `tokens.css` 的 `--openpress-page-width` / `--openpress-page-height` / `--openpress-page-margin`
|
|
56
|
-
|
|
57
|
-
**Don't:**
|
|
58
|
-
|
|
59
|
-
- 不要把 inline emphasis color 改成自由色票(破壞語意系統);新狀態色票要先補 `--openpress-status-*` token 再用
|
|
60
|
-
- 不要在 `theme/base/typography.css` 內放單一 chart / specimen 的 CSS(那是 `document/components/<name>/` 的責任)
|
|
61
|
-
- 不要為了 dense 內容把字級縮太小;A4 body 正文不應低於 9.5pt
|
|
62
|
-
- 不要把 hairline 改成 2px 以上實線;style pack 的氣質就靠線細
|
|
63
|
-
|
|
64
|
-
## 深入設計規則
|
|
65
|
-
|
|
66
|
-
editorial-monograph 不單獨維護一份 reference/ 文件——所有規格都寫在 `starter/document/design.md` 內,跟著 starter 一起拷貝到 workspace 後變成該專案的 design document:
|
|
67
|
-
|
|
68
|
-
- 第 1 節 風格目標與使用場景 — 目標 / 適用場景 / 角色定義
|
|
69
|
-
- 第 2 節 Tokens — typography / color / spacing / page geometry / inline emphasis / chapter & section numbering
|
|
70
|
-
- 第 3 節 Components — page surfaces / text components / tables / figures / charts
|
|
71
|
-
- 第 4 節 CSS 權責
|
|
72
|
-
|
|
73
|
-
Agent 套用 skill 後,這份檔案就成為該專案 `document/design.md` 的內容;之後 user 想客製,直接改 design.md,不用回頭改 skill。
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openpress
|
|
3
|
-
description: Use when operating a open-press workspace or framework checkout through CLI commands, discovering project status, validating/exporting/rendering/PDF output, inspecting structure/issues, searching or safely replacing source text, managing pending @openpress-comment markers, or deciding which open-press skill owns a task.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# open-press Core
|
|
7
|
-
|
|
8
|
-
open-press owns the tool surface and delivery boundaries. **Use this skill first** when the task involves the CLI, workspace status, generated output, or deciding which specialist skill should take over.
|
|
9
|
-
|
|
10
|
-
This skill is also the **single source of truth** for the source vs generated boundary. Other skills reference this section instead of re-listing paths.
|
|
11
|
-
|
|
12
|
-
## Responsibilities
|
|
13
|
-
|
|
14
|
-
- Choose safe open-press CLI commands.
|
|
15
|
-
- Define the canonical source vs framework vs generated path boundary (see below).
|
|
16
|
-
- Inspect workspace state before broad edits.
|
|
17
|
-
- Open and manage the local workbench review loop.
|
|
18
|
-
- Manage `@openpress-comment` markers (list, apply, resolve, clear).
|
|
19
|
-
- Route domain work to the owning skill.
|
|
20
|
-
- Require verification before declaring output ready.
|
|
21
|
-
|
|
22
|
-
## Skill Routing
|
|
23
|
-
|
|
24
|
-
open-press skills fall into three categories:
|
|
25
|
-
|
|
26
|
-
1. **System operation skills**: how to operate open-press itself. `openpress` is the main entry point; lifecycle helpers cover init, update, and deploy.
|
|
27
|
-
2. **Writing skills**: content strategy, suggested skeletons, language, tone, genre rules. They do not own CLI commands or validation depth.
|
|
28
|
-
3. **Style pack skills**: reusable visual starters under `skills/<pack>/starter/`. They do not own workspace operation.
|
|
29
|
-
|
|
30
|
-
| Skill | Owns |
|
|
31
|
-
| --- | --- |
|
|
32
|
-
| `openpress` | CLI, inspect/search/replace, source/generated boundary, validation/export/render/PDF command choice, `@openpress-comment` operations, skill routing |
|
|
33
|
-
| `openpress-init` | First-time intake conversation, style-pack recommendation, metadata gathering, running `init`, handing off to writing/design |
|
|
34
|
-
| `openpress-update` | Release upgrade flow: pulling new framework, CHANGELOG-driven migrations, post-upgrade verification |
|
|
35
|
-
| `openpress-writing` | Reader-facing content, narrative, captions, factual boundaries, portable writing skill loading |
|
|
36
|
-
| `openpress-document-hierarchy` | H1/H2/H3/H4 model, TOC depth, reader outline, appendix placement |
|
|
37
|
-
| `openpress-design` | Workspace visual system: `document/theme/`, `document/components/`, PDF-safe layout |
|
|
38
|
-
| `openpress-diagram-drawing` | Diagram semantics: nodes, arrows, labels, states, figure text |
|
|
39
|
-
| `openpress-deploy` | Deploy config, preflight, dry run, public publish confirmation |
|
|
40
|
-
| `openpress-style-pack-contributor` | Bundled packs under `skills/<pack>/starter/` (the upstream design, not workspace consumption) |
|
|
41
|
-
| Portable writing skills (`chinese-ai-writing-polish`, `teaching-notes-writing`, …) | Language, tone, genre, learner-facing rules. Loaded via `openpress-writing` |
|
|
42
|
-
|
|
43
|
-
## Source Boundary (canonical)
|
|
44
|
-
|
|
45
|
-
Edit source, not generated output. **This list is the single authoritative version**; other skills link here.
|
|
46
|
-
|
|
47
|
-
| Layer | Paths | Edit? |
|
|
48
|
-
| --- | --- | --- |
|
|
49
|
-
| Workspace source | `openpress.config.mjs`, `document/index.tsx`, `document/chapters/`, `document/design.md`, `document/theme/`, `document/components/`, `document/media/` | yes — domain skills |
|
|
50
|
-
| Skill / pack source | `skills/<pack>/SKILL.md`, `skills/<pack>/starter/**`, other skill files under `skills/` | yes — `openpress-style-pack-contributor` for packs; skill maintainers for own skill |
|
|
51
|
-
| Framework | `engine/`, `src/`, `tests/`, `docs/superpowers/`, `vite.config.ts`, `tsconfig.json`, `index.html` | yes — framework agents only |
|
|
52
|
-
| Generated | `public/openpress/`, `dist-react/`, `.deploy/`, `.openpress/` | **never hand-edit** |
|
|
53
|
-
|
|
54
|
-
If a workspace lacks `document/index.tsx`, run `node engine/cli.mjs migrate-to-react` before broad structural rewrites.
|
|
55
|
-
|
|
56
|
-
If `memory/AGENTS.md` exists, read it before framework-level `AGENTS.md`; it usually marks a downstream document workspace where `document/` is git-ignored project content, not source you commit upstream.
|
|
57
|
-
|
|
58
|
-
## Workflow
|
|
59
|
-
|
|
60
|
-
1. Orient: read `AGENTS.md`, `memory/AGENTS.md` if present, and the relevant specialist skill.
|
|
61
|
-
2. Inspect before broad edits with `inspect --json`, `search --json`, or `rg`.
|
|
62
|
-
3. Route domain work to the owning skill instead of duplicating its rules.
|
|
63
|
-
4. Edit only source paths in the owning area (see boundary table).
|
|
64
|
-
5. Verify with the narrowest command that proves the claim.
|
|
65
|
-
|
|
66
|
-
## Starting A New Workspace
|
|
67
|
-
|
|
68
|
-
Route to `openpress-init` for the intake conversation. The CLI itself is:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
node engine/cli.mjs init <target> --skill <pack-name>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Style packs are auto-discovered from `skills/<pack>/SKILL.md` where `starter/` exists.
|
|
75
|
-
|
|
76
|
-
## Updating An Existing Workspace
|
|
77
|
-
|
|
78
|
-
Route to `openpress-update` for release-driven upgrades.
|
|
79
|
-
|
|
80
|
-
## @openpress-comment Operations
|
|
81
|
-
|
|
82
|
-
Pending `@openpress-comment` markers are source markers, not UI-only notes. Apply them as small source edits close to the marker, then remove the marker only after the comment is resolved or explicitly cleared.
|
|
83
|
-
|
|
84
|
-
Scope:
|
|
85
|
-
|
|
86
|
-
- List, apply, resolve, clear markers.
|
|
87
|
-
- Edit only the source file containing the marker (paths follow the Source Boundary table above).
|
|
88
|
-
- Route domain-heavy rewrites to the owning skill (writing / hierarchy / design / diagram).
|
|
89
|
-
- Do not rewrite unrelated sections while resolving one comment.
|
|
90
|
-
|
|
91
|
-
Operations:
|
|
92
|
-
|
|
93
|
-
| Need | Action |
|
|
94
|
-
| --- | --- |
|
|
95
|
-
| See pending comments | `rg "@openpress-comment" document -n` |
|
|
96
|
-
| Apply one comment | Edit nearby source, then delete that marker line |
|
|
97
|
-
| Clear one without applying | Delete that marker line only after the user asks |
|
|
98
|
-
| Clear all comments | Use the comments tab or delete all marker lines only after explicit confirmation |
|
|
99
|
-
| Comment is ambiguous | Ask for clarification and leave the marker in place |
|
|
100
|
-
|
|
101
|
-
After applying, run `npm run openpress:validate`; also run `npm run openpress:render` when layout, visual output, or React/MDX structure changed.
|
|
102
|
-
|
|
103
|
-
Common mistakes: do not clear a marker just because it was read; do not batch unrelated rewrites under one comment.
|
|
104
|
-
|
|
105
|
-
## When To Read References
|
|
106
|
-
|
|
107
|
-
- Read `references/cli-commands.md` when choosing commands, using search/replace, or explaining verification depth.
|
|
108
|
-
- Read `references/local-review.md` when opening the workbench, using Document/Design System/Project views, or coordinating visual review before export/deploy.
|
|
109
|
-
|
|
110
|
-
## Safety Rules
|
|
111
|
-
|
|
112
|
-
- Preview broad replacements before applying them.
|
|
113
|
-
- Do not publish without explicit user confirmation naming the target (handled by `openpress-deploy`).
|
|
114
|
-
- Do not claim render, PDF, or deploy readiness without fresh command output.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# open-press CLI Commands
|
|
2
|
-
|
|
3
|
-
Prefer package scripts in the framework checkout. Use direct `node engine/cli.mjs ...` when a downstream workspace lacks scripts or when a command has no script wrapper.
|
|
4
|
-
|
|
5
|
-
| Need | Command |
|
|
6
|
-
| --- | --- |
|
|
7
|
-
| Top-level usage | `node engine/cli.mjs --help` |
|
|
8
|
-
| Migrate legacy Markdown workspace to React/MDX | `node engine/cli.mjs migrate-to-react . --dry-run` |
|
|
9
|
-
| Validate structure and delivery gates | `npm run openpress:validate` |
|
|
10
|
-
| Export source to open-press JSON | `npm run openpress:export` |
|
|
11
|
-
| Build React reader | `npm run openpress:render` |
|
|
12
|
-
| Open local workbench | `npm run dev` |
|
|
13
|
-
| Preview production build | `npm run openpress:preview` |
|
|
14
|
-
| Generate PDF | `npm run openpress:pdf` |
|
|
15
|
-
| Inspect structure/issues as JSON | `node engine/cli.mjs inspect . --json` |
|
|
16
|
-
| Search public source text | `node engine/cli.mjs search . "<query>" --json` |
|
|
17
|
-
| Search all workspace source classes | `node engine/cli.mjs search . "<query>" --json --scope all` |
|
|
18
|
-
| List pending inspector comments | `rg "@openpress-comment" document -n` |
|
|
19
|
-
| Preview replacement without writing | `node engine/cli.mjs replace . "<from>" "<to>" --json` |
|
|
20
|
-
| Apply replacement after preview | `node engine/cli.mjs replace . "<from>" "<to>" --apply` |
|
|
21
|
-
| Dry-run deploy workflow | `npm run openpress:deploy:dry-run` |
|
|
22
|
-
| Publish after confirmation | use `openpress-deploy` |
|
|
23
|
-
|
|
24
|
-
Command notes:
|
|
25
|
-
|
|
26
|
-
- `search` and `replace` default to `--scope content`.
|
|
27
|
-
- Add `--scope all` to also include `document/design.md`, component, media, and theme source.
|
|
28
|
-
- Add `--case-sensitive` only when casing matters.
|
|
29
|
-
- `replace` previews by default and writes only with `--apply`.
|
|
30
|
-
- `replace` does not touch code blocks unless `--include-code` is provided.
|
|
31
|
-
- Per-command `--help` is not implemented yet; use top-level usage and command error messages.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Local Review
|
|
2
|
-
|
|
3
|
-
open-press local review is the human feedback loop before PDF or public deploy.
|
|
4
|
-
|
|
5
|
-
## Workflow
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm run openpress:export
|
|
9
|
-
npm run dev
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Use the URL printed by Vite. It is usually:
|
|
13
|
-
|
|
14
|
-
```txt
|
|
15
|
-
http://127.0.0.1:5173/?dev=1
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
If `5173` is occupied, use the fallback port reported by the dev server.
|
|
19
|
-
|
|
20
|
-
## Workbench Views
|
|
21
|
-
|
|
22
|
-
- **Document**: reader-facing document.
|
|
23
|
-
- **Design System**: visual rules and specimens.
|
|
24
|
-
- **Project**: source inventory, components, media, and status.
|
|
25
|
-
|
|
26
|
-
After source edits:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm run openpress:export
|
|
30
|
-
npm run openpress:validate
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
For renderer-sensitive visual, bookmark, or layout changes, also run:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm run openpress:render
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Safety Rules
|
|
40
|
-
|
|
41
|
-
- A local preview is not deploy approval.
|
|
42
|
-
- Do not hand-edit generated output to fix preview issues.
|
|
43
|
-
- If preview is blank or stale, inspect export status, dev server output, and browser console before changing source content.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openpress-deploy
|
|
3
|
-
description: Use when preparing, configuring, checking, staging, or publishing a open-press document to public hosting, especially Cloudflare Pages, deploy setup, deploy buttons, deploy status, public release checks, or safe deployment workflow.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# open-press Deploy
|
|
7
|
-
|
|
8
|
-
open-press deploy owns the public-release gate. Use it only when the user asks to configure, inspect, dry-run, or publish a open-press document.
|
|
9
|
-
|
|
10
|
-
## Responsibilities
|
|
11
|
-
|
|
12
|
-
- Inspect deploy config in `openpress.config.mjs`.
|
|
13
|
-
- Check target adapter, staging source, project name, and confirmation settings.
|
|
14
|
-
- Run deploy preflight and dry runs.
|
|
15
|
-
- Keep secrets out of source files.
|
|
16
|
-
- Require explicit confirmation before publishing.
|
|
17
|
-
- Report public URL and PDF URL after successful deploy.
|
|
18
|
-
|
|
19
|
-
## Boundaries
|
|
20
|
-
|
|
21
|
-
- `openpress` owns generic CLI usage, non-deploy validation, local review, and the source/generated boundary.
|
|
22
|
-
- `openpress-writing` and `openpress-design` own document content and visual readiness.
|
|
23
|
-
- This skill owns public target confirmation and deploy execution.
|
|
24
|
-
|
|
25
|
-
## Public Deploy Rule
|
|
26
|
-
|
|
27
|
-
Never publish without a clear confirmation that names the target project.
|
|
28
|
-
|
|
29
|
-
Good confirmation shape:
|
|
30
|
-
|
|
31
|
-
```txt
|
|
32
|
-
This will publish the current open-press build to Cloudflare Pages project `<projectName>` from `<deploy.source>`.
|
|
33
|
-
Do you want me to deploy now?
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Preflight
|
|
37
|
-
|
|
38
|
-
Before real deploy, run the commands that prove the output is ready:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm run openpress:export
|
|
42
|
-
npm run openpress:validate
|
|
43
|
-
npm run openpress:render
|
|
44
|
-
npm run openpress:pdf
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Also scan public-facing source for unfinished markers:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
rg "\\[TODO:|\\[FIX:|\\[DRAFT:" document/chapters document/design.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Deploy Commands
|
|
54
|
-
|
|
55
|
-
Dry run:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm run openpress:deploy:dry-run
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Publish after explicit confirmation:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npm run openpress:deploy -- --confirm
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## When To Read References
|
|
68
|
-
|
|
69
|
-
- Read `references/cloudflare-pages.md` when creating or repairing Cloudflare Pages config, project setup, Wrangler auth expectations, or UI deploy-button behavior.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Cloudflare Pages Deploy
|
|
2
|
-
|
|
3
|
-
## Config Shape
|
|
4
|
-
|
|
5
|
-
Write confirmed deploy settings into `openpress.config.mjs`:
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
deploy: {
|
|
9
|
-
adapter: "cloudflare-pages",
|
|
10
|
-
source: ".deploy/<name>",
|
|
11
|
-
projectName: "<cloudflare-pages-project>",
|
|
12
|
-
commitDirty: false,
|
|
13
|
-
requiresConfirmation: true,
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Prefer an explicit `deploy.projectName`. If it is missing, ask the user to confirm the project name before writing config or creating a Cloudflare Pages project.
|
|
18
|
-
|
|
19
|
-
## Setup Workflow
|
|
20
|
-
|
|
21
|
-
1. Discover the workspace and load open-press config.
|
|
22
|
-
2. Confirm the document is intended for public hosting.
|
|
23
|
-
3. Inspect deploy config and derive the target:
|
|
24
|
-
- use explicit `deploy.projectName`;
|
|
25
|
-
- otherwise use a user-confirmed slug;
|
|
26
|
-
- do not invent and write a public target silently.
|
|
27
|
-
4. Ask whether to create a new Cloudflare Pages project or use an existing one.
|
|
28
|
-
5. Verify Wrangler auth outside source control.
|
|
29
|
-
6. Run dry run before real deploy.
|
|
30
|
-
|
|
31
|
-
If creating a new project, ask before running:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npx wrangler pages project create <projectName> --production-branch main
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Secrets
|
|
38
|
-
|
|
39
|
-
Do not write API tokens or secrets into open-press config, Markdown, `design.md`, or skill files.
|
|
40
|
-
|
|
41
|
-
## UI Deploy Button Contract
|
|
42
|
-
|
|
43
|
-
A UI deploy button is a review surface over the CLI workflow. It should:
|
|
44
|
-
|
|
45
|
-
- show target, source, and status before publishing;
|
|
46
|
-
- block when `deploy.projectName` is missing;
|
|
47
|
-
- require confirmation before posting to the deploy endpoint;
|
|
48
|
-
- call the same CLI-backed deploy path;
|
|
49
|
-
- show success URL, PDF URL, failure output, and dirty status.
|
|
50
|
-
|
|
51
|
-
It must not create a second hidden deployment behavior.
|