ag-docs
Trigger keywords: docs, README, document codebase, ADR, architectural decision, decision record, design doc, architecture record, RFC, request for comments, architectural proposal, system design. Skill for analyzing codebase, managing project documentation, creating/validating Architectural Decision Records (ADRs), Request for Comments (RFCs), and System Design Docs.
- License 许可
- MIT
- 最近更新
- 2026-08-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ag-docs
- layer
- helper
- description
- Trigger keywords: docs, README, document codebase, ADR, architectural decision, decision record, design doc, architecture record, RFC, request for comments, architectural proposal, system design. Skill for analyzing codebase, managing project documentation, creating/validating Architectural Decision Records (ADRs), Request for Comments (RFCs), and System Design Docs.
- trigger_keywords
- docs
02 资源文件 12
- 参考文档references/adr-layout.md2.0 KB
- 参考文档references/design-doc-layout.md3.6 KB
- 参考文档references/init-workflow.md2.0 KB
- 参考文档references/rfc-layout.md2.2 KB
- 参考文档references/summarize-workflow.md915 B
- 参考文档references/update-workflow.md2.8 KB
- 参考文档references/workflow-documentation-standard.md9.6 KB
- 脚本scripts/validate-adrs.mjs3.4 KB
- 脚本scripts/validate-design-docs.mjs2.6 KB
- 脚本scripts/validate-docs.mjs1.4 KB
- 脚本scripts/validate-rfcs.mjs3.3 KB
- 脚本scripts/validate-workflow-docs.mjs4.2 KB
03 SKILL.md 正文
Documentation, ADR, RFC & Design Management (ag-docs)
When to Apply
Use this skill when working with ag-docs workflows, tasks, or system specifications.
How to Use
Refer to the workflow instructions and command references detailed below. Analyze codebase and manage project documentation, Architectural Decision Records (ADRs), Request for Comments (RFCs), and System Design Specifications through scouting, structured doc generation, and automated validation.
Default (No Arguments)
If invoked without arguments, present available documentation operations:
| Operation | Description |
|---|---|
init |
Analyze codebase & create initial docs |
update |
Analyze changes & update docs |
summarize |
Quick codebase summary |
adr |
Create or validate Architectural Decision Records (ADRs) |
rfc |
Create or validate Request for Comments (RFCs) |
design |
Create or validate System Design Docs |
workflow |
Create or validate SSOT Operational Workflows |
Subcommands
| Subcommand | Reference | Purpose |
|---|---|---|
/ag-docs init |
references/init-workflow.md |
Analyze codebase and create initial documentation |
/ag-docs update |
references/update-workflow.md |
Analyze codebase and update existing documentation |
/ag-docs summarize |
references/summarize-workflow.md |
Quick analysis and update of codebase summary |
/ag-docs adr |
references/adr-layout.md |
Create or validate Architectural Decision Records (ADRs) |
/ag-docs rfc |
references/rfc-layout.md |
Create or validate Request for Comments (RFC proposals) |
/ag-docs design |
references/design-doc-layout.md |
Create or validate System Design Specifications |
/ag-docs workflow |
references/workflow-documentation-standard.md |
Create or validate SSOT Operational Workflows (WBS/Mermaid) |
Routing
Parse $ARGUMENTS first word:
init→ Loadreferences/init-workflow.mdupdate→ Loadreferences/update-workflow.mdsummarize→ Loadreferences/summarize-workflow.mdadr→ Loadreferences/adr-layout.mdand manage ADRs underdocs/adr/rfc→ Loadreferences/rfc-layout.mdand manage RFCs underdocs/rfc/design→ Loadreferences/design-doc-layout.mdand manage Design Docs underdocs/design/workflow→ Loadreferences/workflow-documentation-standard.mdand manage SSOT Workflow Specs underdocs/design/
Automated Validation Scripts
To run all documentation validation suites (ADRs, RFCs, and Design/Workflow Docs) in parallel:
bun run .claude/skills/ag-docs/scripts/validate-docs.mjs
To validate individual documentation types for standard formatting, run:
bun run .claude/skills/ag-docs/scripts/validate-adrs.mjs
To validate all RFC files in the repository for standard formatting, run:
bun run .claude/skills/ag-docs/scripts/validate-rfcs.mjs
To validate all System Design Documents in the repository for standard formatting, run:
bun run .claude/skills/ag-docs/scripts/validate-design-docs.mjs
To validate all SSOT Workflow Documents (per workflow-documentation-standard.md) for standard formatting, run:
bun run .claude/skills/ag-docs/scripts/validate-workflow-docs.mjs
Shared Context
For this repo, durable agent-facing documentation lives in process/context/, not ./docs.
Read process/context/all-context.md first to choose the relevant root file or context group.
Use audit-context after adding, moving, splitting, or grouping context files.
Feature & Infrastructure Workflow Documentation
For generating feature workflow specifications or infrastructure audit guides (with WBS tables, sequence diagrams, and defense-in-depth security), load references/workflow-documentation-standard.md or use /ag-docs workflow.
References
- references/adr-layout.md - Architectural Decision Record layout specification.
- references/rfc-layout.md - Request for Comments proposal layout specification.
- references/design-doc-layout.md - System Design layout specification.
- references/workflow-documentation-standard.md - SSOT Workflow Documentation Standard.
04 同仓库更多 Skills
zustand
Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.
zod
Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.
upstash-ratelimit
Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.
ui-design
UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.
typescript
TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.
typescript-refactor
TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).