|
1 | | -# AI resources for wandb/docs |
| 1 | +# AI Assistant Resources |
2 | 2 |
|
3 | | -This directory contains resources, prompts, and tools designed to help AI agents work effectively with the wandb/docs repository. |
| 3 | +This directory contains resources, prompts, and templates specifically designed for AI agents working with the W&B documentation repository. |
4 | 4 |
|
5 | | -## Getting started |
| 5 | +## Directory Structure |
6 | 6 |
|
7 | | -Start by reading the [system prompt](./system-prompt.md) to understand your role as a member of the W&B docs team. |
8 | | - |
9 | | -## Directory structure |
10 | | - |
11 | | -### `system-prompt.md` |
12 | | -The foundational context for AI agents joining the W&B docs team. Defines your role, responsibilities, and key principles for creating documentation. |
13 | | - |
14 | | -### `style-guide.md` |
15 | | -Comprehensive style guide for W&B documentation. Covers formatting, punctuation, code examples, and W&B-specific conventions. |
16 | | - |
17 | | -### `runbooks/` |
18 | | -Standardized, task-specific instructions for AI agents performing complex operations in this repository. These runbooks ensure consistent, reliable execution of recurring tasks. |
19 | | - |
20 | | -**Example tasks:** |
21 | | -- Testing GitHub Actions changes |
22 | | -- Performing large-scale refactoring |
23 | | -- Managing release processes |
24 | | - |
25 | | -See [runbooks/README.md](./runbooks/README.md) for detailed information. |
26 | | - |
27 | | -### Future directories (planned) |
28 | | - |
29 | | -#### `prompts/` |
30 | | -System prompts and context for different types of AI interactions: |
31 | | -- Documentation writing guidelines |
32 | | -- Code review standards |
33 | | -- Style and tone specifications |
34 | | - |
35 | | -#### `tools/` |
36 | | -Scripts and utilities that AI agents can use: |
37 | | -- Validation scripts |
38 | | -- Automation helpers |
39 | | -- Analysis tools |
40 | | - |
41 | | -#### `context/` |
42 | | -Repository-specific context that helps AI agents understand: |
43 | | -- Architecture decisions |
44 | | -- Historical context |
45 | | -- Domain-specific knowledge |
46 | | - |
47 | | -## Usage guidelines |
48 | | - |
49 | | -### For repository maintainers |
50 | | -1. Keep runbooks up-to-date as processes change |
51 | | -2. Test runbooks regularly with AI agents |
52 | | -3. Document any repository-specific quirks or constraints |
53 | | -4. Version control all AI resources alongside code |
54 | | - |
55 | | -### For AI agent users |
56 | | -1. Always check for relevant runbooks before starting complex tasks |
57 | | -2. Provide runbooks as context to your AI agent |
58 | | -3. Report issues or ambiguities in runbooks |
59 | | -4. Contribute improvements based on your experience |
60 | | - |
61 | | -## Collaboration guidelines |
62 | | - |
63 | | -When working with human and AI teammates on documentation changes: |
| 7 | +``` |
| 8 | +.ai/ |
| 9 | +├── migrations/ # One-off migration tools and templates |
| 10 | +├── style-guide/ # Writing and code style guidance for AI agents |
| 11 | +└── runbooks/ # Step-by-step procedures for complex tasks |
| 12 | +``` |
64 | 13 |
|
65 | | -### Before creating a PR |
66 | | -- **Feature branches**: Push feature branches to collaborate with others before opening a PR. |
67 | | -- **Branch naming**: Use descriptive names that indicate the purpose (for example, `fix/broken-links-automation-guide`). |
| 14 | +## For Human Contributors |
68 | 15 |
|
69 | | -### Creating pull requests |
70 | | -1. **Start with draft PRs**: Create a draft pull request initially. This won't request reviews and can't be merged accidentally. |
71 | | -2. **Wait for tests**: Ensure all PR tests pass before marking as ready for review. |
72 | | -3. **Coordinate with humans**: The human coordinating the work should verify the changes meet requirements before marking the PR ready for review. A human should ultimately merge a PR, not an agent. |
| 16 | +These resources help AI assistants provide consistent, high-quality contributions to the docs. When working with an AI agent: |
73 | 17 |
|
74 | | -### PR titles and descriptions |
75 | | -- **Be meaningful but concise**: Write clear titles that describe what changed. |
76 | | -- **Link relevant context**: Include: |
77 | | - - JIRA IDs (for example, `DOCS-1234`) |
78 | | - - GitHub issue IDs (for example, `#456`) |
79 | | - - Related PRs for additional context |
80 | | -- **Add before/after comparison**: When applicable, include: |
81 | | - - Links to the current live documentation |
82 | | - - Links to the PR's HTML preview showing the changes |
83 | | - - Brief description of what changed and why |
| 18 | +1. **For migrations**: Direct the agent to `.ai/migrations/` for specific migration templates |
| 19 | +2. **For style questions**: Reference `.ai/style-guide/` for consistency |
| 20 | +3. **For complex procedures**: Use `.ai/runbooks/` for detailed workflows |
84 | 21 |
|
85 | | -### Example PR description |
86 | | -``` |
87 | | -## Description |
| 22 | +## For AI Agents |
88 | 23 |
|
89 | | -Updates AI agent style guide to improve accessibility and code quality. |
| 24 | +When assisting with documentation tasks: |
90 | 25 |
|
91 | | -The style guide now provides clearer guidance for AI agents creating documentation: |
92 | | -- Added accessibility guidelines (no emojis) |
93 | | -- Added code example best practices |
94 | | -- Created runbook template |
| 26 | +1. **Check this directory first** for relevant templates and guidance |
| 27 | +2. **Follow style guides** in `.ai/style-guide/` to ensure consistency |
| 28 | +3. **Use migration templates** in `.ai/migrations/` for structural changes |
| 29 | +4. **Reference runbooks** in `.ai/runbooks/` for multi-step procedures |
95 | 30 |
|
96 | | -### Before/After |
97 | | -- Live docs: https://docs.wandb.ai/guides/ai-resources |
98 | | -- PR preview: https://preview-12345.pages.dev/guides/ai-resources |
| 31 | +## Current Resources |
99 | 32 |
|
100 | | -## Related issues |
101 | | -
|
102 | | -- Fixes DOCS-1234 |
103 | | -- Related to #456 |
104 | | -``` |
| 33 | +### Migrations |
| 34 | +- **hugo-to-mintlify/**: Templates for migrating PRs from Hugo to Mintlify structure |
| 35 | + - `migration_prompt_template.md`: Step-by-step migration guide |
| 36 | + - `migration_user_prompt.md`: User-facing prompts for requesting migrations |
105 | 37 |
|
106 | | -## Best practices |
| 38 | +### Style Guide |
| 39 | +*(Coming soon)* |
| 40 | +- Writing style guidelines |
| 41 | +- Code formatting standards |
| 42 | +- Naming conventions |
107 | 43 |
|
108 | | -1. **Capture knowledge immediately**: After completing any complex task with an AI agent, ask them to draft a runbook while the details are fresh |
109 | | -2. **Specificity**: Be explicit about every step, assumption, and requirement |
110 | | -3. **Adaptability**: Include variations for common scenarios |
111 | | -4. **Safety**: Always include cleanup steps and error handling |
112 | | -5. **Testing**: Verify runbooks work with multiple AI providers |
113 | | -6. **Maintenance**: Update runbooks when workflows or tools change |
114 | | -7. **Iterative improvement**: Have agents review and improve existing runbooks based on their experience |
| 44 | +### Runbooks |
| 45 | +*(Coming soon)* |
| 46 | +- Release process |
| 47 | +- Documentation testing procedures |
| 48 | +- PR review checklist |
115 | 49 |
|
116 | | -## Contributing |
| 50 | +## Adding New Resources |
117 | 51 |
|
118 | | -When adding AI resources: |
| 52 | +When adding new AI resources: |
| 53 | +1. Place them in the appropriate subdirectory |
| 54 | +2. Update this README with a description |
| 55 | +3. Include clear instructions for both humans and AI agents |
| 56 | +4. Consider whether the resource is temporary (migration) or permanent (style guide) |
119 | 57 |
|
120 | | -1. Follow existing naming conventions and structure |
121 | | -2. Include comprehensive documentation |
122 | | -3. Test with at least one AI agent |
123 | | -4. Update relevant README files |
124 | | -5. Consider security implications of any shared context |
| 58 | +## Note on Tool Compatibility |
125 | 59 |
|
126 | | -## Security notes |
| 60 | +These resources are tool-agnostic and work with: |
| 61 | +- Cursor |
| 62 | +- GitHub Copilot |
| 63 | +- Claude (via API or web) |
| 64 | +- ChatGPT |
| 65 | +- Other AI coding assistants |
127 | 66 |
|
128 | | -- Never include sensitive information (API keys, passwords, etc.) |
129 | | -- Be cautious about exposing internal URLs or infrastructure details |
130 | | -- Review all contributions for potential security risks |
| 67 | +For tool-specific configurations (like `.cursorrules`), those remain in their respective directories. |
0 commit comments