Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/facts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Ecosystem facts

on:
pull_request:
paths:
- "facts/**"
- "profile/README.md"
- "scripts/validate-facts.mjs"
- "tests/**"
- ".github/workflows/facts.yml"
push:
branches: [main]
paths:
- "facts/**"
- "profile/README.md"
- "scripts/validate-facts.mjs"
- "tests/**"
- ".github/workflows/facts.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20
- name: Test contracts
run: node --test tests/*.test.mjs
- name: Validate facts and profile
run: node scripts/validate-facts.mjs
26 changes: 21 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# 参与 md2wechat 文档与生态维护

先选择问题所属项目。一个 Pull Request 只处理一类问题,方便核验和回滚。
先选择问题所属项目。一个 Pull Request 只处理一个仓库中的一类可回滚问题。

| 修改内容 | 提交位置 |
|---|---|
| CLI 行为、渲染、安装脚本、Release | [geekjourneyx/md2wechat-skill](https://github.com/geekjourneyx/md2wechat-skill) |
| 使用步骤、命令示例、故障说明 | [md2wechat-guide](https://github.com/md2wechat/md2wechat-guide) |
| 生态项目收录、状态或证据 | [awesome-wechat-markdown](https://github.com/md2wechat/awesome-wechat-markdown) |
| 术语、事实来源、核验状态 | [md2wechat-wiki](https://github.com/md2wechat/md2wechat-wiki) |
| 组织主页和入口链接 | [md2wechat/.github](https://github.com/md2wechat/.github) |
| 产品角色、Canonical URL、组织主页 | [md2wechat/.github](https://github.com/md2wechat/.github) |

## 三类权威事实

- 运行时能力来自 `geekjourneyx/md2wechat-skill` 的 Release、精确 tag 和 JSON Discovery。
- 产品角色与 URL 来自 [`facts/product-routes.json`](facts/product-routes.json)。
- 平台兼容状态将在 Wiki 的 `evidence/agent-platforms.json` 合并后受其约束;在此之前,不能根据安装格式或搜索摘要自行宣布支持。

消费这些事实的仓库必须保存 `.md2wechat/ecosystem-facts.lock.json`,锁定三个来源的 40 位 commit SHA。更新 lock 时,在 PR 中列出旧 SHA、新 SHA、上游链接和受影响的公开声明。自动化只能更新明确标记的机器事实块,不能自动重写解释性正文或合并 PR。

## 提交事实更正

Expand All @@ -20,12 +28,20 @@
4. 受影响的页面。
5. 如果涉及外部项目,说明你与该项目的关系。

搜索摘要、转述文章和模型回答不能单独作为事实来源。
搜索摘要、转述文章和模型回答不能单独作为事实来源。Convert API 只负责 Markdown 到微信兼容 HTML 的转换;Publishing API 才包含素材和草稿副作用。平台记录超过复核期后必须降级,不能继续宣传为已支持。

## 本仓库验证

```bash
node --test tests/*.test.mjs
node scripts/validate-facts.mjs
git diff --check
```

## 文风
## 文风与安全

- 直接说明行为、条件和结果。
- 对比内容写明测试条件和局限。
- 不使用无证据评分、排名或用户数量。
- 不添加固定推广段落。
- 不公开任何凭证、Cookie 或未发布内容。
- 不公开任何凭证、Cookie、草稿 ID 或未发布内容。
70 changes: 70 additions & 0 deletions facts/product-routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"schemaVersion": 1,
"reviewedAt": "2026-09-04",
"brand": {
"name": "md2wechat",
"category": "Agent 原生的微信公众号排版与发布基础设施",
"coreDefinition": "面向 AI Agent 的微信公众号创作与发布 CLI"
},
"products": {
"cli": {
"role": "core-product",
"entry": "https://github.com/geekjourneyx/md2wechat-skill",
"createsDraft": true
},
"skill": {
"role": "core-product",
"entry": "https://github.com/geekjourneyx/md2wechat-skill",
"createsDraft": true
},
"convertApi": {
"role": "service",
"entry": "https://www.md2wechat.cn/api-docs",
"endpoint": "https://www.md2wechat.cn/api/convert",
"createsDraft": false
},
"publishingApi": {
"role": "service",
"entry": "https://md2wechat.com/api/v1",
"endpoint": "https://md2wechat.com/api/v1",
"createsDraft": true
},
"onlineEditor": {
"role": "interactive-client",
"entry": "https://www.md2wechat.cn",
"createsDraft": false
}
},
"ecosystem": {
"guide": "https://github.com/md2wechat/md2wechat-guide",
"wiki": "https://github.com/md2wechat/md2wechat-wiki",
"awesome": "https://github.com/md2wechat/awesome-wechat-markdown",
"templates": "https://github.com/md2wechat/md2wechat-templates"
},
"intents": [
{
"intent": "wechat-formatting-api",
"path": "/api-docs"
},
{
"intent": "wechat-publishing-api",
"path": "/wechat-publishing-api"
},
{
"intent": "wechat-formatting-skill",
"path": "/docs/md2wechat/skill"
},
{
"intent": "office-agent-integrations",
"path": "/integrations"
},
{
"intent": "markdown-to-wechat-draft",
"path": "/workflows/markdown-to-wechat-draft"
}
],
"forbiddenPaths": [
"/wechat-formatting-api",
"/wechat-formatting-skill"
]
}
35 changes: 35 additions & 0 deletions facts/schemas/ecosystem-lock.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/md2wechat/.github/raw/main/facts/schemas/ecosystem-lock.schema.json",
"title": "md2wechat downstream ecosystem facts lock",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "reviewedAt", "sources"],
"properties": {
"schemaVersion": { "const": 1 },
"reviewedAt": { "type": "string", "format": "date" },
"sources": {
"type": "object",
"additionalProperties": false,
"required": ["runtime", "products", "platforms"],
"properties": {
"runtime": { "$ref": "#/$defs/source" },
"products": { "$ref": "#/$defs/source" },
"platforms": { "$ref": "#/$defs/source" }
}
}
},
"$defs": {
"source": {
"type": "object",
"additionalProperties": false,
"required": ["repository", "path", "sha", "schemaVersion"],
"properties": {
"repository": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
"path": { "type": "string", "minLength": 1 },
"sha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
"schemaVersion": { "type": ["integer", "string"] }
}
}
}
}
119 changes: 119 additions & 0 deletions facts/schemas/product-routes.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/md2wechat/.github/raw/main/facts/schemas/product-routes.schema.json",
"title": "md2wechat product and route authority",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"reviewedAt",
"brand",
"products",
"ecosystem",
"intents",
"forbiddenPaths"
],
"properties": {
"schemaVersion": { "const": 1 },
"reviewedAt": { "type": "string", "format": "date" },
"brand": {
"type": "object",
"additionalProperties": false,
"required": ["name", "category", "coreDefinition"],
"properties": {
"name": { "const": "md2wechat" },
"category": { "type": "string", "minLength": 1 },
"coreDefinition": { "type": "string", "minLength": 1 }
}
},
"products": {
"type": "object",
"additionalProperties": false,
"required": ["cli", "skill", "convertApi", "publishingApi", "onlineEditor"],
"properties": {
"cli": {
"$ref": "#/$defs/product",
"properties": {
"role": { "const": "core-product" },
"createsDraft": { "const": true }
}
},
"skill": {
"$ref": "#/$defs/product",
"properties": {
"role": { "const": "core-product" },
"createsDraft": { "const": true }
}
},
"convertApi": {
"$ref": "#/$defs/product",
"required": ["endpoint"],
"properties": {
"role": { "const": "service" },
"endpoint": { "const": "https://www.md2wechat.cn/api/convert" },
"createsDraft": { "const": false }
}
},
"publishingApi": {
"$ref": "#/$defs/product",
"required": ["endpoint"],
"properties": {
"role": { "const": "service" },
"endpoint": { "const": "https://md2wechat.com/api/v1" },
"createsDraft": { "const": true }
}
},
"onlineEditor": {
"$ref": "#/$defs/product",
"properties": {
"role": { "const": "interactive-client" },
"createsDraft": { "const": false }
}
}
}
},
"ecosystem": {
"type": "object",
"additionalProperties": false,
"required": ["guide", "wiki", "awesome", "templates"],
"properties": {
"guide": { "$ref": "#/$defs/httpsUrl" },
"wiki": { "$ref": "#/$defs/httpsUrl" },
"awesome": { "$ref": "#/$defs/httpsUrl" },
"templates": { "$ref": "#/$defs/httpsUrl" }
}
},
"intents": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["intent", "path"],
"properties": {
"intent": { "type": "string", "pattern": "^[a-z0-9-]+$" },
"path": { "type": "string", "pattern": "^/" }
}
}
},
"forbiddenPaths": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "pattern": "^/" }
}
},
"$defs": {
"httpsUrl": { "type": "string", "format": "uri", "pattern": "^https://" },
"product": {
"type": "object",
"additionalProperties": false,
"required": ["role", "entry", "createsDraft"],
"properties": {
"role": { "enum": ["core-product", "service", "interactive-client"] },
"entry": { "$ref": "#/$defs/httpsUrl" },
"endpoint": { "$ref": "#/$defs/httpsUrl" },
"createsDraft": { "type": "boolean" }
}
}
}
}
Loading
Loading