mirror of
https://github.com/documenso/documenso.git
synced 2026-07-12 14:05:20 +10:00
docs: add OpenCode AI-assisted development guide (#2384)
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
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Generates a unique identifier using three simple words.
|
||||
* Falls back to unix timestamp if word generation fails.
|
||||
*/
|
||||
export const generateId = (): string => {
|
||||
const adjectives = [
|
||||
'happy',
|
||||
'bright',
|
||||
'swift',
|
||||
'calm',
|
||||
'bold',
|
||||
'clever',
|
||||
'gentle',
|
||||
'quick',
|
||||
'sharp',
|
||||
'warm',
|
||||
'cool',
|
||||
'fresh',
|
||||
'solid',
|
||||
'clear',
|
||||
'sweet',
|
||||
'wild',
|
||||
'quiet',
|
||||
'loud',
|
||||
'smooth',
|
||||
];
|
||||
|
||||
const nouns = [
|
||||
'moon',
|
||||
'star',
|
||||
'ocean',
|
||||
'river',
|
||||
'forest',
|
||||
'mountain',
|
||||
'cloud',
|
||||
'wave',
|
||||
'stone',
|
||||
'flower',
|
||||
'bird',
|
||||
'wind',
|
||||
'light',
|
||||
'shadow',
|
||||
'fire',
|
||||
'earth',
|
||||
'sky',
|
||||
'tree',
|
||||
'leaf',
|
||||
'rock',
|
||||
];
|
||||
|
||||
const colors = [
|
||||
'blue',
|
||||
'red',
|
||||
'green',
|
||||
'yellow',
|
||||
'purple',
|
||||
'orange',
|
||||
'pink',
|
||||
'cyan',
|
||||
'amber',
|
||||
'emerald',
|
||||
'violet',
|
||||
'indigo',
|
||||
'coral',
|
||||
'teal',
|
||||
'gold',
|
||||
'silver',
|
||||
'copper',
|
||||
'bronze',
|
||||
'ivory',
|
||||
'jade',
|
||||
];
|
||||
|
||||
try {
|
||||
const randomAdjective = adjectives[Math.floor(Math.random() * adjectives.length)];
|
||||
const randomColor = colors[Math.floor(Math.random() * colors.length)];
|
||||
const randomNoun = nouns[Math.floor(Math.random() * nouns.length)];
|
||||
|
||||
return `${randomAdjective}-${randomColor}-${randomNoun}`;
|
||||
} catch {
|
||||
// Fallback to unix timestamp if something goes wrong
|
||||
return Date.now().toString();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user