457cbbd807aaea964fabe9802f9f8e7e10bdfa52
Implement the lint-owned part of the AI-readable documentation architecture (marqdo-lint#13 / marqdo#55 §13) without adding document language or a second parser. All rules read one public `check --emit` Analysis 3 projection. New rules (25 total): - MQD-ENTRY-001 (info): a manifest-backed or multi-module project entry is not `index.mq.md`; standalone single-file documents are never warned. - MQD-STRUCT-001 (info): the same canonical heading name appears under several parents (valid, but bare anchors get numbered suffixes); points at units[].name/path/heading_span. - MQD-REL-001 (info): a link resolves to a loaded module that the document did not import; states that links are static references, not imports/execution. Also records the release/platform contract for marqdo-lint#9/#14: Linux x86_64 is the only supported platform (real v0.2.0 assets + local gates); macOS/Windows stay UNVERIFIED/unsupported. Release assets and same-SHA CI requirements are frozen in docs/RELEASE.md; publication remains a maintainer action (this repo's CI only notifies the root reconcile). PROTOCOL_BASELINE now records the rc.6 candidate while keeping the rc.4+ accepted protocol floor for the still-rc.5 CI image (tracked by #11). No cross-repo dependency, no parser copy, no document syntax change.
marqdo-lint
marqdo-lint 是面向 Marqdo .mq.md 可执行文档的独立可读性检查工具。它只
消费当前公开协议:用一次 check --emit 取得 Analysis revision 3,用
modules[].document 作为 Markdown 容器,用 modules[].source 作为唯一源码,
检查分支、循环、链接、调用、叙述和说明的阅读质量。
当前基线
- 冻结 Marqdo
3.0.0-rc.4,源码452e9a32…,详见 协议基线 - Markdown Profile
marqdo.md.v1 - Analysis revision 3(当前字段集合)与 CLI Tool revision 1
- Rust 1.89 或更新版本
- Lint 版本
0.2.0
旧核心、旧 Analysis 字段集合和旧 Tool manifest 都会被明确拒绝,没有兼容 分支。
构建
cargo build --locked
运行测试时需要兼容的冻结核心,并通过 MARQDO_BIN 指定绝对路径。工具只
调用 --version 与一次 check ENTRY --json --emit PATH;inspect 不在
机器路径中。完整验收见 VALIDATION.md。
使用
marqdo-lint index.mq.md
marqdo-lint . --profile recommended --format json
marqdo-lint index.mq.md --refs
marqdo-lint explain MQD-BRANCH-001
marqdo-lint rules
marqdo-lint index.mq.md --fix safe --dry-run
marqdo-lint index.mq.md --fix safe
./scripts/package-tool.sh
marqdo tool install .cache/tool-bundle/tool.json
marqdo lint index.mq.md
直接运行时,MARQDO_BIN 可以指定冻结核心的绝对路径。工具默认从当前目录
读取 marqdo-lint.toml,也可使用 --config FILE。目录内有 index.mq.md
时从该入口加载项目,否则递归查找 .mq.md 文件。
默认 --fail-on warning。退出码 0 表示检查完成且低于门槛,1 表示达到
门槛或安全修复被拒绝,2 表示分析不可用、协议错误、配置或工具错误。JSON
报告格式见 命令参考,规则目录见 RULES.md。
Releases
2
marqdo-lint 0.2.0
Latest
Languages
Rust
94.2%
Python
5%
Shell
0.8%