Repository: typst-doc-cn/tutorial Branch: main Commit: 64a950fa0650 Files: 134 Total size: 486.1 KB Directory structure: gitextract_r5ef022r/ ├── .codex/ │ └── skills/ │ ├── openspec-apply-change/ │ │ └── SKILL.md │ ├── openspec-archive-change/ │ │ └── SKILL.md │ ├── openspec-explore/ │ │ └── SKILL.md │ ├── openspec-propose/ │ │ └── SKILL.md │ ├── typst-grammar-authoring/ │ │ └── SKILL.md │ └── update-typst-grammar-authoring/ │ ├── SKILL.md │ ├── agents/ │ │ └── openai.yaml │ ├── references/ │ │ └── grammar-catalog.json │ └── scripts/ │ └── generate_grammar_catalog.py ├── .gitattributes ├── .github/ │ └── workflows/ │ ├── build.yml │ └── gh_pages.yml ├── .gitignore ├── .gitmodules ├── .vscode/ │ └── settings.json ├── .zed/ │ └── settings.json ├── Cargo.toml ├── LICENSE ├── README.md ├── _typos.toml ├── assets/ │ └── files/ │ └── tokyo-night.tmTheme ├── crates/ │ └── embedded-typst/ │ ├── Cargo.toml │ └── src/ │ └── lib.rs ├── meta.json ├── openspec/ │ ├── changes/ │ │ └── archive/ │ │ └── 2026-03-15-create-english-typst-grammar-skill/ │ │ ├── .openspec.yaml │ │ ├── design.md │ │ ├── proposal.md │ │ ├── specs/ │ │ │ └── typst-document-authoring-skill/ │ │ │ └── spec.md │ │ └── tasks.md │ ├── config.yaml │ └── specs/ │ └── typst-document-authoring-skill/ │ └── spec.md ├── scripts/ │ ├── build.ps1 │ └── build.sh ├── src/ │ ├── book.typ │ ├── ebook.typ │ ├── figures.typ │ ├── graph/ │ │ ├── digraph.typ │ │ ├── electronics.typ │ │ ├── mod.typ │ │ ├── solid-geometry.typ │ │ ├── state-machine.typ │ │ ├── statistics.typ │ │ └── table.typ │ ├── intermediate/ │ │ └── mod.typ │ ├── introduction.typ │ ├── misc/ │ │ ├── code-syntax.typ │ │ ├── code-theme.typ │ │ ├── font-setting.typ │ │ ├── mod.typ │ │ └── text-processing.typ │ ├── mod.typ │ ├── prefaces/ │ │ ├── acknowledgement.typ │ │ ├── license.typ │ │ └── mod.typ │ ├── science/ │ │ ├── algorithm.typ │ │ ├── chemical.typ │ │ ├── mod.typ │ │ └── theorem.typ │ ├── template/ │ │ ├── book.typ │ │ ├── mod.typ │ │ ├── paper.typ │ │ └── slides.typ │ ├── topics/ │ │ ├── call-externals.typ │ │ ├── mod.typ │ │ ├── template-book.typ │ │ ├── template-cv.typ │ │ ├── template-paper.typ │ │ ├── writing-component-lib.typ │ │ ├── writing-math.typ │ │ └── writing-plugin-lib.typ │ └── tutorial/ │ ├── doc-modulize.typ │ ├── doc-stateful.typ │ ├── figure-time-travel.typ │ ├── latex-look.typ │ ├── mod.typ │ ├── other-file.typ │ ├── packages/ │ │ └── m1.typ │ ├── reference-bibliography.typ │ ├── reference-calculation.typ │ ├── reference-color.typ │ ├── reference-counter-state.typ │ ├── reference-data-process.typ │ ├── reference-date.typ │ ├── reference-grammar.typ │ ├── reference-layout.typ │ ├── reference-length.typ │ ├── reference-math-mode.typ │ ├── reference-math-symbols.typ │ ├── reference-outline.typ │ ├── reference-syntax-analysis.typ │ ├── reference-table.typ │ ├── reference-type-builtin.typ │ ├── reference-typebase.typ │ ├── reference-utils.typ │ ├── reference-visualization.typ │ ├── reference-wasm-plugin.typ │ ├── scripting-block-and-expression.typ │ ├── scripting-color.typ │ ├── scripting-composite.typ │ ├── scripting-content.typ │ ├── scripting-control-flow.typ │ ├── scripting-layout.typ │ ├── scripting-literal.typ │ ├── scripting-main.typ │ ├── scripting-shape.typ │ ├── scripting-style.typ │ ├── scripting-variable.typ │ ├── stateful/ │ │ ├── q0.typ │ │ ├── q1.typ │ │ ├── s1.typ │ │ ├── s2.typ │ │ └── s3.typ │ ├── stateful-v0.12.0/ │ │ ├── q0.typ │ │ ├── q1.typ │ │ ├── s1.typ │ │ ├── s2.typ │ │ └── s3.typ │ ├── writing-chinese.typ │ ├── writing-markup.typ │ ├── writing-math.typ │ ├── writing-scripting.typ │ └── writing.typ └── typ/ ├── book/ │ ├── lib.typ │ ├── typst.toml │ └── variables.typ ├── embedded-typst/ │ ├── example.typ │ └── lib.typ ├── templates/ │ ├── ebook.typ │ ├── page.typ │ ├── side-notes.typ │ ├── template-link.typ │ ├── term.typ │ └── theme-style.toml └── typst-meta/ └── docs.typ ================================================ FILE CONTENTS ================================================ ================================================ FILE: .codex/skills/openspec-apply-change/SKILL.md ================================================ --- name: openspec-apply-change description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. license: MIT compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" generatedBy: "1.2.0" --- Implement tasks from an OpenSpec change. **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. **Steps** 1. **Select the change** If a name is provided, use it. Otherwise: - Infer from conversation context if the user mentioned a change - Auto-select if only one active change exists - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). 2. **Check status to understand the schema** ```bash openspec status --change "" --json ``` Parse the JSON to understand: - `schemaName`: The workflow being used (e.g., "spec-driven") - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) 3. **Get apply instructions** ```bash openspec instructions apply --change "" --json ``` This returns: - Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs) - Progress (total, complete, remaining) - Task list with status - Dynamic instruction based on current state **Handle states:** - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change - If `state: "all_done"`: congratulate, suggest archive - Otherwise: proceed to implementation 4. **Read context files** Read the files listed in `contextFiles` from the apply instructions output. The files depend on the schema being used: - **spec-driven**: proposal, specs, design, tasks - Other schemas: follow the contextFiles from CLI output 5. **Show current progress** Display: - Schema being used - Progress: "N/M tasks complete" - Remaining tasks overview - Dynamic instruction from CLI 6. **Implement tasks (loop until done or blocked)** For each pending task: - Show which task is being worked on - Make the code changes required - Keep changes minimal and focused - Mark task complete in the tasks file: `- [ ]` → `- [x]` - Continue to next task **Pause if:** - Task is unclear → ask for clarification - Implementation reveals a design issue → suggest updating artifacts - Error or blocker encountered → report and wait for guidance - User interrupts 7. **On completion or pause, show status** Display: - Tasks completed this session - Overall progress: "N/M tasks complete" - If all done: suggest archive - If paused: explain why and wait for guidance **Output During Implementation** ``` ## Implementing: (schema: ) Working on task 3/7: [...implementation happening...] ✓ Task complete Working on task 4/7: [...implementation happening...] ✓ Task complete ``` **Output On Completion** ``` ## Implementation Complete **Change:** **Schema:** **Progress:** 7/7 tasks complete ✓ ### Completed This Session - [x] Task 1 - [x] Task 2 ... All tasks complete! Ready to archive this change. ``` **Output On Pause (Issue Encountered)** ``` ## Implementation Paused **Change:** **Schema:** **Progress:** 4/7 tasks complete ### Issue Encountered **Options:** 1.