mirror of
https://github.com/documenso/documenso
synced 2026-04-21 13:27:18 +00:00
Adds OpenCode support for AI-assisted development, including custom commands and skills to help contributors maintain consistency and streamline common workflows. #### Changes - Added "AI-Assisted Development with OpenCode" section to CONTRIBUTING.md with: - Installation instructions and provider configuration - Documentation for 8 custom commands (/implement, /continue, /interview, /document, /commit, /create-plan, /create-scratch, /create-justification) - Typical workflow guide - Clear policy that AI-generated code must be reviewed before submission - Added .agents/ directory for plans, scratches, and justifications - Added .opencode/ commands and skills for the agent - Added helper scripts for creating agent files
4.8 KiB
4.8 KiB
| description | argument-hint |
|---|---|
| Generate MDX documentation for a module or feature | <module-path-or-feature> |
You are creating proper MDX documentation for a module or feature in Documenso using Nextra.
Your Task
- Identify the scope - What does
$ARGUMENTSrefer to? (file, directory, or feature name) - Read the source code - Understand the public API, types, and behavior
- Read existing docs - Check if there's documentation to update or reference
- Write comprehensive documentation - Create or update MDX docs in the appropriate location
- Update navigation - Add entry to
_meta.jsif creating a new page
Documentation Structure
Create documentation in the appropriate location:
- Developer docs:
apps/documentation/pages/developers/ - User docs:
apps/documentation/pages/users/
File Format
All documentation files must be .mdx files with frontmatter:
---
title: Page Title
description: Brief description for SEO and meta tags
---
# Page Title
Content starts here...
Navigation
Each directory should have a _meta.js file that defines the navigation structure:
export default {
index: 'Introduction',
'feature-name': 'Feature Name',
'another-feature': 'Another Feature',
};
If creating a new page, add it to the appropriate _meta.js file.
Documentation Format
---
title: <Module|Feature Name>
description: Brief description of what this does and when to use it
---
# <Module|Feature Name>
Brief description of what this module/feature does and when to use it.
## Installation
If there are specific packages or imports needed:
```bash
npm install @documenso/package-name
```
## Quick Start
```jsx
// Minimal working example
import { Component } from '@documenso/package';
const Example = () => {
return <Component />;
};
```
## API Reference
### Component/Function Name
Description of what it does.
#### Props/Parameters
| Prop/Param | Type | Description |
| ---------- | -------------------- | ------------------------- |
| prop | `string` | Description of the prop |
| optional | `boolean` (optional) | Optional prop description |
#### Example
```jsx
import { Component } from '@documenso/package';
<Component prop="value" optional={true} />;
```
### Types
#### `TypeName`
```typescript
type TypeName = {
property: string;
optional?: boolean;
};
```
## Examples
### Common Use Case
```jsx
// Full working example
```
### Advanced Usage
```jsx
// More complex example
```
## Related
- [Link to related documentation](/developers/path)
- [Another related page](/users/path)
Guidelines
Content Quality
- Be accurate - Verify behavior by reading the code
- Be complete - Document all public API surface
- Be practical - Include real, working examples
- Be concise - Don't over-explain obvious things
- Be user-focused - Write for the target audience (developers or users)
Code Examples
- Use appropriate language tags:
jsx,tsx,typescript,bash,json - Show imports when not obvious
- Include expected output in comments where helpful
- Progress from simple to complex
- Use real examples from the codebase when possible
Formatting
- Always include frontmatter with
titleanddescription - Use proper markdown headers (h1 for title, h2 for sections)
- Use tables for props/parameters documentation (matching existing style)
- Use code fences with appropriate language tags
- Use Nextra components when appropriate:
<Callout type="info">for notes<Steps>for step-by-step instructions
- Use relative links for internal documentation (e.g.,
/developers/embedding/react)
Nextra Components
You can import and use Nextra components:
import { Callout, Steps } from 'nextra/components';
<Callout type="info">
This is an informational note.
</Callout>
<Steps>
<Steps.Step>First step</Steps.Step>
<Steps.Step>Second step</Steps.Step>
</Steps>
Maintenance
- Include types inline so docs don't get stale
- Reference source file locations for complex behavior
- Keep examples up-to-date with the codebase
- Update
_meta.jswhen adding new pages
Process
- Explore the code - Read source files to understand the API
- Identify the audience - Is this for developers or users?
- Check existing docs - Look for similar pages to match style
- Draft the structure - Outline sections before writing
- Write content - Fill in each section with frontmatter
- Add examples - Create working code samples
- Update navigation - Add to
_meta.jsif needed - Review - Read through for clarity and accuracy
Begin
Analyze $ARGUMENTS, read the relevant source code, check existing documentation patterns, and create comprehensive MDX documentation following the Documenso documentation style.