pipeline-ai 的 GitHub Pages 逐步互動指南:零建置的 AI 智能體治理文件
Step-by-Step Interactive Guide on GitHub Pages: Zero-Build Living Documentation for AI Agent Governance
pipeline-ai 建立並在 GitHub Pages 發佈逐步互動指南,以視覺方式説明 AI 智能體治理及確定性工作流程。指南以單一檔案製作,無需建置步驟或外部 CDN,並透過五個實例展示工程痛點;架構規則 D-46 則確保指南持續更新。
When building engineering tools for AI agents, you eventually hit a paradox: the more deterministic and well-engineered the architecture becomes, the harder it is to explain through a traditional README.md.
In pipeline-ai, we accumulated six in-depth technical articles, dozens of architectural decisions in docs-ai/DECISOES.md, 16 modular skills, and a unified pure-Go CLI featuring Bounded Output, Dual-Audience CLI, Gemini 4 Hydrogen Thinking Tier routing, a native govulncheck supply-chain sensor, and DORA telemetry. Everything was documented — yet trapped inside a static "wall of text."
To solve this, we built and published the pipeline-ai Step-by-Step Interactive Guide on GitHub Pages. In this 7th article of the series, we break down why we built it, its 100% self-contained zero-build architecture, the five real-world pain points it demonstrates visually, and how architectural rule D-46 keeps it permanently up to date.
1. The Static Documentation ("Wall of Text") Problem
Markdown is great for reference manuals, but it struggles when your goal is to build a fast mental model of deterministic workflows:
-
Invisible guardrails: Reading paragraphs about how a
PreToolUsehook blocks edits outside an active delivery or insideimmutable_pathsfeels abstract. Watching an agent attempt an edit, get intercepted by the hook, and only proceed afterdelivery openmakes the concept click in seconds. -
Abstract token savings: Saying that Bounded Output shrinks failure logs from
84 KBto1 KBis just a statistic. Visually comparing a flooded context window against a structured JSON payload withfailed_testsandtruncated: truemakes the value obvious. - Distance between theory and code: Engineers want to explore an idea interactively in two minutes before committing to a 15-minute article or cloning a repository.
We wanted a visual, step-by-step browser experience without introducing frontend bloat (Node.js, bundlers, JS frameworks, or external CDNs) into a repository whose core invariant is simplicity and zero external dependencies.
2. Architecture of the Guide (docs/interactive/index.html)
The entire guide lives inside a single self-contained file: docs/interactive/index.html (HTML + CSS + vanilla JS + inline SVG). It works identically whether hosted on GitHub Pages or opened locally via file:// with no web server.
Core Engineering Decisions
-
Zero Build Step & Zero CDNs:
- No
npm, Vite, React, or external fonts. All styling, state management, and animated SVG diagrams are embedded directly in the file. - This eliminates frontend supply-chain risk, keeps the repository 100% reproducible offline, and lets AI agents update the living guide as easily as editing a Markdown file.
- No
-
Desktop-First Layout with Persistent Sidebar & Responsive SVG:
- The lesson sidebar remains always visible on desktop for instant switching across all five pillars.
- The SVG stage uses fluid height (
clamp(210px, 42vh, 360px)), ensuring the animated diagram, step explanation, and navigation controls fit comfortably above the fold on both laptops and ultrawide monitors.
-
Reading Experience & Keyboard Ergonomics:
- Light / Dark Mode with user preference persistence.
-
Global Search (
⌘K/Ctrl+K): Instantly filters lessons, steps, technical terms, and CLI flags. -
Hash Routing (
#/01-governanca/1): Every lesson and step has a shareable deep link for PRs, issues, and architecture reviews. -
Dynamic Page Title (
document.title): Updates the browser tab title per active lesson. -
Keyboard Shortcuts:
←and→navigate steps,Spacetoggles autoplay, andRresets the current lesson.
3. Five Lessons & Real-World Pain Points Demonstrated
Each lesson starts with a real pain point in AI-assisted engineering and walks step by step through the deterministic pipeline-ai mechanism that solves it — linking directly to the deep-dive articles via the APROFUNDE-SE NO TEMA section:
| # | Lesson | Real Pain Point |
pipeline-ai Solution |
|---|---|---|---|
| 01 | Deterministic Governance (PreToolUse) |
Agents edit protected code without scope, tests, or role authorization. | Fail-closed PreToolUse hook enforcing active delivery TTL, editor_agents, and immutable_paths. |
| 02 | Bounded Output (84 KB → 1 KB) |
Verbose go test ./... logs overflow context windows and trigger hallucinations. |
Smart Test Filtering and deterministic truncation preserving failed_tests, truncated, and omitted_bytes. |
| 03 | Dual-Audience CLI (-dry-run / --schema) |
Human-only CLIs hang on stdin or force brittle regex parsing. |
-agent / -json mode, TTY detection, --schema introspection, Helpful Errors, and read-only -dry-run preview (D-47). |
| 04 | Gemini 4 Hydrogen Thinking Tiers | Routing every task to a single expensive model wastes quota and latency. |
model_routing matrix assigning low, medium, and high per skill + pure-Go Semantic Sensor (net/http). |
| 05 | Supply Chain (-vuln), Debt & DORA |
Silent vulnerabilities, forgotten shortcuts, and blind delivery pipelines. | Native govulncheck sensor (-vuln), pipeline-ai debt ledger, and DORA telemetry with HTML dashboard. |
4. Secure Continuous Deployment via GitHub Actions + GitHub Pages
Publishing to https://rodrigodosanjosoliveira.github.io/pipeline-ai/ is automated through .github/workflows/deploy-pages.yml (DEL-047), designed with least-privilege permissions (SEC-CI-01):
-
Path-scoped trigger: Runs only on pushes to
maintouchingdocs/interactive/**or the workflow file itself (plus manualworkflow_dispatch). -
Minimal explicit permissions: Strictly
contents: read,pages: write, andid-token: write. -
Clean artifact pipeline: Uploads
docs/interactivedirectly withactions/upload-pages-artifactand deploys viaactions/deploy-pages— no arbitrary build scripts or third-party packages on the runner.
5. Living Documentation Governed by Rule (D-46)
The biggest risk of any interactive guide is going stale two weeks after launch. In pipeline-ai, we solved this by making guide maintenance an enforced pipeline rule.
Architectural decision D-46 (recorded in docs-ai/DECISOES.md and embedded directly in .agents/skills/docs-update/SKILL.md) mandates:
Whenever a delivery introduces a user- or agent-facing feature worthy of demonstration, or publishes a new article in
docs-ai/artigos/, thedocs-updateagent must updateLESSONSandLESSON_ARTICLESindocs/interactive/index.html.
This paid off immediately in the very next delivery (DEL-048, -dry-run preview mode): docs-update automatically updated lesson 03-dual-audience and its references before opening the PR. The Interactive Guide is no longer a side project — it is a living artifact synchronized on every delivery.
Try It Now
- Live Interactive Guide: https://rodrigodosanjosoliveira.github.io/pipeline-ai/
- Open-Source Repository (MIT): https://github.com/rodrigodosanjosoliveira/pipeline-ai
-
Self-Contained File:
docs/interactive/index.html
來源:DEV Community · dev.to