Files
vibe-coding-cn/Makefile
T

142 lines
6.2 KiB
Makefile
Raw Normal View History

# Makefile for Vibe Coding Guide
.PHONY: help lint check-links check-details check-doc-structure check-directory-docs check-metadata check-gongfa test-gongfa check-ai-citation check-external-resources check-research-raw check-source-facts check-wiki fetch-research-raw sync-doc-toc build test clean clean-deps
.PHONY: sync-gongfa-catalog check-gongfa-catalog test-gongfa-catalog
.PHONY: sync-faqi-catalog check-faqi-catalog test-faqi-catalog test-details
2026-05-04 03:54:14 +08:00
MARKDOWNLINT = npx --yes markdownlint-cli@0.48.0
help:
@echo "Makefile for Vibe Coding Guide"
@echo ""
@echo "Available commands:"
@echo " help - Show this help message"
@echo " lint - Lint all markdown files"
@echo " check-links - Check local markdown links and anchors"
2026-05-03 22:21:18 +08:00
@echo " check-details - Check markdown details/summary blocks"
@echo " test-details - 验证代码围栏隔离与真实折叠错误拒绝行为"
@echo " check-doc-structure - Check docs README anchors, order and duplicate anchors"
2026-05-04 03:40:08 +08:00
@echo " check-directory-docs - Check required README/AGENTS pairs"
2026-05-04 00:14:13 +08:00
@echo " check-metadata - Check metadata paths and anchors"
@echo " check-gongfa - 校验功法JSON、冻结来源与评级协议"
@echo " test-gongfa - 执行功法JSON的隔离CLI集成测试并保留工件"
@echo " sync-gongfa-catalog - 从当前登记与仓内候选快照重建唯一总表"
@echo " check-gongfa-catalog - 只读校验总表覆盖、源摘要与Markdown/Excel一致性"
@echo " test-gongfa-catalog - 验证总表维护行为并保留隔离工件"
@echo " sync-faqi-catalog - 重建法器总分类、依赖图对象与外部资源视图"
@echo " check-faqi-catalog - 校验总登记、依赖图SHA、来源与只读视图"
@echo " test-faqi-catalog - 验证总表维护并保留隔离工件"
2026-08-04 15:42:06 +08:00
@echo " check-ai-citation - Check AI citation paths, anchors, and repository identity"
@echo " check-external-resources - Check local external resources registry"
@echo " check-research-raw - Check research raw fact snapshots and repository clones"
@echo " check-source-facts - Check external source-fact mirrors and provenance"
2026-05-17 13:15:05 +08:00
@echo " check-wiki - Check local GitHub Wiki checkout when present"
@echo " fetch-research-raw - Fetch raw GitHub facts and repository clones for research domains"
@echo " sync-doc-toc - Regenerate docs fine-grained TOC blocks"
2026-05-02 03:55:45 +08:00
@echo " build - Verify knowledge base has no build step"
@echo " test - Run repository quality gates"
@echo " clean - Remove ignored generated caches"
@echo " clean-deps - Remove local dependency caches"
@echo ""
2026-05-04 03:54:14 +08:00
lint:
@echo "Linting markdown files..."
@$(MARKDOWNLINT) --config .github/lint_config.json --ignore .history --ignore .github/tools/external --ignore '.github/research/**/raw/repository/**' --ignore '.github/research/facts/**' --ignore '.github/research/vibe-cybersecurity-cn/**' --ignore '.github/research/vibe-harness-cn/**' --ignore '.github/research/vibe-mathing-cn-public/**' '**/*.md' '.github/assets/**/*.md' '.github/docs/**/*.md' '.github/metadata/**/*.md' '.github/prompts/**/*.md' '.github/research/**/*.md' '.github/scripts/**/*.md' '.github/skills/**/*.md' '.github/tools/**/*.md'
2026-05-02 03:55:45 +08:00
check-links:
@echo "Checking local markdown links and anchors..."
@python3 .github/scripts/check-local-links.py
2026-05-03 22:21:18 +08:00
check-details:
@echo "Checking markdown details/summary blocks..."
@python3 .github/scripts/check-markdown-details.py
2026-05-03 22:21:18 +08:00
test-details:
@echo "执行 Markdown 代码围栏与折叠块 CLI 回归..."
@python3 .github/scripts/test-markdown-details.py
check-doc-structure:
@echo "Checking docs README structure..."
@python3 .github/scripts/check-doc-structure.py
2026-05-04 03:40:08 +08:00
check-directory-docs:
@echo "Checking required directory README/AGENTS pairs..."
@python3 .github/scripts/check-directory-docs.py
2026-05-04 03:40:08 +08:00
2026-05-04 00:14:13 +08:00
check-metadata:
@echo "Checking metadata paths and anchors..."
@python3 .github/scripts/check-metadata.py
2026-05-04 00:14:13 +08:00
check-gongfa:
@echo "校验功法JSON、冻结来源与评级引用..."
@python3 .github/scripts/check-gongfa.py
test-gongfa:
@echo "执行功法JSON CLI集成测试..."
@python3 .github/scripts/test-gongfa.py
sync-gongfa-catalog:
@python3 .github/scripts/sync-gongfa-catalog.py --write
check-gongfa-catalog:
@python3 .github/scripts/sync-gongfa-catalog.py --check
test-gongfa-catalog:
@python3 .github/scripts/test-gongfa-catalog.py
sync-faqi-catalog:
@python3 .github/scripts/sync-faqi-catalog.py --write
check-faqi-catalog:
@python3 .github/scripts/sync-faqi-catalog.py --check
test-faqi-catalog:
@python3 .github/scripts/test-faqi-catalog.py
check-ai-citation:
2026-08-04 15:42:06 +08:00
@echo "Checking AI citation paths, anchors, and repository identity..."
@python3 .github/scripts/check-ai-citation.py
check-external-resources:
@echo "Checking local external resources registry..."
@python3 .github/scripts/check-external-resources.py
check-research-raw:
@echo "Checking research raw fact snapshots and repository clones..."
@python3 .github/scripts/check-research-raw.py
check-source-facts:
@echo "Checking external source-fact mirrors and provenance..."
@python3 .github/scripts/check-source-facts.py
2026-05-17 13:15:05 +08:00
check-wiki:
@echo "Checking local GitHub Wiki checkout..."
@python3 .github/scripts/check-wiki.py --wiki-dir "$${WIKI_DIR:-/tmp/vibe-coding-cn.wiki}"
2026-05-17 13:15:05 +08:00
@$(MARKDOWNLINT) --config .github/lint_config.json "$${WIKI_DIR:-/tmp/vibe-coding-cn.wiki}"/*.md
fetch-research-raw:
@echo "Fetching raw GitHub facts and repository clones for research domains..."
@python3 .github/scripts/fetch-research-raw.py
sync-doc-toc:
@echo "Regenerating docs fine-grained TOC blocks..."
@python3 .github/scripts/sync-doc-toc.py
2026-05-02 03:55:45 +08:00
build:
@echo "No build step: this repository is a documentation and knowledge-base project."
test: lint check-links check-details test-details check-doc-structure check-directory-docs check-metadata check-gongfa test-gongfa check-gongfa-catalog test-gongfa-catalog check-faqi-catalog test-faqi-catalog check-ai-citation check-external-resources check-research-raw check-source-facts
2026-05-02 03:55:45 +08:00
@echo "Quality gates complete."
clean: clean-deps
2026-05-02 03:55:45 +08:00
@echo "Cleaning ignored generated caches..."
@find . -type d -name '__pycache__' -prune -exec rm -rf {} +
@rm -rf .github/tools/prompts-library/prompt_jsonl
@echo "Cleanup complete."
clean-deps:
@echo "Cleaning local dependency caches..."
@rm -rf node_modules
@echo "Dependency cleanup complete."