@open-press/cli 0.3.0 → 0.6.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 +125 -51
- package/package.json +1 -1
- package/template/core/CHANGELOG.md +73 -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/packs/academic-paper/document/chapters/01-introduction/content/01-introduction.mdx +21 -0
- package/template/packs/academic-paper/document/chapters/02-methods/content/01-methods.mdx +30 -0
- package/template/packs/academic-paper/document/chapters/03-results-and-discussion/content/01-results.mdx +29 -0
- package/template/packs/academic-paper/document/chapters/04-acknowledgment/content/01-acknowledgment.mdx +12 -0
- package/template/packs/academic-paper/document/chapters/05-references/content/01-references.mdx +27 -0
- package/template/packs/academic-paper/document/index.tsx +107 -0
- package/template/packs/academic-paper/document/openpress.config.mjs +26 -0
- package/template/packs/academic-paper/document/theme/page-surfaces/cover.css +267 -0
- 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/packs/editorial-monograph/document/components/ChapterOpenerVisual/index.tsx +76 -0
- package/template/packs/editorial-monograph/document/components/Page.tsx +27 -0
- package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/index.tsx +46 -0
- package/template/packs/editorial-monograph/document/components/TokenSwatchGrid/style.css +63 -0
- package/template/packs/editorial-monograph/document/components/TypeSpecimen/index.tsx +38 -0
- package/template/packs/editorial-monograph/document/components/TypeSpecimen/style.css +111 -0
- package/template/packs/editorial-monograph/document/design.md +279 -0
- package/template/packs/editorial-monograph/document/media/README.md +13 -0
- package/template/packs/editorial-monograph/document/theme/README.md +11 -0
- package/template/packs/editorial-monograph/document/theme/base/page-contract.css +505 -0
- package/template/packs/editorial-monograph/document/theme/base/print.css +93 -0
- package/template/packs/editorial-monograph/document/theme/base/typography.css +336 -0
- package/template/packs/editorial-monograph/document/theme/fonts.css +3 -0
- package/template/packs/editorial-monograph/document/theme/page-surfaces/back-cover.css +43 -0
- package/template/packs/editorial-monograph/document/theme/page-surfaces/chapter-opener.css +205 -0
- package/template/packs/editorial-monograph/document/theme/page-surfaces/toc.css +139 -0
- package/template/packs/editorial-monograph/document/theme/patterns/_chart-frame.css +49 -0
- package/template/packs/editorial-monograph/document/theme/patterns/figure-grid.css +68 -0
- package/template/packs/editorial-monograph/document/theme/patterns/table-utilities.css +66 -0
- package/template/packs/editorial-monograph/document/theme/shell/reader-controls.css +761 -0
- package/template/packs/editorial-monograph/document/theme/tokens.css +80 -0
- package/template/packs/editorial-monograph/openpress.config.mjs +5 -0
- 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/editorial-monograph/starter → packs/academic-paper}/document/components/ChapterOpenerVisual/index.tsx +0 -0
- /package/template/{skills/claude-document/starter → packs/academic-paper}/document/components/Page.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/components/TokenSwatchGrid/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/components/TokenSwatchGrid/style.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/components/TypeSpecimen/index.tsx +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/components/TypeSpecimen/style.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/design.md +0 -0
- /package/template/{skills/claude-document/starter → packs/academic-paper}/document/media/README.md +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/README.md +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/base/page-contract.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/base/print.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/base/typography.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/fonts.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/page-surfaces/back-cover.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/page-surfaces/chapter-opener.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/page-surfaces/toc.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/patterns/_chart-frame.css +0 -0
- /package/template/{skills/claude-document/starter → packs/academic-paper}/document/theme/patterns/figure-grid.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/patterns/table-utilities.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/shell/reader-controls.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/theme/tokens.css +0 -0
- /package/template/{skills/editorial-monograph/starter → packs/academic-paper}/openpress.config.mjs +0 -0
- /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/editorial-monograph/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/editorial-monograph/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/editorial-monograph/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/index.tsx +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/page-surfaces/cover.css +0 -0
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openpress-writing
|
|
3
|
-
description: "Use when planning, restructuring, drafting, rewriting, or editing open-press document content at the document level: audience, narrative, section order, table/figure captions, factual boundaries, and coordination with independent writing skills."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# open-press Writing
|
|
7
|
-
|
|
8
|
-
open-press writing owns the **reader-facing document argument**. It decides what the document should say, in what order, and what facts need confirmation. It is also the **entry point for portable writing skills** (tone, language, genre, teaching).
|
|
9
|
-
|
|
10
|
-
## Responsibilities
|
|
11
|
-
|
|
12
|
-
- Define audience, purpose, narrative flow, and section order.
|
|
13
|
-
- Rewrite prose, tables, captions, and content transitions.
|
|
14
|
-
- Own the `<TableCaption>...</TableCaption>` placement rule (single authoritative definition; style packs link to this skill, not redefine it).
|
|
15
|
-
- Decide when prose should become a table, figure, chart, or callout.
|
|
16
|
-
- Preserve confirmed facts and mark missing facts explicitly.
|
|
17
|
-
- Load portable writing skills based on content type (see triggers below).
|
|
18
|
-
- Reference `openpress` for system operations, source/generated boundaries, and verification commands instead of defining them here.
|
|
19
|
-
|
|
20
|
-
## Boundaries
|
|
21
|
-
|
|
22
|
-
| Owns | Boundary |
|
|
23
|
-
| --- | --- |
|
|
24
|
-
| `openpress` | CLI, inspect/search/replace, source/generated boundary |
|
|
25
|
-
| `openpress-document-hierarchy` | H1/H2/H3/H4 structure, TOC depth, appendix placement |
|
|
26
|
-
| `openpress-design` | theme CSS, visual systems, component styling |
|
|
27
|
-
| `openpress-diagram-drawing` | what diagrams show |
|
|
28
|
-
| Portable writing skills | language, tone, genre, teaching-specific rules |
|
|
29
|
-
|
|
30
|
-
Source paths follow `openpress` > Source Boundary. Do not redefine them here.
|
|
31
|
-
|
|
32
|
-
## Coordination With Hierarchy
|
|
33
|
-
|
|
34
|
-
When work might change `##` chapter splits, TOC depth, or H4 outline density, **route to `openpress-document-hierarchy` first**, then return here to write the prose. When writing reveals a need to split or merge headings, hand the structural change back to hierarchy.
|
|
35
|
-
|
|
36
|
-
## Portable Writing Skill Triggers
|
|
37
|
-
|
|
38
|
-
Load a portable skill when content matches these conditions:
|
|
39
|
-
|
|
40
|
-
| Content type | Load |
|
|
41
|
-
| --- | --- |
|
|
42
|
-
| Any Traditional Chinese professional content | `chinese-ai-writing-polish` |
|
|
43
|
-
| Learner-facing teaching notes, worksheets, study guides, tutorial chapters | `teaching-notes-writing` |
|
|
44
|
-
| (future) Business proposal / pitch / investor memo | dedicated portable skill |
|
|
45
|
-
| (future) Academic report / paper | dedicated portable skill |
|
|
46
|
-
|
|
47
|
-
Multiple portable skills may apply (e.g. 繁體中文 teaching notes load both). When two rules disagree, resolve in this order:
|
|
48
|
-
|
|
49
|
-
1. Explicit user instruction in the current conversation.
|
|
50
|
-
2. Workspace memory and preferences (e.g. `memory/AGENTS.md`, `document/design.md`).
|
|
51
|
-
3. Document brief or stated purpose.
|
|
52
|
-
4. `openpress-writing` structural decisions (audience, narrative, section order).
|
|
53
|
-
5. Portable skill rules.
|
|
54
|
-
|
|
55
|
-
If the conflict changes meaning or claims, ask the user.
|
|
56
|
-
|
|
57
|
-
## Workflow
|
|
58
|
-
|
|
59
|
-
1. Identify audience, goal, fixed facts, and missing facts.
|
|
60
|
-
2. Check if hierarchy is affected; if so, coordinate with `openpress-document-hierarchy` first.
|
|
61
|
-
3. Load portable writing skills per the trigger table.
|
|
62
|
-
4. Rewrite source content without adding unsupported claims.
|
|
63
|
-
5. Mark unresolved facts as `[TODO: ...]`, `[FIX: ...]`, or `[DRAFT: ...]`.
|
|
64
|
-
6. Ask `openpress` which validation depth and commands are needed after content edits.
|
|
65
|
-
|
|
66
|
-
## When To Read References
|
|
67
|
-
|
|
68
|
-
- Read `references/source-and-writing-rules.md` for frontmatter, metadata, unfinished markers, public-content boundaries, heading hygiene, formulas, captions, and starter document rules.
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# Source And Writing Rules
|
|
2
|
-
|
|
3
|
-
## Content Shape
|
|
4
|
-
|
|
5
|
-
open-press scans React/MDX chapter content in chapter directory order:
|
|
6
|
-
|
|
7
|
-
```txt
|
|
8
|
-
document/index.tsx
|
|
9
|
-
document/chapters/
|
|
10
|
-
01-example/
|
|
11
|
-
chapter.tsx optional meta/opener for book-like docs
|
|
12
|
-
content/
|
|
13
|
-
01-start.mdx
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Document shell exports in `document/index.tsx`:
|
|
17
|
-
|
|
18
|
-
- `config`: document identity and open-press paths.
|
|
19
|
-
- `cover`: opening identity page.
|
|
20
|
-
- `toc`: generated table of contents shell.
|
|
21
|
-
- `backCover`: closing page.
|
|
22
|
-
|
|
23
|
-
Chapter exports in `chapter.tsx`:
|
|
24
|
-
|
|
25
|
-
- `meta`: optional `slug`, `title`, and tone/style metadata.
|
|
26
|
-
- `opener`: optional chapter divider JSX for books, teaching notes, manuals, or loose chapter collections.
|
|
27
|
-
|
|
28
|
-
Document-level identity belongs in `document/index.tsx` `config` and, for nested workspaces, matching `document/openpress.config.mjs` delivery settings:
|
|
29
|
-
|
|
30
|
-
- `title`
|
|
31
|
-
- `subtitle`
|
|
32
|
-
- `organization`
|
|
33
|
-
- `workspaceLabel`
|
|
34
|
-
|
|
35
|
-
Do not move document identity into MDX frontmatter.
|
|
36
|
-
|
|
37
|
-
## Page Kind Boundaries
|
|
38
|
-
|
|
39
|
-
Use source location to describe a page's role, not its topic:
|
|
40
|
-
|
|
41
|
-
| Source | Use For | Footer |
|
|
42
|
-
| --- | --- | --- |
|
|
43
|
-
| `document/index.tsx` `cover` | document opening identity | no |
|
|
44
|
-
| `document/index.tsx` `toc` | generated table of contents shell | no |
|
|
45
|
-
| `chapter.tsx` `opener` | optional chapter divider / mini cover | no |
|
|
46
|
-
| `content/*.mdx` | normal reader-facing sections split/paginated by blocks | yes |
|
|
47
|
-
| `document/index.tsx` `backCover` | closing page | no |
|
|
48
|
-
|
|
49
|
-
`opener` is not a substitute for `##` chapter content. It should introduce the next chapter with a title, short summary, or learning map, then the real chapter still starts in MDX. Do not add chapter openers to thesis/report-style documents unless the user asks for a book-like reading rhythm.
|
|
50
|
-
|
|
51
|
-
## Public Content Boundary
|
|
52
|
-
|
|
53
|
-
Rendered open-press pages are for the intended reader. Avoid internal production notes in `document/chapters/` unless the document topic is explicitly open-press, agent workflows, style packs, or design documentation.
|
|
54
|
-
|
|
55
|
-
Avoid accidental internal language such as `agent`, `skill`, `style pack`, `內部規則`, `給老師看`, `設計理由`, or `production note` in normal reader-facing chapters. Use `openpress` when source scanning is needed.
|
|
56
|
-
|
|
57
|
-
## Unfinished Content
|
|
58
|
-
|
|
59
|
-
Use recognizable markers:
|
|
60
|
-
|
|
61
|
-
```txt
|
|
62
|
-
[TODO: ...]
|
|
63
|
-
[FIX: ...]
|
|
64
|
-
[DRAFT: ...]
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Avoid bare `TODO`, `TBD`, or `[必填]`; they are harder to distinguish from normal prose.
|
|
68
|
-
|
|
69
|
-
## Heading Hygiene
|
|
70
|
-
|
|
71
|
-
Headings are navigation labels. Keep `##` and `###` plain-text and semantic:
|
|
72
|
-
|
|
73
|
-
- no backtick code spans;
|
|
74
|
-
- no raw HTML tags;
|
|
75
|
-
- no bold/italic Markdown;
|
|
76
|
-
- no formulas as heading text.
|
|
77
|
-
|
|
78
|
-
Move identifiers, formulas, commands, and API names into the paragraph after the heading. Before finishing a writing pass, ask `openpress` to scan headings for code spans, raw HTML, bold/italic Markdown, or formula-like labels when that risk is present.
|
|
79
|
-
|
|
80
|
-
## Formula Writing
|
|
81
|
-
|
|
82
|
-
open-press renders LaTeX math. Use plain Markdown delimiters:
|
|
83
|
-
|
|
84
|
-
- Inline: `$x^2$` or `\(x^2\)`.
|
|
85
|
-
- Display: `$$ ... $$` or `\[ ... \]` on their own lines.
|
|
86
|
-
|
|
87
|
-
If a formula string should remain literal, use code spans or code fences.
|
|
88
|
-
|
|
89
|
-
## Caption Contract
|
|
90
|
-
|
|
91
|
-
open-press owns figure and table numbering. Components and Markdown content provide only semantic caption text; the renderer adds numbering such as `圖 N:` or `表 N:`.
|
|
92
|
-
|
|
93
|
-
- Use at most one `<figcaption>` per `<figure>`.
|
|
94
|
-
- Put visible captions after the visual body.
|
|
95
|
-
- Put `<TableCaption>` immediately before any Markdown table that should be captioned:
|
|
96
|
-
```mdx
|
|
97
|
-
<TableCaption>Pointer syntax</TableCaption>
|
|
98
|
-
|
|
99
|
-
| 寫法 | 意義 |
|
|
100
|
-
| --- | --- |
|
|
101
|
-
| `p` | 節點位址 |
|
|
102
|
-
```
|
|
103
|
-
- Do not use the legacy `表:...` marker, and do not write `表 1:`, `圖 2:`, `Figure 1`, or `Table 1` in source content. The visible number is generated from DOM order.
|
|
104
|
-
- Empty `<TableCaption>` components, misplaced `<TableCaption>` components, and legacy `表:...` markers are compile errors.
|
|
105
|
-
- Keep captions title-level; put long explanation in surrounding prose.
|
|
106
|
-
- Do not draw figure/table numbers or explanatory prose inside chart panels.
|
|
107
|
-
|
|
108
|
-
## Starter Document Writing
|
|
109
|
-
|
|
110
|
-
Use the active style pack starter and `document/design.md` when drafting a new or thin open-press workspace.
|
|
111
|
-
|
|
112
|
-
A small starter document usually includes:
|
|
113
|
-
|
|
114
|
-
- cover: title, subtitle, promise, summary;
|
|
115
|
-
- TOC: placeholder only, because open-press injects entries;
|
|
116
|
-
- chapter 1: purpose, audience, workflow;
|
|
117
|
-
- chapter 2: validation, output, example table or list;
|
|
118
|
-
- back cover: concise closing statement.
|
|
119
|
-
|
|
120
|
-
Prefer user-provided facts. If facts are missing, write neutral operational content or explicit placeholders instead of inventing organizations, metrics, testimonials, dates, or commitments.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: teaching-notes-writing
|
|
3
|
-
description: Use when drafting or revising learner-facing teaching notes, course handouts, worksheets, study guides, or tutorial chapters that need comparisons, step-by-step explanation, quick practice, worked examples, or answer appendices.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Teaching Notes Writing
|
|
7
|
-
|
|
8
|
-
This is a **portable writing skill**: usable standalone, and loaded by `openpress-writing` when content is learner-facing teaching material (handouts, worksheets, study guides, tutorial chapters). `openpress-writing` owns the trigger and conflict-resolution rules.
|
|
9
|
-
|
|
10
|
-
Teaching notes are for learners who are still building the mental model. This skill provides **suggested content skeletons**, explanation strategies, examples, practice ideas, and answer-flow guidance. It does not mandate one rigid chapter template.
|
|
11
|
-
|
|
12
|
-
## Responsibilities
|
|
13
|
-
|
|
14
|
-
- Start from the learner's likely mental model.
|
|
15
|
-
- Compare nearby ideas before introducing formal rules.
|
|
16
|
-
- Show procedures step by step with visible state changes.
|
|
17
|
-
- Put reasons, warnings, and interpretation in prose rather than overloading figures.
|
|
18
|
-
- Suggest practice surfaces that match the chapter content.
|
|
19
|
-
- Put answers after the learner has had a chance to try.
|
|
20
|
-
- Suggest when a structure, relationship, or state change should become a diagram; use `openpress-diagram-drawing` for the actual diagram semantics.
|
|
21
|
-
|
|
22
|
-
## Boundaries
|
|
23
|
-
|
|
24
|
-
- `openpress-writing` owns open-press source boundaries and public-content hygiene.
|
|
25
|
-
- `openpress-document-hierarchy` owns H1/H2/H3/H4 structure for long-form open-press notes.
|
|
26
|
-
- `openpress-diagram-drawing` owns diagram semantics.
|
|
27
|
-
- `openpress-design` owns visual style and component implementation.
|
|
28
|
-
- `openpress` owns CLI, validation/export/render commands, and source/generated boundaries.
|
|
29
|
-
- This skill owns learner-facing explanation suggestions and exercise-design patterns only.
|
|
30
|
-
|
|
31
|
-
## Suggested Skeleton
|
|
32
|
-
|
|
33
|
-
Use this as a starting skeleton, not a required template:
|
|
34
|
-
|
|
35
|
-
1. Start from the learner's concrete problem or confusion.
|
|
36
|
-
2. Compare nearby concepts, states, or representations.
|
|
37
|
-
3. Show the operation or idea step by step.
|
|
38
|
-
4. Add one small check, trace, or practice task when it helps.
|
|
39
|
-
5. Put full answers after the learner has had a chance to attempt.
|
|
40
|
-
|
|
41
|
-
If the concept depends on spatial structure, ownership, arrows, state transitions, or before/after relationships, hand the visual semantics to `openpress-diagram-drawing`.
|
|
42
|
-
|
|
43
|
-
## Learner Boundary
|
|
44
|
-
|
|
45
|
-
Rendered teaching pages should speak to the learner, not the teacher or agent.
|
|
46
|
-
|
|
47
|
-
- Do not include teacher-only reminders, production notes, internal rationale, or style-pack commentary.
|
|
48
|
-
- Keep internal rules in skills, design docs, or source references.
|
|
49
|
-
- Use consistent terms and variable names across prose, diagrams, tables, and code.
|
|
50
|
-
|
|
51
|
-
## When To Read References
|
|
52
|
-
|
|
53
|
-
- Read `references/teaching-patterns.md` for comparison writing, explanation order, practice question types, and answer placement.
|
|
54
|
-
- Read `references/programming.md` when teaching code, pseudocode, data structures, pointer diagrams, memory state, or program traces.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Programming Teaching Reference
|
|
2
|
-
|
|
3
|
-
Use this reference with `teaching-notes-writing` when the learning material teaches programming, algorithms, data structures, memory state, or code tracing.
|
|
4
|
-
|
|
5
|
-
## Long Code Teaching Flow
|
|
6
|
-
|
|
7
|
-
When a section introduces a long program, avoid dropping the full code block first. Use this order:
|
|
8
|
-
|
|
9
|
-
1. State the problem the code solves.
|
|
10
|
-
2. Show the data shape first, usually a `struct`, record, class, type definition, or table of variables.
|
|
11
|
-
3. Explain helper functions one at a time.
|
|
12
|
-
4. Present the core algorithm or function after students know the supporting pieces.
|
|
13
|
-
5. Add a complete version at the end, including `main` or an equivalent entry point when the language uses one.
|
|
14
|
-
6. Show a small expected output or state trace so students know how to verify the program.
|
|
15
|
-
|
|
16
|
-
## Heading Hierarchy For Course Notes
|
|
17
|
-
|
|
18
|
-
- Use `#` only for the whole document title, usually on the cover or in metadata.
|
|
19
|
-
- Use `##` for formal chapters such as `CH5 Tree`, `CH6 Graph`, or `CH7 Sorting`.
|
|
20
|
-
- Use `###` for major topic groups that should appear in the formal table of contents, such as `Traversal`, `BST`, `MST`, or `Sorting Algorithms`.
|
|
21
|
-
- Use `####` for concrete algorithms, operations, theorem items, or implementation variants, such as `BST delete`, `left rotate`, `quick sort (non-recursive)`, or `Theorem 1`.
|
|
22
|
-
- Do not promote every algorithm to `##`; a long course note needs stable hierarchy more than large titles.
|
|
23
|
-
|
|
24
|
-
## Code Block Rules
|
|
25
|
-
|
|
26
|
-
- A code block should have a clear local purpose before it appears.
|
|
27
|
-
- Prefer several short code blocks for teaching, then one complete code block for integration.
|
|
28
|
-
- Keep identifiers consistent across prose, tables, diagrams, and code.
|
|
29
|
-
- Use comments only when they explain a non-obvious step. Do not comment every assignment.
|
|
30
|
-
- When dynamic memory or external resources are involved, include cleanup in the complete version if the language requires it.
|
|
31
|
-
- If a simplified example omits error handling or cleanup, state the omission explicitly. Prefer not omitting them in final code.
|
|
32
|
-
|
|
33
|
-
## Pseudocode Rules
|
|
34
|
-
|
|
35
|
-
- Pseudocode should look like an algorithm, not a compressed prose note.
|
|
36
|
-
- Include `Algorithm`, `Input`, and `Output` when the block represents a complete procedure.
|
|
37
|
-
- Use indentation to show loops and branches.
|
|
38
|
-
- Name operations by intent, such as `append_term`, `poly_add`, `clear`, or `return`, instead of vague verbs.
|
|
39
|
-
- Keep pseudocode close enough to implementation that students can map it back to the final program.
|
|
40
|
-
|
|
41
|
-
## Programming Diagram And Table Pairing
|
|
42
|
-
|
|
43
|
-
- Use markdown tables for dense comparisons, coefficient tables, state traces, and step-by-step logs.
|
|
44
|
-
- Suggest custom open-press components for visual relationships: node links, pointer movement, memory layout, before/after states, and flow diagrams.
|
|
45
|
-
- Use `openpress-diagram-drawing` to decide what belongs inside those visuals.
|
|
46
|
-
- Do not combine a large table and a large diagram into one oversized image. Split them so each surface has one reading job.
|
|
47
|
-
- Full-width figures are acceptable when a diagram contains multiple linked nodes or state rows.
|
|
48
|
-
|
|
49
|
-
## Technical Term Usage
|
|
50
|
-
|
|
51
|
-
- Do not force every programming term into Chinese.
|
|
52
|
-
- Use common English terms when students will also see them in code, exams, online judges, IDEs, or English documentation.
|
|
53
|
-
- For major concepts, use English first with a local-language bridge on first mention: `Linked List(鏈結串列)`, `Singly Linked List(單向鏈結串列)`, `Doubly Linked List(雙向鏈結串列)`, `Circular Linked List(環狀串列)`, `Header Node(開頭空白節點)`.
|
|
54
|
-
- After a concept is established, keep the English term in headings, tables, diagrams, and code-adjacent prose when that is what students will see elsewhere.
|
|
55
|
-
- Use the local language when explaining reasoning, constraints, and student-facing guidance.
|
|
56
|
-
|
|
57
|
-
## Completion Check
|
|
58
|
-
|
|
59
|
-
Before finishing a programming teaching pass:
|
|
60
|
-
|
|
61
|
-
- verify long code sections have both breakdown and complete integration;
|
|
62
|
-
- check that pseudocode, code, diagrams, and tables use the same identifiers;
|
|
63
|
-
- confirm examples include an expected output, final state, or trace when useful;
|
|
64
|
-
- check that simplified code does not silently omit cleanup or safety checks students need to learn;
|
|
65
|
-
- use `openpress` for any workspace validation, export, render, or source/generated boundary questions.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Teaching Patterns
|
|
2
|
-
|
|
3
|
-
## Comparison Writing
|
|
4
|
-
|
|
5
|
-
Use comparison when a concept is abstract, easily confused, or representation-dependent.
|
|
6
|
-
|
|
7
|
-
| Surface | Best For |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| paragraph | one conceptual difference |
|
|
10
|
-
| table | several aligned dimensions |
|
|
11
|
-
| figure | spatial or directional relationship |
|
|
12
|
-
| state trace | repeated algorithm steps |
|
|
13
|
-
| code block | exact syntax or implementation |
|
|
14
|
-
|
|
15
|
-
Avoid comparing too many things at once. If a table grows past one reading job, split it.
|
|
16
|
-
|
|
17
|
-
## Suggested Explanation Skeletons
|
|
18
|
-
|
|
19
|
-
These are reusable starting points, not mandatory page templates. Adjust the order when the learner's prior knowledge or the source material demands it.
|
|
20
|
-
|
|
21
|
-
For a concept:
|
|
22
|
-
|
|
23
|
-
1. why it appears;
|
|
24
|
-
2. small concrete example;
|
|
25
|
-
3. representation or vocabulary;
|
|
26
|
-
4. diagram or table;
|
|
27
|
-
5. formal rule, formula, or code;
|
|
28
|
-
6. common mistake;
|
|
29
|
-
7. quick practice.
|
|
30
|
-
|
|
31
|
-
For a procedure:
|
|
32
|
-
|
|
33
|
-
1. initial state;
|
|
34
|
-
2. state-changing steps;
|
|
35
|
-
3. final state;
|
|
36
|
-
4. why order matters;
|
|
37
|
-
5. matching code or formula;
|
|
38
|
-
6. practice trace with another input.
|
|
39
|
-
|
|
40
|
-
## Visual And Text Roles
|
|
41
|
-
|
|
42
|
-
- Use diagrams for relationships, directions, and state changes.
|
|
43
|
-
- Use `openpress-diagram-drawing` when a structural visual, state diagram, pointer diagram, process diagram, or before/after figure is needed.
|
|
44
|
-
- Use tables for dense comparisons and traces.
|
|
45
|
-
- Use prose for reasons, warnings, edge cases, and interpretation.
|
|
46
|
-
- Use code/math blocks for exact syntax, formulas, or runnable fragments.
|
|
47
|
-
- Keep captions short; they name what to observe.
|
|
48
|
-
|
|
49
|
-
## Practice Design
|
|
50
|
-
|
|
51
|
-
Useful question types:
|
|
52
|
-
|
|
53
|
-
- quick recall;
|
|
54
|
-
- comparison;
|
|
55
|
-
- state trace;
|
|
56
|
-
- bug finding;
|
|
57
|
-
- implementation;
|
|
58
|
-
- explanation of why a step must happen before another.
|
|
59
|
-
|
|
60
|
-
Answers can be inline only for tiny checks. For chapter-level exercises, prefer an answer appendix before the back cover.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/editorial-monograph/starter → packs/academic-paper}/document/design.md
RENAMED
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/academic-paper}/document/media/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/editorial-monograph/starter → packs/academic-paper}/openpress.config.mjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/document/design.md
RENAMED
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/document/index.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/fonts.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/document/theme/tokens.css
RENAMED
|
File without changes
|
/package/template/{skills/claude-document/starter → packs/claude-document}/openpress.config.mjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|