Skill: Write AsciiDoc Documentation
This skill guides you through creating documentation following standards. You will plan structure, write content with proper voice, add styled figures using the design system, and validate the result.
The workflow ensures consistent, professional documentation that follows 's human, clear, and direct voice.
Prerequisites
- Topic or files to document identified
- Understanding of target audience
- Access to _design/figures/ directory for images
Overview
- Plan document structure (using -doc-writer)
- Set up document header
- Write content following voice guidelines
- Add figures with design system styling
- Include code with proper tags
- Add icons for visual grouping
- Validate (using -doc-reviewer)
Step 1: Plan Structure
Invoke -doc-writer for an outline based on topic and audience.
Action
Determine:
- Target audiences (architect, developer, operations, etc.)
- Main sections needed
- Figures required
- Code examples to include
Step 2: Set Up Document Header
Every document starts with this header:
:author_name: Mario Toffia
:author_email: mario.toffia@.com
:author: {author_name}
:email: {author_email}
:source-highlighter: highlightjs
:toc:
:toc-title: Table of Contents
:toclevels: 4
:homepage: www..com
:stem: latexmath
ifndef::doctype[:doctype: book]
ifndef::icons[:icons: font]
ifndef::imagesdir[:imagesdir: ../../../meta/assets]
Adjust imagesdir relative path based on depth from project root.
Step 3: Write Content
Follow voice guidelines strictly.
Voice Guidelines
Voice Characteristics:
- Human, clear, calm, direct
- Specific and grounded
- Use I/you/we naturally
- Assume the reader is competent
Use:
- Clean verbs and nouns
- Straightforward statements
- Mix of sentence lengths. Short ones work.
- Concrete details over abstractions
Words to Avoid
AI-ish Vocabulary:
align, enhance, delve, foster, emphasize, highlight, underscore, pivotal, intricate, leverage, streamline, robust, seamless, holistic, synergy, utilize, facilitate, optimize, empower, ecosystem
Vague Qualifiers:
plain, fine, actually, truly, deeply, really, certainly, definitely, essentially, fundamentally, basically
Weakening Adverbs:
even, just, simply, merely, quite, rather, somewhat
Flourish Patterns:
- "from X to Y" patterns
- Rule-of-three padding
- "not only...but also..."
Meta Commentary to Avoid
- "Let's walk through..."
- "Below is..."
- "In this section we will..."
- "As mentioned above..."
Structure Rules
- State facts. Move on.
- No disclaimers or hedging unless requested
- No overexplaining or restating the obvious
- No moralizing or "wisdom" lines
Editing Priorities
- Remove padding
- Remove vague fillers
- Keep meaning intact while tightening wording
- Maintain professional but human voice
Example Transformations
Bad:
In this section, we will delve into the intricacies of the configuration system, which plays a pivotal role in ensuring seamless integration.
Good:
The configuration system controls how components connect.
Bad:
It's actually quite important to understand that the system truly leverages robust patterns.
Good:
The system uses established patterns.
Step 4: Add Figures
Create or include figures following the design system.
Design System Colors
Primary Colors
| Color |
Hex |
RGB |
Usage |
| Deep Blue |
#05289E |
5, 40, 158 |
Primary actions, headers, links, charts, emphasis text |
| Lime Green |
#CBFF9E |
203, 255, 158 |
Success states, CTAs, accent backgrounds, highlights |
| Navy |
#0F1729 |
15, 23, 41 |
Primary text, dark surfaces, tooltips, hero backgrounds |
| Coral |
#FC7246 |
252, 114, 70 |
Warnings, warm highlights (use sparingly) |
Extended Green Scale
| Color |
Hex |
RGB |
Usage |
| Forest |
#0d2818 |
13, 40, 24 |
Deep hero backgrounds, premium feel |
| Dark Green |
#1a3a2f |
26, 58, 47 |
Hero sections, dark cards, headers |
| Sage |
#2d5a47 |
45, 90, 71 |
Secondary buttons on dark, hover states |
| Mint |
#e8f5e9 |
232, 245, 233 |
Light environmental accents |
Neutral Colors
| Color |
Hex |
Usage |
| White |
#FFFFFF |
Primary background surface |
| Light Gray |
#F8FAFC |
Cards, secondary surfaces, sidebar |
| Border |
#E2E8F0 |
Dividers, borders, separators |
| Light Blue |
#E8EBFF |
Info backgrounds, hover states, selected items |
| Text Primary |
#0F1729 |
Main body text |
| Text Secondary |
#64748B |
Captions, labels, secondary text |
| Text Tertiary |
#94A3B8 |
Placeholder text, disabled states |
Chart Color Sequence
Use colors in this order for data visualizations (max 4 colors per chart):
- #05289E (Deep Blue) — Primary data
- #CBFF9E (Lime Green) — Accent/highlight
- #1a3a2f (Dark Green) — Secondary data
- #FC7246 (Coral) — Warning/attention
- #E8EBFF (Light Blue) — Tertiary data
Color Rules
Do:
- Always use white backgrounds as primary surface
- Use #05289E for emphasis text on white backgrounds
- Use solid colors only (no gradients except hero sections)
- Maintain 4.5:1 contrast ratio for text (WCAG AA)
- Use red (#EF4444) only for error states
- Combine dark green with lime green for energy themes
Don't:
- Never use lime green (#CBFF9E) as text on white — unreadable (1.5:1 contrast)
- Never use red as a brand color
- Never use more than 4 colors per visualization
- Never use heavy shadows (max: 0 8px 24px rgba(0,0,0,0.08))
- Never mix forest green with coral in the same element
Figure Location
- Store in
_design/figures/ (same level as overview.adoc)
- Output SVGs go to
<project-root>/meta/assets/figures/<package>/
Supported Figure Formats
| Extension |
Tool |
Best For |
| .mmd |
Mermaid |
Flowcharts, sequence, class, state, ER, Gantt, pie |
| .blockdiag |
BlockDiag |
Simple block diagrams, network diagrams |
| .nomnoml |
Nomnoml |
UML-style class diagrams, simple and clean |
| .bytefield |
Bytefield |
Binary protocol layouts, packet structures |
| .drawio |
diagrams.net |
Complex diagrams, UI mockups, network topologies |
| .excalidraw |
Excalidraw |
Hand-drawn style, architecture sketches, whiteboards |
Prefer simple ASCII-based formats (mermaid, blockdiag, nomnoml). Use excalidraw or drawio for complex visuals.
Image Macro Format
.The Event Processing Flow
image::figures/<package>/<name>.svg[width=100%,height=100%, opts=inline]
Required attributes:
width=100% — scales to container width
height=100% — maintains aspect ratio
opts=inline — embeds SVG for proper rendering
Example:
.The Event Processing Flow
image::figures/cbanalytics/event-processing-flow.svg[width=100%,height=100%, opts=inline]
Generate SVGs with make docs-generate in the _design folder.
Step 5: Include Code
Use tags for code inclusion, never generate inline Go code.
Tag Format in Go Files
// tag::example[]
func Example() {
// code here
}
// end::example[]
Include in AsciiDoc
[source,go]
----
include::path/to/file.go[tag=example]
----
Code Blocks with Callouts
[source,go]
----
func Process(ctx context.Context, msg Message) error {
if err := validate(msg); err != nil { // <1>
return err
}
return handle(ctx, msg) // <2>
}
----
<1> Validate input before processing.
<2> Delegate to handler after validation.
Rules
- Never generate Go code inline in .adoc files
- Always include from actual source files
- JSON, XML, and YAML may be inline
- If code is missing, create it in tests/xyz_example_test.go, tag it, then include
Step 6: Add Icons
Use icons for visual grouping and to underline functionality.
Icon Legend
| Icon |
Meaning |
Usage |
| 💡 |
Idea/Suggestion |
Ideas, feature proposals, feedback |
| 💭 |
Thought/Collection |
Idea sources, collection phase |
| 📥 |
Incoming |
Incoming requests, submissions |
| 📋 |
Backlog/List |
Backlogs, GitHub issues, task lists |
| 🔍 |
Search/Investigation |
Duplicate detection, pre-study, investigation |
| 📊 |
Analytics/Data |
Product Owner, roadmap, metrics |
| 🎨 |
Design |
Design phase, UI/UX |
| ✅ |
Complete/Ready |
Qualification, done states, approvals |
| ⚙️ |
Engineering |
In progress, development, technical work |
| 🧪 |
Testing |
QA, test environments, staging |
| 📦 |
Package/Release |
Ready for release |
| 🚀 |
Deploy/Launch |
Released, deployment |
| 🔄 |
Cycle/Sync |
Sprints, CI/CD, sync operations |
| 👤 |
Person/Role |
Individual roles, owners |
| 👥 |
Group/Team |
Stakeholders, teams |
| 🎫 |
Ticket/Support |
Support L1, tickets |
| 🔧 |
Technical/L2 |
Support L2, installers, technical |
| 📚 |
Knowledge |
Knowledge base, documentation |
| 🐛 |
Bug |
Bug reports, defects |
| 🚦 |
Feature Flags |
Gradual rollout, flags |
| ☁️ |
Cloud |
GCP, infrastructure |
| 📤 |
Send/Report |
Report back, notifications |
| ⬆️ |
Escalate |
Escalation paths |
| 👀 |
Review |
Code review, PR review, validation |
| 📅 |
Schedule/Planning |
Sprint planning, calendar events |
| ☀️ |
Daily/Morning |
Daily standup, recurring meetings |
| 🎬 |
Demo/Presentation |
Sprint review, demos, presentations |
| ⚖️ |
Balance/Allocation |
Capacity allocation, trade-offs |
| 🏷️ |
Labels/Tags |
Item types, categories, labels |
| 🧩 |
Feature/Component |
Feature items, puzzle pieces |
| 🔬 |
Research |
Investigation, spikes, proof of concept |
| 📄 |
Document |
Documentation items, files |
| 🌐 |
Global/Live |
Feature live, all users, worldwide |
| 🧹 |
Cleanup |
Tech debt cleanup, flag removal |
| 💻 |
Coding |
Implementation, development work |
| 📈 |
Growth/Metrics |
Metrics check, improvement trends |
| ⏪ |
Rollback |
Rollback, revert, undo |
| ▶️ |
Start |
Start state, begin process |
| 🔗 |
Integration |
Integration points, connections |
Step 7: Target Audiences
Use ifdef/endif to scope content to specific audiences.
Available Targets
| Keyword |
Description |
When to Use |
| target-architect |
Architect |
System design, component relationships, patterns |
| target-developer |
Developer |
Implementation details, APIs, code examples |
| target-operations |
DevOps/Operations |
Deployment, monitoring, configuration |
| target-system |
System Design |
Cross-cutting concerns, integration points |
| target-business |
Business |
Business logic, requirements, workflows |
| target-provider |
Provider |
Provider implementations in /go-services/providers/ |
| target-test |
Tester |
Test strategies, fixtures, coverage |
Usage Examples
Single target:
ifdef::target-architect[]
== Architecture Overview
This section covers...
endif::target-architect[]
Multiple targets:
ifdef::target-architect,target-operations[]
== Deployment Architecture
...
endif::target-architect,target-operations[]
Nested:
ifdef::target-architect,target-developer[]
ifdef::target-developer[]
== API Reference
endif::target-developer[]
ifdef::target-architect[]
=== Design Rationale
...
endif::target-architect[]
ifdef::target-developer[]
== Other Dev Info
endif::target-developer[]
endif::target-architect,target-developer[]
When nested, all audiences that are nested must be included in the outer scope.
Makefile Usage
@${ASCIIDOCTOR} ${ASCIIDOC_PRE} \
-a target-architect \
-a target-developer \
./overview.adoc \
-o ${DOCS}/package.html
Step 8: Document Organization
Location and Naming
- Package documentation lives in
_design/ subfolder
- Main document:
overview.adoc — contains package overview chapter and includes sub-documents
- Sub-documents included with
include::sub-doc.adoc[leveloffset=+1]
Makefile
Place in _design/ folder:
# Include document generation targets
# docs-generate:
include ../../../docs_meta.mk
docs:
@mkdir -p ${DOCS}
@echo "build <package>"
@${ASCIIDOCTOR} ${ASCIIDOC_PRE} \
-a <target1> \
-a <target2> \
./overview.adoc \
-o ${DOCS}/<package>.html
Replace <package> with actual package name (e.g., cbanalytics). The -a flags specify target audiences. Do not change the first two lines.
Includes
- No
xref or link macros. Use include:: with [leveloffset=+1] instead.
- Look for tag markers in source files for code inclusion.
Admonitions
Use NOTE:, TIP:, CAUTION:, WARNING:, IMPORTANT: where appropriate.
Step 9: Validate
Invoke -doc-reviewer to validate the documentation.
Action
Use -doc-reviewer to check:
- Voice compliance (no AI-ish vocabulary)
- Structure (no meta commentary)
- Format (proper AsciiDoc syntax)
- Figures (design system colors)
- Code blocks (uses includes)
Address any issues identified.
Step 10: File Size Check
Ensure documentation files stay manageable.
Rules
- Maximum 500 lines per file
- Check with
wc -l <file>.adoc
- Split large files using
include:: directives
Typography Reference
Use Inter font as the primary typeface. Fallback to system fonts.
Type Scale
| Style |
Size |
Weight |
Line Height |
Color |
Usage |
| Section Label |
11px |
600 |
1.4 |
#05289E |
Uppercase, letter-spacing: 1.5px |
| Hero Headline |
36-52px |
700 |
1.1 |
#0F1729 or white |
Page headers |
| Section Title |
24-32px |
700 |
1.2 |
#0F1729 |
Section headers |
| Card Title |
18px |
600 |
1.3 |
#0F1729 |
Card headers |
| Body Text |
14-16px |
400 |
1.6-1.7 |
#0F1729 or #64748B |
Paragraphs |
| Caption |
12-13px |
400 |
1.5 |
#64748B |
Labels, metadata |
| Big Numbers/KPIs |
32-96px |
700 |
1.0 |
#05289E |
Metrics display |
Data Visualization Guidelines
Bar Charts
- Bar Fill: #05289E (primary), #CBFF9E (highlight), #1a3a2f (secondary)
- Corner Radius: 4px top corners only
- Grid Lines: #E2E8F0 dashed 1px, horizontal only
- Axis Labels: 11px #64748B
- Bar Gap: Proportional to bar width (8-16px)
Line & Area Charts
- Line Stroke: #05289E 2px, smooth curves
- Area Fill: rgba(5, 40, 158, 0.1) (10% opacity)
- Data Points: #05289E 4px radius circles
- Secondary Lines: Use chart color sequence
Pie & Donut Charts
- Donut Inner Radius: 0.618 ratio (golden ratio)
- Angular Inset: 1px gap between segments
- Max Segments: 4 (group smaller values as "Other")
- Stroke Width: 24px for donut
Gauges & Progress Bars
- Track Color: #E2E8F0
- Progress Stroke Width: 8-14px
- Stroke Linecap: round
- Value Typography: 32px bold #0F1729
- Label Typography: 12px #64748B
Chart Tooltips
- Background: #0F1729
- Text: White
- Border Radius: 6px
- Padding: 8px 12px (compact), 12px 16px (detailed)
- Box Shadow: 0 4px 12px rgba(0,0,0,0.15)
Accessibility Requirements
Contrast Requirements (WCAG AA)
- Normal text: minimum 4.5:1
- Large text (18px+ or 14px bold): minimum 3:1
- UI components: minimum 3:1
Contrast Examples
| Combination |
Ratio |
Status |
| Blue on White |
8.5:1 |
Pass |
| Navy on White |
16.7:1 |
Pass |
| Forest on White |
12.3:1 |
Pass |
| Navy on Green |
12.1:1 |
Pass |
| Green on White |
1.5:1 |
Fail |
Accessibility Rules
- Never rely on color alone to convey information
- All form inputs must have visible, associated labels
- Provide visible focus indicators for keyboard navigation
- Support screen readers with proper ARIA labels
Verification Checklist
1---2name: skill-asciidoc-documentation3description: Write AsciiDoc documentation with style and design system4---5
6# Skill: Write AsciiDoc Documentation
7
8This skill guides you through creating documentation following standards. You will plan structure, write content with proper voice, add styled figures using the design system, and validate the result.
9
10The workflow ensures consistent, professional documentation that follows 's human, clear, and direct voice.
11
12## Prerequisites
13
14- Topic or files to document identified
15- Understanding of target audience
16- Access to _design/figures/ directory for images
17
18## Overview
19
201. Plan document structure (using -doc-writer)
212. Set up document header
223. Write content following voice guidelines
234. Add figures with design system styling
245. Include code with proper tags
256. Add icons for visual grouping
267. Validate (using -doc-reviewer)
27
28## Step 1: Plan Structure
29
30Invoke -doc-writer for an outline based on topic and audience.
31
32### Action
33
34Determine:
35- Target audiences (architect, developer, operations, etc.)
36- Main sections needed
37- Figures required
38- Code examples to include
39
40## Step 2: Set Up Document Header
41
42Every document starts with this header:
43
44```asciidoc
45:author_name: Mario Toffia
46:author_email: mario.toffia@.com
47:author: {author_name}
48:email: {author_email}
49:source-highlighter: highlightjs
50:toc:
51:toc-title: Table of Contents
52:toclevels: 4
53:homepage: www..com
54:stem: latexmath
55ifndef::doctype[:doctype: book]
56ifndef::icons[:icons: font]
57ifndef::imagesdir[:imagesdir: ../../../meta/assets]
58```
59
60Adjust `imagesdir` relative path based on depth from project root.
61
62## Step 3: Write Content
63
64Follow voice guidelines strictly.
65
66### Voice Guidelines
67
68**Voice Characteristics:**
69- Human, clear, calm, direct
70- Specific and grounded
71- Use I/you/we naturally
72- Assume the reader is competent
73
74**Use:**
75- Clean verbs and nouns
76- Straightforward statements
77- Mix of sentence lengths. Short ones work.
78- Concrete details over abstractions
79
80### Words to Avoid
81
82**AI-ish Vocabulary:**
83align, enhance, delve, foster, emphasize, highlight, underscore, pivotal, intricate, leverage, streamline, robust, seamless, holistic, synergy, utilize, facilitate, optimize, empower, ecosystem
84
85**Vague Qualifiers:**
86plain, fine, actually, truly, deeply, really, certainly, definitely, essentially, fundamentally, basically
87
88**Weakening Adverbs:**
89even, just, simply, merely, quite, rather, somewhat
90
91**Flourish Patterns:**
92- "from X to Y" patterns
93- Rule-of-three padding
94- "not only...but also..."
95
96### Meta Commentary to Avoid
97
98- "Let's walk through..."
99- "Below is..."
100- "In this section we will..."
101- "As mentioned above..."
102
103### Structure Rules
104
105- State facts. Move on.
106- No disclaimers or hedging unless requested
107- No overexplaining or restating the obvious
108- No moralizing or "wisdom" lines
109
110### Editing Priorities
111
1121. Remove padding
1132. Remove vague fillers
1143. Keep meaning intact while tightening wording
1154. Maintain professional but human voice
116
117### Example Transformations
118
119Bad:
120> In this section, we will delve into the intricacies of the configuration system, which plays a pivotal role in ensuring seamless integration.
121
122Good:
123> The configuration system controls how components connect.
124
125Bad:
126> It's actually quite important to understand that the system truly leverages robust patterns.
127
128Good:
129> The system uses established patterns.
130
131## Step 4: Add Figures
132
133Create or include figures following the design system.
134
135### Design System Colors
136
137#### Primary Colors
138
139| Color | Hex | RGB | Usage |
140|-------|-----|-----|-------|
141| Deep Blue | #05289E | 5, 40, 158 | Primary actions, headers, links, charts, emphasis text |
142| Lime Green | #CBFF9E | 203, 255, 158 | Success states, CTAs, accent backgrounds, highlights |
143| Navy | #0F1729 | 15, 23, 41 | Primary text, dark surfaces, tooltips, hero backgrounds |
144| Coral | #FC7246 | 252, 114, 70 | Warnings, warm highlights (use sparingly) |
145
146#### Extended Green Scale
147
148| Color | Hex | RGB | Usage |
149|-------|-----|-----|-------|
150| Forest | #0d2818 | 13, 40, 24 | Deep hero backgrounds, premium feel |
151| Dark Green | #1a3a2f | 26, 58, 47 | Hero sections, dark cards, headers |
152| Sage | #2d5a47 | 45, 90, 71 | Secondary buttons on dark, hover states |
153| Mint | #e8f5e9 | 232, 245, 233 | Light environmental accents |
154
155#### Neutral Colors
156
157| Color | Hex | Usage |
158|-------|-----|-------|
159| White | #FFFFFF | Primary background surface |
160| Light Gray | #F8FAFC | Cards, secondary surfaces, sidebar |
161| Border | #E2E8F0 | Dividers, borders, separators |
162| Light Blue | #E8EBFF | Info backgrounds, hover states, selected items |
163| Text Primary | #0F1729 | Main body text |
164| Text Secondary | #64748B | Captions, labels, secondary text |
165| Text Tertiary | #94A3B8 | Placeholder text, disabled states |
166
167#### Chart Color Sequence
168
169Use colors in this order for data visualizations (max 4 colors per chart):
1701. #05289E (Deep Blue) — Primary data
1712. #CBFF9E (Lime Green) — Accent/highlight
1723. #1a3a2f (Dark Green) — Secondary data
1734. #FC7246 (Coral) — Warning/attention
1745. #E8EBFF (Light Blue) — Tertiary data
175
176#### Color Rules
177
178**Do:**
179- Always use white backgrounds as primary surface
180- Use #05289E for emphasis text on white backgrounds
181- Use solid colors only (no gradients except hero sections)
182- Maintain 4.5:1 contrast ratio for text (WCAG AA)
183- Use red (#EF4444) only for error states
184- Combine dark green with lime green for energy themes
185
186**Don't:**
187- Never use lime green (#CBFF9E) as text on white — unreadable (1.5:1 contrast)
188- Never use red as a brand color
189- Never use more than 4 colors per visualization
190- Never use heavy shadows (max: 0 8px 24px rgba(0,0,0,0.08))
191- Never mix forest green with coral in the same element
192
193### Figure Location
194
195- Store in `_design/figures/` (same level as overview.adoc)
196- Output SVGs go to `<project-root>/meta/assets/figures/<package>/`
197
198### Supported Figure Formats
199
200| Extension | Tool | Best For |
201|-----------|------|----------|
202| .mmd | Mermaid | Flowcharts, sequence, class, state, ER, Gantt, pie |
203| .blockdiag | BlockDiag | Simple block diagrams, network diagrams |
204| .nomnoml | Nomnoml | UML-style class diagrams, simple and clean |
205| .bytefield | Bytefield | Binary protocol layouts, packet structures |
206| .drawio | diagrams.net | Complex diagrams, UI mockups, network topologies |
207| .excalidraw | Excalidraw | Hand-drawn style, architecture sketches, whiteboards |
208
209Prefer simple ASCII-based formats (mermaid, blockdiag, nomnoml). Use excalidraw or drawio for complex visuals.
210
211### Image Macro Format
212
213```asciidoc
214.The Event Processing Flow
215image::figures/<package>/<name>.svg[width=100%,height=100%, opts=inline]
216```
217
218Required attributes:
219- `width=100%` — scales to container width
220- `height=100%` — maintains aspect ratio
221- `opts=inline` — embeds SVG for proper rendering
222
223Example:
224
225```asciidoc
226.The Event Processing Flow
227image::figures/cbanalytics/event-processing-flow.svg[width=100%,height=100%, opts=inline]
228```
229
230Generate SVGs with `make docs-generate` in the `_design` folder.
231
232## Step 5: Include Code
233
234Use tags for code inclusion, never generate inline Go code.
235
236### Tag Format in Go Files
237
238```go
239// tag::example[]
240func Example() {
241 // code here
242}
243// end::example[]
244```
245
246### Include in AsciiDoc
247
248```asciidoc
249[source,go]
250----
251include::path/to/file.go[tag=example]
252----
253```
254
255### Code Blocks with Callouts
256
257```asciidoc
258[source,go]
259----
260func Process(ctx context.Context, msg Message) error {
261 if err := validate(msg); err != nil { // <1>
262 return err
263 }
264 return handle(ctx, msg) // <2>
265}
266----
267<1> Validate input before processing.
268<2> Delegate to handler after validation.
269```
270
271### Rules
272
273- Never generate Go code inline in .adoc files
274- Always include from actual source files
275- JSON, XML, and YAML may be inline
276- If code is missing, create it in tests/xyz_example_test.go, tag it, then include
277
278## Step 6: Add Icons
279
280Use icons for visual grouping and to underline functionality.
281
282### Icon Legend
283
284| Icon | Meaning | Usage |
285|------|---------|-------|
286| 💡 | Idea/Suggestion | Ideas, feature proposals, feedback |
287| 💭 | Thought/Collection | Idea sources, collection phase |
288| 📥 | Incoming | Incoming requests, submissions |
289| 📋 | Backlog/List | Backlogs, GitHub issues, task lists |
290| 🔍 | Search/Investigation | Duplicate detection, pre-study, investigation |
291| 📊 | Analytics/Data | Product Owner, roadmap, metrics |
292| 🎨 | Design | Design phase, UI/UX |
293| ✅ | Complete/Ready | Qualification, done states, approvals |
294| ⚙️ | Engineering | In progress, development, technical work |
295| 🧪 | Testing | QA, test environments, staging |
296| 📦 | Package/Release | Ready for release |
297| 🚀 | Deploy/Launch | Released, deployment |
298| 🔄 | Cycle/Sync | Sprints, CI/CD, sync operations |
299| 👤 | Person/Role | Individual roles, owners |
300| 👥 | Group/Team | Stakeholders, teams |
301| 🎫 | Ticket/Support | Support L1, tickets |
302| 🔧 | Technical/L2 | Support L2, installers, technical |
303| 📚 | Knowledge | Knowledge base, documentation |
304| 🐛 | Bug | Bug reports, defects |
305| 🚦 | Feature Flags | Gradual rollout, flags |
306| ☁️ | Cloud | GCP, infrastructure |
307| 📤 | Send/Report | Report back, notifications |
308| ⬆️ | Escalate | Escalation paths |
309| 👀 | Review | Code review, PR review, validation |
310| 📅 | Schedule/Planning | Sprint planning, calendar events |
311| ☀️ | Daily/Morning | Daily standup, recurring meetings |
312| 🎬 | Demo/Presentation | Sprint review, demos, presentations |
313| ⚖️ | Balance/Allocation | Capacity allocation, trade-offs |
314| 🏷️ | Labels/Tags | Item types, categories, labels |
315| 🧩 | Feature/Component | Feature items, puzzle pieces |
316| 🔬 | Research | Investigation, spikes, proof of concept |
317| 📄 | Document | Documentation items, files |
318| 🌐 | Global/Live | Feature live, all users, worldwide |
319| 🧹 | Cleanup | Tech debt cleanup, flag removal |
320| 💻 | Coding | Implementation, development work |
321| 📈 | Growth/Metrics | Metrics check, improvement trends |
322| ⏪ | Rollback | Rollback, revert, undo |
323| ▶️ | Start | Start state, begin process |
324| 🔗 | Integration | Integration points, connections |
325
326## Step 7: Target Audiences
327
328Use ifdef/endif to scope content to specific audiences.
329
330### Available Targets
331
332| Keyword | Description | When to Use |
333|---------|-------------|-------------|
334| target-architect | Architect | System design, component relationships, patterns |
335| target-developer | Developer | Implementation details, APIs, code examples |
336| target-operations | DevOps/Operations | Deployment, monitoring, configuration |
337| target-system | System Design | Cross-cutting concerns, integration points |
338| target-business | Business | Business logic, requirements, workflows |
339| target-provider | Provider | Provider implementations in /go-services/providers/ |
340| target-test | Tester | Test strategies, fixtures, coverage |
341
342### Usage Examples
343
344Single target:
345
346```asciidoc
347ifdef::target-architect[]
348== Architecture Overview
349This section covers...
350endif::target-architect[]
351```
352
353Multiple targets:
354
355```asciidoc
356ifdef::target-architect,target-operations[]
357== Deployment Architecture
358...
359endif::target-architect,target-operations[]
360```
361
362Nested:
363
364```asciidoc
365ifdef::target-architect,target-developer[]
366ifdef::target-developer[]
367== API Reference
368endif::target-developer[]
369
370ifdef::target-architect[]
371=== Design Rationale
372...
373endif::target-architect[]
374ifdef::target-developer[]
375== Other Dev Info
376endif::target-developer[]
377
378endif::target-architect,target-developer[]
379```
380
381When nested, all audiences that are nested must be included in the outer scope.
382
383### Makefile Usage
384
385```makefile
386@${ASCIIDOCTOR} ${ASCIIDOC_PRE} \
387 -a target-architect \
388 -a target-developer \
389 ./overview.adoc \
390 -o ${DOCS}/package.html
391```
392
393## Step 8: Document Organization
394
395### Location and Naming
396
397- Package documentation lives in `_design/` subfolder
398- Main document: `overview.adoc` — contains package overview chapter and includes sub-documents
399- Sub-documents included with `include::sub-doc.adoc[leveloffset=+1]`
400
401### Makefile
402
403Place in `_design/` folder:
404
405```makefile
406# Include document generation targets
407# docs-generate:
408include ../../../docs_meta.mk
409
410docs:
411 @mkdir -p ${DOCS}
412 @echo "build <package>"
413 @${ASCIIDOCTOR} ${ASCIIDOC_PRE} \
414 -a <target1> \
415 -a <target2> \
416 ./overview.adoc \
417 -o ${DOCS}/<package>.html
418```
419
420Replace `<package>` with actual package name (e.g., `cbanalytics`). The -a flags specify target audiences. Do not change the first two lines.
421
422### Includes
423
424- No `xref` or `link` macros. Use `include::` with `[leveloffset=+1]` instead.
425- Look for tag markers in source files for code inclusion.
426
427### Admonitions
428
429Use `NOTE:`, `TIP:`, `CAUTION:`, `WARNING:`, `IMPORTANT:` where appropriate.
430
431## Step 9: Validate
432
433Invoke -doc-reviewer to validate the documentation.
434
435### Action
436
437Use -doc-reviewer to check:
438- Voice compliance (no AI-ish vocabulary)
439- Structure (no meta commentary)
440- Format (proper AsciiDoc syntax)
441- Figures (design system colors)
442- Code blocks (uses includes)
443
444Address any issues identified.
445
446## Step 10: File Size Check
447
448Ensure documentation files stay manageable.
449
450### Rules
451
452- Maximum 500 lines per file
453- Check with `wc -l <file>.adoc`
454- Split large files using `include::` directives
455
456## Typography Reference
457
458Use Inter font as the primary typeface. Fallback to system fonts.
459
460### Type Scale
461
462| Style | Size | Weight | Line Height | Color | Usage |
463|-------|------|--------|-------------|-------|-------|
464| Section Label | 11px | 600 | 1.4 | #05289E | Uppercase, letter-spacing: 1.5px |
465| Hero Headline | 36-52px | 700 | 1.1 | #0F1729 or white | Page headers |
466| Section Title | 24-32px | 700 | 1.2 | #0F1729 | Section headers |
467| Card Title | 18px | 600 | 1.3 | #0F1729 | Card headers |
468| Body Text | 14-16px | 400 | 1.6-1.7 | #0F1729 or #64748B | Paragraphs |
469| Caption | 12-13px | 400 | 1.5 | #64748B | Labels, metadata |
470| Big Numbers/KPIs | 32-96px | 700 | 1.0 | #05289E | Metrics display |
471
472## Data Visualization Guidelines
473
474### Bar Charts
475
476- Bar Fill: #05289E (primary), #CBFF9E (highlight), #1a3a2f (secondary)
477- Corner Radius: 4px top corners only
478- Grid Lines: #E2E8F0 dashed 1px, horizontal only
479- Axis Labels: 11px #64748B
480- Bar Gap: Proportional to bar width (8-16px)
481
482### Line & Area Charts
483
484- Line Stroke: #05289E 2px, smooth curves
485- Area Fill: rgba(5, 40, 158, 0.1) (10% opacity)
486- Data Points: #05289E 4px radius circles
487- Secondary Lines: Use chart color sequence
488
489### Pie & Donut Charts
490
491- Donut Inner Radius: 0.618 ratio (golden ratio)
492- Angular Inset: 1px gap between segments
493- Max Segments: 4 (group smaller values as "Other")
494- Stroke Width: 24px for donut
495
496### Gauges & Progress Bars
497
498- Track Color: #E2E8F0
499- Progress Stroke Width: 8-14px
500- Stroke Linecap: round
501- Value Typography: 32px bold #0F1729
502- Label Typography: 12px #64748B
503
504### Chart Tooltips
505
506- Background: #0F1729
507- Text: White
508- Border Radius: 6px
509- Padding: 8px 12px (compact), 12px 16px (detailed)
510- Box Shadow: 0 4px 12px rgba(0,0,0,0.15)
511
512## Accessibility Requirements
513
514### Contrast Requirements (WCAG AA)
515
516- Normal text: minimum 4.5:1
517- Large text (18px+ or 14px bold): minimum 3:1
518- UI components: minimum 3:1
519
520### Contrast Examples
521
522| Combination | Ratio | Status |
523|-------------|-------|--------|
524| Blue on White | 8.5:1 | Pass |
525| Navy on White | 16.7:1 | Pass |
526| Forest on White | 12.3:1 | Pass |
527| Navy on Green | 12.1:1 | Pass |
528| Green on White | 1.5:1 | Fail |
529
530### Accessibility Rules
531
532- Never rely on color alone to convey information
533- All form inputs must have visible, associated labels
534- Provide visible focus indicators for keyboard navigation
535- Support screen readers with proper ARIA labels
536
537## Verification Checklist
538
539- [ ] Document header set correctly
540- [ ] Voice guidelines followed
541- [ ] No AI-ish vocabulary detected
542- [ ] Figures use design system colors
543- [ ] Figures have proper image macro format
544- [ ] Code uses include with tags (no inline Go)
545- [ ] Icons used appropriately
546- [ ] File under 500 lines
547- [ ] Target audiences properly scoped
548- [ ] Reviewer validation passed