Learn Everything Blog Workflow
Operate from the repository root. Resolve it with git rev-parse --show-toplevel; verify package.json has name learn-everything-blog before changing anything.
Safety gate
The workflow has four separate phases: draft, review, preview, and publish.
- Never publish during draft, review, or preview.
- Never infer publishing approval from praise such as “looks good” if the user did not ask to publish.
- Publishing means setting
draft: false, committing, and pushing. Do it only when the user explicitly invokes the publish phase or clearly says “发布这篇文章”.
- Never commit or push unrelated working-tree changes.
- Never include secrets, access tokens, private company data, personal contact details, or unlicensed copied text.
- Treat files in a public GitHub repository as public even when
draft: true.
- Do not delete or modify source notes outside this repository unless explicitly requested.
Content destinations
Choose the narrowest fitting destination:
src/content/posts/knowledge/<topic>/<english-kebab-slug>.md
src/content/posts/projects/<project>/<english-kebab-slug>.md
src/content/posts/thoughts/<english-kebab-slug>.md
Use stable English kebab-case for directories and filenames. Chinese titles and tags are encouraged.
knowledge: reusable concepts, tutorials, learning notes
project: implementation logs, experiments, decisions, retrospectives
thought: personal reflections and arguments
Store article images next to the Markdown file in <article-slug>-assets/ and reference them with portable relative Markdown syntax, for example . Do not use site-root /images/... paths or raw HTML <img> tags: the same source must render in Obsidian, GitHub Markdown, and Astro.
Required frontmatter
---
title: "清晰、具体的中文标题"
description: "一句话说明文章解决的问题或提供的价值。"
pubDatetime: 2026-09-11T12:00:00+08:00
featured: false
draft: true
type: knowledge
project: optional-project-slug
series: optional-series-name
order: 1
tags:
- 标签一
- 标签二
---
Omit optional project, series, and order rather than filling meaningless values. New content must start with draft: true.
Visual storytelling
For substantial technical articles, design visuals as part of the explanation rather than decoration:
- Start from the reader's core question, then choose diagrams that expose mechanism, contrast, boundaries, examples, and evaluation.
- Prefer original architecture diagrams, comparison matrices, decision trees, experiment charts, and data visualizations.
- Paper figures may be reused only after checking their license or permission; preserve attribution and link the original source. Otherwise redraw the concept in an original visual language and cite the source that informed it.
- When an image-generation tool is available, use it for conceptual covers or illustrations, not for diagrams containing precise labels, code, measurements, or logical relationships.
- Every image needs useful alt text and, when appropriate, a caption that explains what the reader should notice.
- Keep assets portable using the co-located relative-path rule above.
- Do not add a fixed number of images mechanically; each visual must reduce explanation cost or reveal a relationship more clearly than prose.
Phase: draft
Input may be a topic, pasted material, one Markdown file, or several files.
- Read all supplied sources. Distinguish source facts, user experience, quotations, and model inference.
- Decide whether the material should be one article or multiple articles. Explain the proposed classification briefly.
- Preserve correct code, commands, measured values, links, and attribution. Never invent experiments, outputs, citations, or personal experience.
- Mark unresolved claims with an explicit
> 待核实:... note or ask the user; do not silently fill gaps.
- Write for comprehension, normally using: motivation, core concepts, options, practice, result, pitfalls, summary, follow-up. Remove sections that add no value.
- Create the destination Markdown with
draft: true.
- Run
npm run format:check and fix formatting if needed. Do not commit or push.
- Report the file path, classification, uncertainties, and the preview command.
Phase: review
Review the requested draft without publishing it. Evaluate:
- Is the central question clear?
- Are factual claims supported by supplied material or credible references?
- Are fact, experience, and opinion distinguishable?
- Does the structure remove repetition and preserve useful detail?
- Are title, description, tags, and directory appropriate?
- Are code samples complete and free of secrets?
- Does the article contain private or internal information?
- What must be fixed before publication?
Give findings first. Apply edits only if requested. Keep draft: true.
Phase: preview
- Verify the article exists and remains
draft: true.
- Run
npm run lint and npm run build. Production build intentionally excludes drafts.
- Explain that drafts are visible only under Astro development mode.
- Give the exact command
npm run dev and expected local article URL derived from its path.
- Do not commit, push, or set
draft: false.
If the user asks for a remotely accessible preview, use a dedicated preview branch and Vercel Preview Deployment only after explaining that the source will be visible on public GitHub. Do not merge it into main.
Phase: publish
Require a specific article path or an unambiguous single draft.
- Re-run the review checklist and stop for blockers such as secrets,
待核实, broken links, or invalid frontmatter.
- Confirm only the intended files will be included using
git status --short and git diff.
- Set the approved article's
draft to false and update modDatetime when appropriate.
- Run
npm run format:check, npm run lint, and npm run build.
- Commit only intended article/assets with a descriptive Chinese commit message.
- Push to
main; Vercel deploys automatically.
- Return the production URL and commit hash. If deployment cannot be verified, state that clearly rather than claiming success.
URL mapping
For a file:
src/content/posts/projects/fire-detection/model-comparison.md
the URL is:
https://bailixisu.com/posts/projects/fire-detection/model-comparison
1---2name: blog-workflow3description: Manage the Learn Everything blog writing workflow: turn a topic or Markdown source into a categorized draft, review its quality, prepare local preview, and publish only after explicit user approval. Use when the user asks to organize notes, generate a blog Markdown article, preview a draft, or publish to bailixisu.com.4---56# Learn Everything Blog Workflow78Operate from the repository root. Resolve it with `git rev-parse --show-toplevel`; verify `package.json` has name `learn-everything-blog` before changing anything.910## Safety gate1112The workflow has four separate phases: **draft**, **review**, **preview**, and **publish**.1314- Never publish during draft, review, or preview.15- Never infer publishing approval from praise such as “looks good” if the user did not ask to publish.16- Publishing means setting `draft: false`, committing, and pushing. Do it only when the user explicitly invokes the publish phase or clearly says “发布这篇文章”.17- Never commit or push unrelated working-tree changes.18- Never include secrets, access tokens, private company data, personal contact details, or unlicensed copied text.19- Treat files in a public GitHub repository as public even when `draft: true`.20- Do not delete or modify source notes outside this repository unless explicitly requested.2122## Content destinations2324Choose the narrowest fitting destination:2526```text27src/content/posts/knowledge/<topic>/<english-kebab-slug>.md28src/content/posts/projects/<project>/<english-kebab-slug>.md29src/content/posts/thoughts/<english-kebab-slug>.md30```3132Use stable English kebab-case for directories and filenames. Chinese titles and tags are encouraged.3334- `knowledge`: reusable concepts, tutorials, learning notes35- `project`: implementation logs, experiments, decisions, retrospectives36- `thought`: personal reflections and arguments3738Store article images next to the Markdown file in `<article-slug>-assets/` and reference them with portable relative Markdown syntax, for example ``. Do not use site-root `/images/...` paths or raw HTML `<img>` tags: the same source must render in Obsidian, GitHub Markdown, and Astro.3940## Required frontmatter4142```yaml43---44title: "清晰、具体的中文标题"45description: "一句话说明文章解决的问题或提供的价值。"46pubDatetime: 2026-09-11T12:00:00+08:0047featured: false48draft: true49type: knowledge50project: optional-project-slug51series: optional-series-name52order: 153tags:54 - 标签一55 - 标签二56---57```5859Omit optional `project`, `series`, and `order` rather than filling meaningless values. New content must start with `draft: true`.6061## Visual storytelling6263For substantial technical articles, design visuals as part of the explanation rather than decoration:6465- Start from the reader's core question, then choose diagrams that expose mechanism, contrast, boundaries, examples, and evaluation.66- Prefer original architecture diagrams, comparison matrices, decision trees, experiment charts, and data visualizations.67- Paper figures may be reused only after checking their license or permission; preserve attribution and link the original source. Otherwise redraw the concept in an original visual language and cite the source that informed it.68- When an image-generation tool is available, use it for conceptual covers or illustrations, not for diagrams containing precise labels, code, measurements, or logical relationships.69- Every image needs useful alt text and, when appropriate, a caption that explains what the reader should notice.70- Keep assets portable using the co-located relative-path rule above.71- Do not add a fixed number of images mechanically; each visual must reduce explanation cost or reveal a relationship more clearly than prose.7273## Phase: draft7475Input may be a topic, pasted material, one Markdown file, or several files.76771. Read all supplied sources. Distinguish source facts, user experience, quotations, and model inference.782. Decide whether the material should be one article or multiple articles. Explain the proposed classification briefly.793. Preserve correct code, commands, measured values, links, and attribution. Never invent experiments, outputs, citations, or personal experience.804. Mark unresolved claims with an explicit `> 待核实:...` note or ask the user; do not silently fill gaps.815. Write for comprehension, normally using: motivation, core concepts, options, practice, result, pitfalls, summary, follow-up. Remove sections that add no value.826. Create the destination Markdown with `draft: true`.837. Run `npm run format:check` and fix formatting if needed. Do not commit or push.848. Report the file path, classification, uncertainties, and the preview command.8586## Phase: review8788Review the requested draft without publishing it. Evaluate:8990- Is the central question clear?91- Are factual claims supported by supplied material or credible references?92- Are fact, experience, and opinion distinguishable?93- Does the structure remove repetition and preserve useful detail?94- Are title, description, tags, and directory appropriate?95- Are code samples complete and free of secrets?96- Does the article contain private or internal information?97- What must be fixed before publication?9899Give findings first. Apply edits only if requested. Keep `draft: true`.100101## Phase: preview1021031. Verify the article exists and remains `draft: true`.1042. Run `npm run lint` and `npm run build`. Production build intentionally excludes drafts.1053. Explain that drafts are visible only under Astro development mode.1064. Give the exact command `npm run dev` and expected local article URL derived from its path.1075. Do not commit, push, or set `draft: false`.108109If the user asks for a remotely accessible preview, use a dedicated preview branch and Vercel Preview Deployment only after explaining that the source will be visible on public GitHub. Do not merge it into `main`.110111## Phase: publish112113Require a specific article path or an unambiguous single draft.1141151. Re-run the review checklist and stop for blockers such as secrets, `待核实`, broken links, or invalid frontmatter.1162. Confirm only the intended files will be included using `git status --short` and `git diff`.1173. Set the approved article's `draft` to `false` and update `modDatetime` when appropriate.1184. Run `npm run format:check`, `npm run lint`, and `npm run build`.1195. Commit only intended article/assets with a descriptive Chinese commit message.1206. Push to `main`; Vercel deploys automatically.1217. Return the production URL and commit hash. If deployment cannot be verified, state that clearly rather than claiming success.122123## URL mapping124125For a file:126127```text128src/content/posts/projects/fire-detection/model-comparison.md129```130131the URL is:132133```text134https://bailixisu.com/posts/projects/fire-detection/model-comparison135```