Skip to content

Commit 0893a77

Browse files
committed
Initial AI Coding docs site
0 parents  commit 0893a77

55 files changed

Lines changed: 6906 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v5
22+
- uses: actions/setup-node@v5
23+
with:
24+
node-version: 22
25+
cache: npm
26+
- run: npm ci
27+
- run: npm run build
28+
env:
29+
VITEPRESS_BASE: /aicoding/
30+
- uses: actions/upload-pages-artifact@v4
31+
with:
32+
path: docs/.vitepress/dist
33+
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- id: deployment
42+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
docs/.vitepress/cache/
3+
docs/.vitepress/dist/
4+
docs/public/markdown/
5+
.DS_Store
6+
!package-lock.json

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AI Coding
2+
3+
AI Coding 是一个面向 AI-native 软件工程的知识站,目标是把“AI 会写代码”升级成“团队能稳定交付软件”。
4+
5+
站点覆盖:
6+
7+
- AI Coding 心智模型与成熟度模型
8+
- PRD、任务切片、上下文工程、实现循环
9+
- Harness Engine:MCP、工具生态、Workflow Graph、安全、编排、多 Agent、人类门
10+
- AI-native 验收:Reviewer Swarm、Test Skeptic、安全红队、证据包、人类裁决
11+
- 架构治理、测试策略、安全、发布、可维护性
12+
- 团队角色、指标、工具选型
13+
- Prompt 模板、Reviewer JSON 契约、检查清单
14+
- 附录阅读笔记:Claude Code Best Practices、OpenAI Building Agents、LangChain Harness 分层等外部资料映射
15+
16+
## 本地开发
17+
18+
```bash
19+
npm install
20+
npm run dev
21+
```
22+
23+
## 构建
24+
25+
```bash
26+
npm run build
27+
```
28+
29+
静态站点输出到 `docs/.vitepress/dist`。GitHub Pages workflow 会在构建时设置 `VITEPRESS_BASE=/aicoding/`

docs/.vitepress/config.ts

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
const base = process.env.VITEPRESS_BASE || '/'
4+
5+
const nav = [
6+
{ text: '起步', link: '/guide/why-ai-coding' },
7+
{ text: '工作流', link: '/workflow/overview' },
8+
{ text: 'Harness', link: '/harness/overview' },
9+
{ text: '验收', link: '/acceptance/ai-native-acceptance' },
10+
{ text: '质量', link: '/quality/architecture' },
11+
{ text: '团队', link: '/team/operating-model' },
12+
{ text: '模板', link: '/reference/prompt-library' },
13+
{ text: '附录', link: '/appendix/claude-code-best-practices' },
14+
{ text: 'GitHub', link: 'https://github.com/limecloud/aicoding' }
15+
]
16+
17+
const sidebar = [
18+
{
19+
text: '起步',
20+
items: [
21+
{ text: '总览', link: '/' },
22+
{ text: '为什么需要 AI Coding 体系', link: '/guide/why-ai-coding' },
23+
{ text: 'AI Coding 操作系统', link: '/guide/operating-system' },
24+
{ text: '成熟度模型', link: '/guide/maturity-model' }
25+
]
26+
},
27+
{
28+
text: '工作流',
29+
items: [
30+
{ text: '全流程地图', link: '/workflow/overview' },
31+
{ text: '需求与任务切片', link: '/workflow/prd-and-slicing' },
32+
{ text: '上下文工程', link: '/workflow/context-engineering' },
33+
{ text: '实现循环', link: '/workflow/implementation-loop' },
34+
{ text: '人机协作协议', link: '/workflow/handoff-protocol' }
35+
]
36+
},
37+
{
38+
text: 'Harness Engine',
39+
items: [
40+
{ text: 'Harness 总览', link: '/harness/overview' },
41+
{ text: '业界模式整理', link: '/harness/industry-patterns' },
42+
{ text: 'AI Coding Harness 蓝图', link: '/harness/ai-coding-harness' }
43+
]
44+
},
45+
{
46+
text: 'AI-Native 验收',
47+
items: [
48+
{ text: '验收总览', link: '/acceptance/ai-native-acceptance' },
49+
{ text: 'Reviewer Swarm', link: '/acceptance/reviewer-swarm' },
50+
{ text: '测试审查', link: '/acceptance/test-skeptic' },
51+
{ text: '安全红队', link: '/acceptance/security-red-team' },
52+
{ text: '证据包与人类裁决', link: '/acceptance/evidence-and-human-arbiter' }
53+
]
54+
},
55+
{
56+
text: '工程质量',
57+
items: [
58+
{ text: '架构与治理', link: '/quality/architecture' },
59+
{ text: '测试策略', link: '/quality/testing-strategy' },
60+
{ text: '安全与权限', link: '/quality/security' },
61+
{ text: '发布、灰度与回滚', link: '/quality/release' },
62+
{ text: '可维护性', link: '/quality/maintainability' }
63+
]
64+
},
65+
{
66+
text: '团队落地',
67+
items: [
68+
{ text: '组织运行模型', link: '/team/operating-model' },
69+
{ text: '角色与职责', link: '/team/roles' },
70+
{ text: '度量指标', link: '/team/metrics' },
71+
{ text: '工具选型', link: '/team/tooling' }
72+
]
73+
},
74+
{
75+
text: '参考',
76+
items: [
77+
{ text: 'Prompt 模板库', link: '/reference/prompt-library' },
78+
{ text: 'AI Reviewer JSON 契约', link: '/reference/reviewer-contract' },
79+
{ text: '检查清单', link: '/reference/checklists' },
80+
{ text: '术语表', link: '/reference/glossary' }
81+
]
82+
},
83+
{
84+
text: '附录',
85+
items: [
86+
{ text: 'Harness 阅读地图', link: '/appendix/harness-reading-map' },
87+
{ text: 'Claude Code Best Practices 导读', link: '/appendix/claude-code-best-practices' },
88+
{ text: 'OpenAI Building Agents 导读', link: '/appendix/openai-building-agents-guide' },
89+
{ text: 'LangChain Harness 分层导读', link: '/appendix/langchain-framework-runtime-harness' }
90+
]
91+
}
92+
]
93+
94+
export default defineConfig({
95+
base,
96+
title: 'AI Coding',
97+
description: '面向 AI-native 软件工程的全流程知识站。',
98+
cleanUrls: true,
99+
lastUpdated: true,
100+
metaChunk: true,
101+
head: [
102+
['link', { rel: 'icon', href: `${base}favicon.svg` }],
103+
['meta', { name: 'theme-color', content: '#0f2f3d' }],
104+
['meta', { property: 'og:title', content: 'AI Coding' }],
105+
['meta', { property: 'og:description', content: '面向 AI-native 软件工程的全流程知识站。' }]
106+
],
107+
themeConfig: {
108+
logo: '/favicon.svg',
109+
siteTitle: 'AI Coding',
110+
nav,
111+
sidebar,
112+
search: { provider: 'local' },
113+
editLink: {
114+
pattern: 'https://github.com/limecloud/aicoding/edit/main/docs/:path',
115+
text: '在 GitHub 编辑本页'
116+
},
117+
footer: {
118+
message: 'AI-native software engineering playbook for teams that ship with coding agents.',
119+
copyright: 'Released for discussion and implementation.'
120+
},
121+
socialLinks: [
122+
{ icon: 'github', link: 'https://github.com/limecloud/aicoding' }
123+
]
124+
},
125+
markdown: {
126+
lineNumbers: true,
127+
config(md) {
128+
const defaultFence = md.renderer.rules.fence
129+
md.renderer.rules.fence = (tokens, idx, options, env, self) => {
130+
const token = tokens[idx]
131+
const language = token.info.trim().split(/\s+/)[0]
132+
133+
if (language === 'mermaid') {
134+
const encoded = encodeURIComponent(token.content)
135+
return `<ClientOnly><MermaidDiagram code="${encoded}" /></ClientOnly>`
136+
}
137+
138+
return defaultFence
139+
? defaultFence(tokens, idx, options, env, self)
140+
: self.renderToken(tokens, idx, options)
141+
}
142+
}
143+
}
144+
})
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<script setup lang="ts">
2+
import { computed, onMounted, ref, watch } from 'vue'
3+
import { useData } from 'vitepress'
4+
5+
const props = defineProps<{
6+
code: string
7+
}>()
8+
9+
const { isDark } = useData()
10+
const source = computed(() => decodeURIComponent(props.code))
11+
const svg = ref('')
12+
const error = ref('')
13+
let renderCount = 0
14+
15+
async function renderDiagram() {
16+
if (typeof window === 'undefined') return
17+
18+
try {
19+
error.value = ''
20+
const mermaid = (await import('mermaid')).default
21+
mermaid.initialize({
22+
startOnLoad: false,
23+
securityLevel: 'strict',
24+
theme: isDark.value ? 'dark' : 'default'
25+
})
26+
27+
renderCount += 1
28+
const id = `ai-coding-mermaid-${Date.now()}-${renderCount}`
29+
const result = await mermaid.render(id, source.value)
30+
svg.value = result.svg
31+
} catch (reason) {
32+
svg.value = ''
33+
error.value = reason instanceof Error ? reason.message : String(reason)
34+
}
35+
}
36+
37+
onMounted(renderDiagram)
38+
watch(() => props.code, renderDiagram)
39+
watch(isDark, renderDiagram)
40+
</script>
41+
42+
<template>
43+
<figure class="ac-mermaid">
44+
<div v-if="svg" class="ac-mermaid__canvas" v-html="svg" />
45+
<pre v-else class="ac-mermaid__fallback"><code>{{ source }}</code></pre>
46+
<figcaption v-if="error" class="ac-mermaid__error">Mermaid render failed: {{ error }}</figcaption>
47+
</figure>
48+
</template>

0 commit comments

Comments
 (0)