Skip to content

Commit 1dd6d62

Browse files
h4x3rotabclaude
andcommitted
docs: add consolidated confidential AI guide
Consolidate inference, training, and agents docs into a single confidential-ai.md guide. Covers the four protection layers (TLS in CVM, CPU memory, GPU memory, disk encryption), includes mermaid diagrams, and links to working examples. Also update WRITING_GUIDE.md with generic documentation principles. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4ce0571 commit 1dd6d62

2 files changed

Lines changed: 351 additions & 45 deletions

File tree

.agent/WRITING_GUIDE.md

Lines changed: 100 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,15 @@
22

33
Guidelines for writing dstack documentation, README, and marketing content.
44

5-
## Messaging
6-
7-
- **Primary keyword**: "Confidential AI" — use in tagline and first paragraph
8-
- **Secondary keyword**: "Private AI" — use in explanatory context
9-
- **Key differentiator**: NVIDIA Confidential Computing support (H100, Blackwell GPUs)
10-
- **Base images**: `dstack-nvidia-0.5.x` for GPU TEE support
11-
125
## Writing Style
136

14-
- **Don't over-explain** why a framework is needed — assert dstack as the solution, hint at alternatives being insufficient
15-
- **Avoid analogies as taglines** (e.g., "X for Y") — dstack is a new category, not a better version of something else
7+
- **Don't over-explain** why a framework is needed — assert the solution, hint at alternatives being insufficient
8+
- **Avoid analogies as taglines** (e.g., "X for Y") — if it's a new category, don't frame it as a better version of something else
169
- **Problem → Solution flow** without explicit labels like "The problem:" or "The solution:"
1710
- **Demonstrate features through actions**, not parenthetical annotations
1811
- Bad: "Generates quotes (enabling *workload identity*)"
1912
- Good: "Generates TDX attestation quotes so users can verify exactly what's running"
2013

21-
## Architecture Descriptions
22-
23-
When describing components for security researchers:
24-
- Explain **what each component does** (actions)
25-
- Show **how features emerge** from the architecture naturally
26-
- Map components to security properties:
27-
- Guest Agent → workload identity, key isolation, disk encryption
28-
- KMS → code governance, key derivation bound to attested identity
29-
- Gateway → encrypted networking, RA-TLS
30-
- VMM → Docker Compose native, reproducible OS, GPU allocation
31-
32-
## Target Audiences
33-
34-
**Developers** care about:
35-
- Easy onboarding (Docker Compose native)
36-
- No code changes required
37-
- Existing workflow compatibility
38-
39-
**Security researchers** care about:
40-
- Trust model (what's trusted, what's not)
41-
- How attestation proves code integrity
42-
- How key management prevents operator access
43-
- How code governance is enforced on-chain
44-
45-
## Feature-to-Component Mapping
46-
47-
| Feature | Component | How it works |
48-
|---------|-----------|--------------|
49-
| Workload identity | Guest Agent | TDX attestation quotes |
50-
| Isolated keys | Guest Agent + KMS | Per-app key derivation bound to attested identity |
51-
| Encrypted by default | Guest Agent (disk) + Gateway (TLS) | Ephemeral disk keys, RA-TLS |
52-
| Code governance | KMS | On-chain smart contract policies |
53-
| Docker Compose native | VMM | Direct parsing, no translation |
54-
| Reproducible OS | VMM | Deterministic image builds |
55-
| Confidential GPUs | VMM + hardware | NVIDIA H100/Blackwell allocation |
56-
5714
## Procedural Documentation (Guides & Tutorials)
5815

5916
### Test Before You Document
@@ -80,3 +37,101 @@ When describing components for security researchers:
8037
- Link to prerequisite guides (don't repeat content)
8138
- Link to detailed guides for optional deep-dives
8239
- Use anchor links for specific sections when possible
40+
41+
## Security Documentation
42+
43+
### Trust Model Framing
44+
45+
**Distinguish trust from verification:**
46+
- "Trust" = cannot be verified, must assume correct (e.g., hardware)
47+
- "Verify" = can be cryptographically proven (e.g., measured software)
48+
49+
**Correct framing:**
50+
- Bad: "You must trust the OS" (when it's verifiable)
51+
- Good: "The OS is measured during boot and recorded in the attestation quote. You verify it by..."
52+
53+
### Limitations: Be Honest, Not Alarmist
54+
55+
State limitations plainly without false mitigations:
56+
- Bad: "X is a single point of failure. Mitigate by running your own X."
57+
- Good: "X is protected by [mechanism]. Like all [category] systems, [inherent limitation]. We are developing [actual solution] to address this."
58+
59+
Don't suggest mitigations that don't actually help. If something is an inherent limitation of the technology, say so.
60+
61+
## Documentation Quality Checklist
62+
63+
From doc-requirements.md:
64+
65+
1. **No bullet point walls** — Max 3-5 bullets before breaking with prose
66+
2. **No redundancy** — Don't present same info from opposite perspectives
67+
3. **Conversational language** — Write like explaining to a peer
68+
4. **Short paragraphs** — Max 4 sentences per paragraph
69+
5. **Lead with key takeaway** — First sentence tells reader why this matters
70+
6. **Active voice** — "TEE encrypts memory" not "Memory is encrypted by TEE"
71+
7. **Minimal em-dashes** — Max 1-2 per page, replace with "because", "so", or separate sentences
72+
73+
### Redundancy Patterns to Avoid
74+
75+
These often say the same thing:
76+
- "What we protect against" + "What you don't need to trust"
77+
- "Security guarantees" + "What attestation proves"
78+
79+
Combine into single sections. One detailed explanation, brief references elsewhere.
80+
81+
## README Structure
82+
83+
### Order Matters
84+
- **Quick Start before Prerequisites** — Lead with what it does, not setup
85+
- **How It Works after Quick Start** — Users want to run it first, understand later
86+
- Cleanup at the end, Further Reading last
87+
88+
### Don't Duplicate
89+
- Link to conceptual docs instead of repeating content
90+
- If an overview README duplicates an example README, cut the overview
91+
- One detailed explanation, brief references elsewhere
92+
93+
### Remove Unrealistic Sections
94+
- If most users can't actually do something (e.g., run locally without special hardware), don't include it
95+
- Don't document workflows that require resources users don't have
96+
97+
### Match the Workflow to the User
98+
- Use tools your audience already knows (e.g., Jupyter for ML practitioners)
99+
- Prefer official/existing images when they exist — don't reinvent
100+
- Make the correct path the default, mention alternatives briefly
101+
102+
## Code Examples
103+
104+
### Question Every Snippet
105+
- Does this code actually demonstrate something meaningful?
106+
- Would a reader understand what it does without the prose?
107+
- `do_thing(b"magic-string")` means nothing — show real use or remove it
108+
109+
### Diagrams
110+
- Mermaid over ASCII art — GitHub renders it nicely
111+
- Keep diagrams simple — 3-5 nodes max
112+
- Label edges with actions, not just arrows
113+
114+
## Conciseness
115+
116+
### Less is More
117+
- 30 lines beats 150 if it says the same thing
118+
- Cut sections that don't help users accomplish their goal
119+
- Tables for reference, prose for explanation — don't over-table
120+
121+
### Performance and Benchmarks
122+
- One memorable number + link to full report
123+
- Don't overwhelm with data the reader didn't ask for
124+
125+
### Reader-First Writing
126+
- Ask "what does the reader want to know?" not "what do I want to say?"
127+
- If a section answers a question nobody asked, cut it
128+
129+
## Maintenance
130+
131+
### Consistency Checks
132+
- After terminology changes, grep for related terms across all files
133+
- Use correct industry/vendor terminology (e.g., "Confidential Computing" not "Encrypted Computing")
134+
135+
### Clean Up Old Files
136+
- When approach changes, delete orphaned files (old scripts, Dockerfiles)
137+
- Don't leave artifacts from previous implementations

0 commit comments

Comments
 (0)