ai-project-maintainer 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/ai-project-maintainer/agents/openai.yaml +6 -6
- package/ai-project-maintainer/references/ci-guardrails.md +55 -55
- package/ai-project-maintainer/references/database.md +60 -60
- package/ai-project-maintainer/references/electron-desktop.md +43 -43
- package/ai-project-maintainer/references/incident-response.md +52 -52
- package/ai-project-maintainer/references/security.md +48 -48
- package/ai-project-maintainer/references/tool-router.md +53 -53
- package/ai-project-maintainer/scripts/bootstrap-local-tools.ps1 +109 -109
- package/ai-project-maintainer/scripts/ci-smoke-gate.mjs +26 -26
- package/ai-project-maintainer/scripts/init-project.mjs +30 -18
- package/ai-project-maintainer/scripts/lib/check-registry.mjs +10 -9
- package/ai-project-maintainer/scripts/lib/checks.mjs +22 -10
- package/ai-project-maintainer/scripts/lib/command-runner.mjs +17 -3
- package/ai-project-maintainer/scripts/lib/policy.mjs +6 -4
- package/ai-project-maintainer/scripts/lib/report.mjs +56 -32
- package/assets/demo-90s-storyboard.svg +98 -0
- package/assets/demo-90s.gif +0 -0
- package/assets/social-preview.png +0 -0
- package/assets/social-preview.svg +55 -0
- package/docs/DEMO.md +68 -61
- package/docs/DEMO.zh-CN.md +75 -69
- package/docs/GITHUB-LAUNCH-CHECKLIST.md +11 -11
- package/docs/POLICY-AND-EXCEPTIONS.zh-CN.md +1 -1
- package/docs/PROMOTION.md +49 -21
- package/docs/SECURITY-WORKFLOW.md +61 -59
- package/docs/UPGRADE-ROADMAP.zh-CN.md +58 -58
- package/docs/demo-output/90-second-demo.html +187 -0
- package/docs/demo-output/before-after-case.md +91 -0
- package/docs/demo-output/security-report.md +62 -61
- package/docs/superpowers/plans/2026-06-29-ci-dogfooding.md +200 -200
- package/examples/demo-ai-app/.ai-maintainer/business-flows.yml +14 -14
- package/examples/demo-ai-app/.ai-maintainer/db-migration-policy.yml +6 -6
- package/examples/demo-ai-app/.ai-maintainer/evidence-sources.yml +18 -18
- package/examples/demo-ai-app/.ai-maintainer/exceptions.yml +1 -1
- package/examples/demo-ai-app/.ai-maintainer/incident-runbook.md +11 -11
- package/examples/demo-ai-app/.ai-maintainer/observability-checklist.yml +7 -7
- package/examples/demo-ai-app/.ai-maintainer/policy.yml +27 -27
- package/examples/demo-ai-app/.ai-maintainer/project-profile.yml +15 -15
- package/examples/demo-ai-app/.ai-maintainer/release-checklist.yml +7 -7
- package/examples/demo-ai-app/.ai-maintainer/risk-policy.yml +5 -5
- package/examples/demo-ai-app/.ai-maintainer/threat-model.md +18 -18
- package/examples/demo-ai-app/README.md +38 -38
- package/examples/demo-ai-app/package-lock.json +15 -15
- package/examples/demo-ai-app/package.json +16 -16
- package/examples/demo-ai-app/scripts/build.mjs +18 -18
- package/examples/demo-ai-app/scripts/create-before-state.mjs +86 -86
- package/examples/demo-ai-app/scripts/run-demo-gate.mjs +95 -95
- package/examples/demo-ai-app/src/order-risk.js +28 -28
- package/examples/demo-ai-app/test/order-risk.test.mjs +24 -24
- package/package.json +2 -1
package/docs/PROMOTION.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Promotion Kit
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use this after the repository has npm, CI, Security workflow, demo, license, social preview, and a release.
|
|
4
|
+
|
|
5
|
+
## Account Boundary
|
|
6
|
+
|
|
7
|
+
I can prepare posts, screenshots, demos, titles, and issue text. Posting to external communities still needs an account controlled by the maintainer.
|
|
8
|
+
|
|
9
|
+
You do not need every account on day one. Start with channels you can control:
|
|
10
|
+
|
|
11
|
+
- GitHub README
|
|
12
|
+
- GitHub Release
|
|
13
|
+
- npm package page
|
|
14
|
+
- direct link to the demo case
|
|
15
|
+
|
|
16
|
+
When you later create accounts for V2EX, Hacker News, Reddit, X/Twitter, Zhihu, or Juejin, reuse the drafts below.
|
|
4
17
|
|
|
5
18
|
## GitHub About
|
|
6
19
|
|
|
@@ -25,6 +38,15 @@ gitleaks
|
|
|
25
38
|
ai-agents
|
|
26
39
|
```
|
|
27
40
|
|
|
41
|
+
## Links To Share
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
45
|
+
npm: https://www.npmjs.com/package/ai-project-maintainer
|
|
46
|
+
Release: https://github.com/xixifusi1213-gif/ai-project-maintainer/releases/tag/v0.4.1
|
|
47
|
+
Demo case: https://github.com/xixifusi1213-gif/ai-project-maintainer/blob/main/docs/demo-output/before-after-case.md
|
|
48
|
+
```
|
|
49
|
+
|
|
28
50
|
## English Short Post
|
|
29
51
|
|
|
30
52
|
```text
|
|
@@ -32,9 +54,10 @@ I built AI Project Maintainer: a production-readiness gate for AI-coded projects
|
|
|
32
54
|
|
|
33
55
|
AI writes code fast, but shipping safely still needs tests, security checks, release evidence, monitoring gaps, and maintainer decisions.
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
The demo shows a broken before state, failing business tests, the fixed after state, a production gate report, and a green GitHub Security workflow.
|
|
36
58
|
|
|
37
59
|
GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
60
|
+
npm: https://www.npmjs.com/package/ai-project-maintainer
|
|
38
61
|
```
|
|
39
62
|
|
|
40
63
|
## Show HN
|
|
@@ -42,7 +65,7 @@ GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
|
42
65
|
Title:
|
|
43
66
|
|
|
44
67
|
```text
|
|
45
|
-
Show HN: AI Project Maintainer
|
|
68
|
+
Show HN: AI Project Maintainer - production-readiness gate for AI-coded projects
|
|
46
69
|
```
|
|
47
70
|
|
|
48
71
|
Body:
|
|
@@ -54,7 +77,9 @@ The idea is simple: AI can write code quickly, but the hard part is proving a pr
|
|
|
54
77
|
|
|
55
78
|
project profile -> audit plan -> local/CI gate -> evidence report -> AI fixes -> rerun
|
|
56
79
|
|
|
57
|
-
It wraps common tools like Gitleaks, Trivy, Semgrep, OSV-Scanner, Syft, Grype, actionlint,
|
|
80
|
+
It wraps common tools like Gitleaks, Trivy, Semgrep, OSV-Scanner, Syft, Grype, actionlint, and zizmor, but adds a production audit layer. It reports missing monitoring, release approval, database backup/rollback evidence, and business-flow test gaps as explicit GAP or USER_DECISION items.
|
|
81
|
+
|
|
82
|
+
The repo dogfoods itself with GitHub CI and a heavier Security workflow. There is also a runnable demo app showing a broken before state, failing business tests, the fixed after state, and the production gate report.
|
|
58
83
|
|
|
59
84
|
It is account-free by default. External APIs can be added later as optional user-provided evidence sources.
|
|
60
85
|
|
|
@@ -66,31 +91,29 @@ Feedback on the workflow and positioning would be very useful.
|
|
|
66
91
|
```text
|
|
67
92
|
我做了一个给 AI coding 项目的生产级半自动维护门禁:AI Project Maintainer。
|
|
68
93
|
|
|
69
|
-
|
|
94
|
+
AI 写代码很快,但上线前仍然需要业务测试、安全扫描、依赖审计、发布证据、监控告警、回滚策略和维护者判断。
|
|
95
|
+
|
|
96
|
+
这个工具把流程串成一条可重复链路:
|
|
70
97
|
|
|
71
|
-
流程是:
|
|
72
98
|
项目画像 -> 审计计划 -> 本地/CI 门禁 -> 证据报告 -> Codex 修阻断项 -> 重新运行
|
|
73
99
|
|
|
74
|
-
|
|
75
|
-
- 哪些检查通过了
|
|
76
|
-
- 哪些是阻断项
|
|
77
|
-
- 哪些生产证据缺失
|
|
78
|
-
- 哪些需要项目负责人判断
|
|
100
|
+
现在仓库已经有 npm 包、真实 demo、CI badge、Security workflow,并且 demo 展示了 before 状态测试失败、修复后通过、生产 gate 报告 GAP 的完整闭环。
|
|
79
101
|
|
|
80
102
|
GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
103
|
+
npm: https://www.npmjs.com/package/ai-project-maintainer
|
|
81
104
|
```
|
|
82
105
|
|
|
83
|
-
## V2EX / Zhihu Outline
|
|
106
|
+
## V2EX / Zhihu / Juejin Outline
|
|
84
107
|
|
|
85
108
|
```text
|
|
86
109
|
标题:我做了一个给 AI coding 项目的生产级半自动维护门禁
|
|
87
110
|
|
|
88
|
-
1. 背景:AI
|
|
111
|
+
1. 背景:AI 写代码变快后,维护、测试、安全和生产证据成了新的瓶颈。
|
|
89
112
|
2. 问题:个人开发者没有安全团队、SRE、DBA,但仍然要对上线负责。
|
|
90
113
|
3. 方案:把项目画像、审计计划、本地/CI 门禁和生产证据缺口串起来。
|
|
91
|
-
4. Demo:展示
|
|
114
|
+
4. Demo:展示 broken before state、业务测试失败、修复后通过、gate --production 报告。
|
|
92
115
|
5. 边界:不是绝对安全,不替代最终人工审计,不托管用户数据。
|
|
93
|
-
6.
|
|
116
|
+
6. 想要反馈:真实项目场景、缺失检查、误报、文档可读性、定位是否清楚。
|
|
94
117
|
```
|
|
95
118
|
|
|
96
119
|
## Reddit Targets
|
|
@@ -98,6 +121,7 @@ GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
|
98
121
|
- `r/SideProject`
|
|
99
122
|
- `r/programming`
|
|
100
123
|
- `r/github`
|
|
124
|
+
- `r/devops`
|
|
101
125
|
- `r/LocalLLaMA`
|
|
102
126
|
|
|
103
127
|
Suggested title:
|
|
@@ -108,9 +132,13 @@ I built a production-readiness gate for AI-coded projects
|
|
|
108
132
|
|
|
109
133
|
## Launch Checklist
|
|
110
134
|
|
|
111
|
-
- [
|
|
112
|
-
- [
|
|
113
|
-
- [
|
|
114
|
-
- [
|
|
115
|
-
- [
|
|
116
|
-
- [
|
|
135
|
+
- [x] GitHub About description updated.
|
|
136
|
+
- [x] Topics added.
|
|
137
|
+
- [x] Social preview uploaded.
|
|
138
|
+
- [x] npm package published.
|
|
139
|
+
- [x] CI badge is green.
|
|
140
|
+
- [x] Security badge is green.
|
|
141
|
+
- [x] Real demo link works.
|
|
142
|
+
- [x] Before/after case exists.
|
|
143
|
+
- [x] 90-second GIF exported from `docs/demo-output/90-second-demo.html`.
|
|
144
|
+
- [ ] First external post published by the maintainer.
|
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
# Heavy Security Workflow
|
|
2
|
-
|
|
3
|
-
`v0.4.
|
|
4
|
-
|
|
5
|
-
## When It Runs
|
|
6
|
-
|
|
7
|
-
- pull requests to `main`
|
|
8
|
-
- pushes to `main`
|
|
9
|
-
- weekly scheduled run
|
|
10
|
-
- manual `workflow_dispatch`
|
|
11
|
-
|
|
12
|
-
## Blocking Checks
|
|
13
|
-
|
|
14
|
-
The first version blocks on high-confidence failures:
|
|
15
|
-
|
|
16
|
-
- `npm test`
|
|
17
|
-
- `npm run check`
|
|
18
|
-
- `npm pack --dry-run`
|
|
19
|
-
- AI Project Maintainer production gate
|
|
20
|
-
- Gitleaks findings through the production gate
|
|
21
|
-
- Trivy high/critical findings through the production gate
|
|
22
|
-
- Semgrep blocking findings through the production gate
|
|
23
|
-
- actionlint failures through the production gate
|
|
24
|
-
|
|
25
|
-
## Advisory Evidence
|
|
26
|
-
|
|
27
|
-
The workflow also captures extra evidence and uploads it as an artifact:
|
|
28
|
-
|
|
29
|
-
- raw Gitleaks JSON
|
|
30
|
-
- raw Trivy JSON
|
|
31
|
-
- Semgrep SARIF
|
|
32
|
-
- OSV-Scanner text output
|
|
33
|
-
- Syft CycloneDX SBOM
|
|
34
|
-
- Grype JSON
|
|
35
|
-
- actionlint output
|
|
36
|
-
- zizmor output
|
|
37
|
-
- OpenSSF Scorecard JSON
|
|
38
|
-
- AI Project Maintainer JSON, Markdown, SARIF, and SBOM reports
|
|
39
|
-
|
|
1
|
+
# Heavy Security Workflow
|
|
2
|
+
|
|
3
|
+
`v0.4.1` keeps `.github/workflows/security.yml` as the repository's heavier dogfooding gate and pins scanner versions for more reproducible CI runs.
|
|
4
|
+
|
|
5
|
+
## When It Runs
|
|
6
|
+
|
|
7
|
+
- pull requests to `main`
|
|
8
|
+
- pushes to `main`
|
|
9
|
+
- weekly scheduled run
|
|
10
|
+
- manual `workflow_dispatch`
|
|
11
|
+
|
|
12
|
+
## Blocking Checks
|
|
13
|
+
|
|
14
|
+
The first version blocks on high-confidence failures:
|
|
15
|
+
|
|
16
|
+
- `npm test`
|
|
17
|
+
- `npm run check`
|
|
18
|
+
- `npm pack --dry-run`
|
|
19
|
+
- AI Project Maintainer production gate
|
|
20
|
+
- Gitleaks findings through the production gate
|
|
21
|
+
- Trivy high/critical findings through the production gate
|
|
22
|
+
- Semgrep blocking findings through the production gate
|
|
23
|
+
- actionlint failures through the production gate
|
|
24
|
+
|
|
25
|
+
## Advisory Evidence
|
|
26
|
+
|
|
27
|
+
The workflow also captures extra evidence and uploads it as an artifact:
|
|
28
|
+
|
|
29
|
+
- raw Gitleaks JSON
|
|
30
|
+
- raw Trivy JSON
|
|
31
|
+
- Semgrep SARIF
|
|
32
|
+
- OSV-Scanner text output
|
|
33
|
+
- Syft CycloneDX SBOM
|
|
34
|
+
- Grype JSON
|
|
35
|
+
- actionlint output
|
|
36
|
+
- zizmor output
|
|
37
|
+
- OpenSSF Scorecard JSON
|
|
38
|
+
- AI Project Maintainer JSON, Markdown, SARIF, and SBOM reports
|
|
39
|
+
|
|
40
40
|
Some advisory steps use `continue-on-error: true` because early public projects often need one or two runs to tune scanner baselines. The production gate remains the release decision.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
Scanner installers are pinned by environment variables in the workflow. Update those variables deliberately instead of relying on `@latest`.
|
|
43
|
+
|
|
44
|
+
## Why Not Block Everything Immediately
|
|
45
|
+
|
|
46
|
+
This project is a public tool, so a permanently red workflow hurts trust as much as missing checks. The v0.4.1 policy is:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
high-confidence release risk -> block
|
|
50
|
+
optional ecosystem signal -> report first
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Once the workflow has a stable baseline, optional checks can be promoted from warning to blocking in `.ai-maintainer/policy.yml`.
|
|
54
|
+
|
|
55
|
+
## Local Equivalent
|
|
56
|
+
|
|
57
|
+
The closest local command is:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
node .\ai-project-maintainer\scripts\run-local-gate.mjs . --production --strict --release --output reports/security-report.json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Install scanner CLIs first, or use `node .\ai-project-maintainer\scripts\doctor.mjs` to see what is missing.
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
# 升级路线图
|
|
2
|
-
|
|
3
|
-
## v0.4.0:真实 demo 项目和重型安全 workflow
|
|
4
|
-
|
|
5
|
-
本阶段目标是把项目可信度从“有说明、有轻量 CI”提升到“陌生人能直接跑 demo,并且仓库自己跑重型安全证据链”。
|
|
6
|
-
|
|
7
|
-
已完成目标:
|
|
8
|
-
|
|
9
|
-
- 新增可复现的 `examples/demo-ai-app`,展示健康项目、坏掉的 before 状态、生产审查报告。
|
|
10
|
-
- 新增独立 `.github/workflows/security.yml`,安装并运行 Gitleaks、Trivy、Semgrep、OSV-Scanner、Syft、Grype、actionlint、zizmor、OpenSSF Scorecard 等安全工具。
|
|
11
|
-
- README 增加 Security badge 和 Real Demo 入口。
|
|
12
|
-
- Demo 文档改成基于真实项目,而不是纯文本示例。
|
|
13
|
-
|
|
14
|
-
阻断策略:
|
|
15
|
-
|
|
16
|
-
- 高置信风险阻断:测试、build、secret、Trivy high/critical、Semgrep blocking、actionlint、production gate。
|
|
17
|
-
- 可选生态信号先记录证据:OSV、Syft、Grype、zizmor、Scorecard。
|
|
18
|
-
|
|
19
|
-
后续还可以补:
|
|
20
|
-
|
|
21
|
-
- 90 秒 GIF/视频,演示 `before -> gate -> fix -> pass`。
|
|
22
|
-
- GitHub PR comment,把报告摘要直接写到 PR。
|
|
23
|
-
- 把稳定的可选检查逐步提升为阻断项。
|
|
24
|
-
|
|
25
|
-
## V2:开源维护者专业半自动平台
|
|
26
|
-
|
|
27
|
-
当前目标:
|
|
28
|
-
|
|
29
|
-
- 提供 npm/npx CLI。
|
|
30
|
-
- 保留 Codex skill 和旧 Node 脚本兼容。
|
|
31
|
-
- 使用插件化检查注册表。
|
|
32
|
-
- 使用 `yaml@2.9.0` 解析真实 YAML 配置。
|
|
33
|
-
- 生成 GitHub Actions、Dependabot、pre-commit 起步配置。
|
|
34
|
-
- 生成 JSON、Markdown、SARIF、SBOM 报告。
|
|
35
|
-
- 提供开源维护分。
|
|
36
|
-
|
|
37
|
-
V2 仍然免账号优先,不依赖 Bytebase、云、K8s、Sentry 或 Grafana。
|
|
38
|
-
|
|
39
|
-
## V3:平台证据接入
|
|
40
|
-
|
|
41
|
-
可选接入:
|
|
42
|
-
|
|
43
|
-
- Bytebase:SQL Review、审批流、发布状态。
|
|
44
|
-
- Sentry/Grafana/Loki/Datadog:发布后错误率、日志、trace 和事故时间线。
|
|
45
|
-
- 云平台:IAM、网络、安全组、公开入口。
|
|
46
|
-
- Kubernetes:RBAC、NetworkPolicy、PodSecurity、镜像和运行时风险。
|
|
47
|
-
|
|
48
|
-
这些能力需要账号或只读 token,所以不作为默认硬依赖。
|
|
49
|
-
|
|
50
|
-
## 不做
|
|
51
|
-
|
|
52
|
-
默认不做:
|
|
53
|
-
|
|
54
|
-
- 自动修改生产数据库。
|
|
55
|
-
- 主动攻击公网目标。
|
|
56
|
-
- 自动承担发布责任。
|
|
57
|
-
- 把扫描器二进制提交进仓库。
|
|
58
|
-
- 用 AI 替代维护者的最终判断。
|
|
1
|
+
# 升级路线图
|
|
2
|
+
|
|
3
|
+
## v0.4.0:真实 demo 项目和重型安全 workflow
|
|
4
|
+
|
|
5
|
+
本阶段目标是把项目可信度从“有说明、有轻量 CI”提升到“陌生人能直接跑 demo,并且仓库自己跑重型安全证据链”。
|
|
6
|
+
|
|
7
|
+
已完成目标:
|
|
8
|
+
|
|
9
|
+
- 新增可复现的 `examples/demo-ai-app`,展示健康项目、坏掉的 before 状态、生产审查报告。
|
|
10
|
+
- 新增独立 `.github/workflows/security.yml`,安装并运行 Gitleaks、Trivy、Semgrep、OSV-Scanner、Syft、Grype、actionlint、zizmor、OpenSSF Scorecard 等安全工具。
|
|
11
|
+
- README 增加 Security badge 和 Real Demo 入口。
|
|
12
|
+
- Demo 文档改成基于真实项目,而不是纯文本示例。
|
|
13
|
+
|
|
14
|
+
阻断策略:
|
|
15
|
+
|
|
16
|
+
- 高置信风险阻断:测试、build、secret、Trivy high/critical、Semgrep blocking、actionlint、production gate。
|
|
17
|
+
- 可选生态信号先记录证据:OSV、Syft、Grype、zizmor、Scorecard。
|
|
18
|
+
|
|
19
|
+
后续还可以补:
|
|
20
|
+
|
|
21
|
+
- 90 秒 GIF/视频,演示 `before -> gate -> fix -> pass`。
|
|
22
|
+
- GitHub PR comment,把报告摘要直接写到 PR。
|
|
23
|
+
- 把稳定的可选检查逐步提升为阻断项。
|
|
24
|
+
|
|
25
|
+
## V2:开源维护者专业半自动平台
|
|
26
|
+
|
|
27
|
+
当前目标:
|
|
28
|
+
|
|
29
|
+
- 提供 npm/npx CLI。
|
|
30
|
+
- 保留 Codex skill 和旧 Node 脚本兼容。
|
|
31
|
+
- 使用插件化检查注册表。
|
|
32
|
+
- 使用 `yaml@2.9.0` 解析真实 YAML 配置。
|
|
33
|
+
- 生成 GitHub Actions、Dependabot、pre-commit 起步配置。
|
|
34
|
+
- 生成 JSON、Markdown、SARIF、SBOM 报告。
|
|
35
|
+
- 提供开源维护分。
|
|
36
|
+
|
|
37
|
+
V2 仍然免账号优先,不依赖 Bytebase、云、K8s、Sentry 或 Grafana。
|
|
38
|
+
|
|
39
|
+
## V3:平台证据接入
|
|
40
|
+
|
|
41
|
+
可选接入:
|
|
42
|
+
|
|
43
|
+
- Bytebase:SQL Review、审批流、发布状态。
|
|
44
|
+
- Sentry/Grafana/Loki/Datadog:发布后错误率、日志、trace 和事故时间线。
|
|
45
|
+
- 云平台:IAM、网络、安全组、公开入口。
|
|
46
|
+
- Kubernetes:RBAC、NetworkPolicy、PodSecurity、镜像和运行时风险。
|
|
47
|
+
|
|
48
|
+
这些能力需要账号或只读 token,所以不作为默认硬依赖。
|
|
49
|
+
|
|
50
|
+
## 不做
|
|
51
|
+
|
|
52
|
+
默认不做:
|
|
53
|
+
|
|
54
|
+
- 自动修改生产数据库。
|
|
55
|
+
- 主动攻击公网目标。
|
|
56
|
+
- 自动承担发布责任。
|
|
57
|
+
- 把扫描器二进制提交进仓库。
|
|
58
|
+
- 用 AI 替代维护者的最终判断。
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>AI Project Maintainer 90-second demo</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
color-scheme: dark;
|
|
10
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
11
|
+
background: #0f172a;
|
|
12
|
+
color: #f8fafc;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
min-height: 100vh;
|
|
18
|
+
display: grid;
|
|
19
|
+
place-items: center;
|
|
20
|
+
background:
|
|
21
|
+
radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.28), transparent 28rem),
|
|
22
|
+
linear-gradient(135deg, #0f172a 0%, #111827 52%, #134e4a 100%);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
main {
|
|
26
|
+
width: min(1120px, calc(100vw - 56px));
|
|
27
|
+
aspect-ratio: 16 / 9;
|
|
28
|
+
position: relative;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
border: 1px solid #334155;
|
|
31
|
+
border-radius: 24px;
|
|
32
|
+
background: rgba(17, 24, 39, 0.93);
|
|
33
|
+
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
header {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 48px 64px auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h1 {
|
|
42
|
+
margin: 0 0 10px;
|
|
43
|
+
font-size: 48px;
|
|
44
|
+
letter-spacing: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.subtitle {
|
|
48
|
+
margin: 0;
|
|
49
|
+
color: #bae6fd;
|
|
50
|
+
font-size: 24px;
|
|
51
|
+
font-weight: 700;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.slide {
|
|
55
|
+
position: absolute;
|
|
56
|
+
inset: 190px 64px 90px;
|
|
57
|
+
opacity: 0;
|
|
58
|
+
animation: show 90s linear infinite;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.slide:nth-of-type(1) { animation-delay: 0s; }
|
|
62
|
+
.slide:nth-of-type(2) { animation-delay: 15s; }
|
|
63
|
+
.slide:nth-of-type(3) { animation-delay: 30s; }
|
|
64
|
+
.slide:nth-of-type(4) { animation-delay: 45s; }
|
|
65
|
+
.slide:nth-of-type(5) { animation-delay: 60s; }
|
|
66
|
+
.slide:nth-of-type(6) { animation-delay: 75s; }
|
|
67
|
+
|
|
68
|
+
@keyframes show {
|
|
69
|
+
0%, 15% { opacity: 1; transform: translateY(0); }
|
|
70
|
+
16%, 100% { opacity: 0; transform: translateY(18px); }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
h2 {
|
|
74
|
+
margin: 0 0 28px;
|
|
75
|
+
font-size: 34px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
code, .terminal {
|
|
79
|
+
font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.terminal {
|
|
83
|
+
padding: 24px;
|
|
84
|
+
border: 1px solid #475569;
|
|
85
|
+
border-radius: 16px;
|
|
86
|
+
background: #020617;
|
|
87
|
+
color: #e5e7eb;
|
|
88
|
+
font-size: 22px;
|
|
89
|
+
line-height: 1.6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pass { color: #34d399; }
|
|
93
|
+
.fail { color: #fb7185; }
|
|
94
|
+
.gap { color: #fbbf24; }
|
|
95
|
+
.muted { color: #94a3b8; }
|
|
96
|
+
|
|
97
|
+
.progress {
|
|
98
|
+
position: absolute;
|
|
99
|
+
left: 64px;
|
|
100
|
+
right: 64px;
|
|
101
|
+
bottom: 44px;
|
|
102
|
+
height: 12px;
|
|
103
|
+
border-radius: 999px;
|
|
104
|
+
background: #334155;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.progress::before {
|
|
109
|
+
content: "";
|
|
110
|
+
display: block;
|
|
111
|
+
height: 100%;
|
|
112
|
+
background: #38bdf8;
|
|
113
|
+
transform-origin: left;
|
|
114
|
+
animation: progress 90s linear infinite;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@keyframes progress {
|
|
118
|
+
from { transform: scaleX(0); }
|
|
119
|
+
to { transform: scaleX(1); }
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
122
|
+
</head>
|
|
123
|
+
<body>
|
|
124
|
+
<main>
|
|
125
|
+
<header>
|
|
126
|
+
<h1>AI Project Maintainer</h1>
|
|
127
|
+
<p class="subtitle">90-second production-readiness demo for AI-coded projects</p>
|
|
128
|
+
</header>
|
|
129
|
+
|
|
130
|
+
<section class="slide">
|
|
131
|
+
<h2>1. Start with project profile</h2>
|
|
132
|
+
<div class="terminal">
|
|
133
|
+
npx ai-project-maintainer init-audit .\examples\demo-ai-app<br />
|
|
134
|
+
<span class="muted">project facts -> business flows -> evidence sources -> risk policy</span>
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
|
|
138
|
+
<section class="slide">
|
|
139
|
+
<h2>2. Before state: behavior is broken</h2>
|
|
140
|
+
<div class="terminal">
|
|
141
|
+
node .\examples\demo-ai-app\scripts\create-before-state.mjs<br />
|
|
142
|
+
<span class="fail">FAIL</span> expensive orders require manual review<br />
|
|
143
|
+
<span class="fail">FAIL</span> orders cannot release without stock
|
|
144
|
+
</div>
|
|
145
|
+
</section>
|
|
146
|
+
|
|
147
|
+
<section class="slide">
|
|
148
|
+
<h2>3. Fix deterministic blockers</h2>
|
|
149
|
+
<div class="terminal">
|
|
150
|
+
npm test --prefix .\examples\demo-ai-app<br />
|
|
151
|
+
<span class="pass">PASS</span> checkout quote preserves customer-visible total<br />
|
|
152
|
+
<span class="pass">PASS</span> order release respects payment, stock, and risk
|
|
153
|
+
</div>
|
|
154
|
+
</section>
|
|
155
|
+
|
|
156
|
+
<section class="slide">
|
|
157
|
+
<h2>4. Run production gate</h2>
|
|
158
|
+
<div class="terminal">
|
|
159
|
+
npx ai-project-maintainer gate . --production --strict --release<br />
|
|
160
|
+
<span class="pass">PASS</span> tests, build, secrets, dependencies, SAST, CI<br />
|
|
161
|
+
<span class="gap">GAP</span> approval, monitoring, logs, metrics, alerts
|
|
162
|
+
</div>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
165
|
+
<section class="slide">
|
|
166
|
+
<h2>5. Produce evidence report</h2>
|
|
167
|
+
<div class="terminal">
|
|
168
|
+
reports/security-report.json<br />
|
|
169
|
+
reports/security-report.md<br />
|
|
170
|
+
reports/security-report.sarif<br />
|
|
171
|
+
reports/sbom.cdx.json
|
|
172
|
+
</div>
|
|
173
|
+
</section>
|
|
174
|
+
|
|
175
|
+
<section class="slide">
|
|
176
|
+
<h2>6. Dogfood in GitHub Actions</h2>
|
|
177
|
+
<div class="terminal">
|
|
178
|
+
<span class="pass">CI: green</span><br />
|
|
179
|
+
<span class="pass">Security: green</span><br />
|
|
180
|
+
<span class="muted">Gitleaks / Trivy / Semgrep / OSV / Syft / Grype / actionlint / zizmor</span>
|
|
181
|
+
</div>
|
|
182
|
+
</section>
|
|
183
|
+
|
|
184
|
+
<div class="progress" aria-hidden="true"></div>
|
|
185
|
+
</main>
|
|
186
|
+
</body>
|
|
187
|
+
</html>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Before/After Case: Demo AI App
|
|
2
|
+
|
|
3
|
+
This case uses the real runnable project in `examples/demo-ai-app`.
|
|
4
|
+
|
|
5
|
+
It is intentionally small, but it exercises the complete maintenance loop:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
broken behavior -> test failure -> fixed behavior -> production gate -> evidence gaps -> CI security workflow
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Project
|
|
12
|
+
|
|
13
|
+
`examples/demo-ai-app` is a Node.js order-risk module with two business-critical rules:
|
|
14
|
+
|
|
15
|
+
- customer-visible totals must include shipping exactly once
|
|
16
|
+
- an order can be released only when payment, stock, and risk checks all pass
|
|
17
|
+
|
|
18
|
+
## Before
|
|
19
|
+
|
|
20
|
+
Generate a broken copy outside the repository:
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
node .\examples\demo-ai-app\scripts\create-before-state.mjs
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Run tests inside the printed temp directory:
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
npm test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Expected failures:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
FAIL expensive orders require manual review before release
|
|
36
|
+
FAIL orders are released only when payment, stock, and risk checks all pass
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This shows the exact problem the tool is meant to catch: AI-coded changes can look plausible while breaking release-critical behavior.
|
|
40
|
+
|
|
41
|
+
## After
|
|
42
|
+
|
|
43
|
+
Run the healthy project:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
npm test --prefix .\examples\demo-ai-app
|
|
47
|
+
npm run build --prefix .\examples\demo-ai-app
|
|
48
|
+
node .\examples\demo-ai-app\scripts\run-demo-gate.mjs
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Expected result:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
Local Security Gate: PASS_WITH_GAPS
|
|
55
|
+
Blocking Checks: None
|
|
56
|
+
Open Source Maintenance Score: 75/100 (B)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The gate still reports production evidence gaps:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
GAP Production release approval
|
|
63
|
+
GAP Error monitoring
|
|
64
|
+
GAP Production logs
|
|
65
|
+
GAP Production metrics
|
|
66
|
+
GAP Production alerts
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
That distinction is the core value:
|
|
70
|
+
|
|
71
|
+
- checked failures block release
|
|
72
|
+
- missing production evidence is visible
|
|
73
|
+
- maintainers keep ownership of business decisions
|
|
74
|
+
- Codex can fix deterministic blockers and rerun the gate
|
|
75
|
+
|
|
76
|
+
## GitHub Evidence
|
|
77
|
+
|
|
78
|
+
The repository dogfoods the workflow:
|
|
79
|
+
|
|
80
|
+
- CI workflow: tests, syntax checks, package validation, smoke gate
|
|
81
|
+
- Security workflow: Gitleaks, Trivy, Semgrep, OSV-Scanner, Syft, Grype, actionlint, zizmor, OpenSSF Scorecard, production gate
|
|
82
|
+
|
|
83
|
+
Use this case when posting about the project:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
I built a production-readiness gate for AI-coded projects.
|
|
87
|
+
|
|
88
|
+
The demo shows a broken AI-coded before state, failing business tests, the fixed after state, a production gate report, and a green GitHub Security workflow.
|
|
89
|
+
|
|
90
|
+
GitHub: https://github.com/xixifusi1213-gif/ai-project-maintainer
|
|
91
|
+
```
|