Skip to content

Commit 14629f8

Browse files
committed
docs(cursor): add custom command definitions
- Add add_command.md for creating new custom commands - Add create_doc.md for documentation creation workflow - Add doc_type.md for Diátaxis documentation type selection - Add explanation.md for explanation documentation template - Add git_commit.md for git commit workflow - Add git_push.md for git push and PR workflow - Add issue.md for GitHub issue creation - Add no_spec.md for skipping spec workflow - Add prototype.md for rapid prototype development mode - Add spec.md for complete spec workflow These command definitions standardize AI assistant workflows and improve consistency across development tasks.
1 parent 16e3138 commit 14629f8

File tree

10 files changed

+684
-0
lines changed

10 files changed

+684
-0
lines changed

.cursor/commands/add_command.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add Command
2+
3+
## Function
4+
Add a new custom command to the workspace for future reuse.
5+
6+
## Trigger Condition
7+
When user inputs `/add-command`
8+
9+
## Behavior
10+
Guide the user through defining and registering a new command, prompting for:
11+
- Command name and trigger
12+
- Function description and expected behavior
13+
- Example usage or template (if applicable)
14+
- Placement in the `.cursor/commands/` directory using a meaningful filename
15+
16+
Ensure the new command is documented following the standard command file format for easy discovery and consistent usage.
17+

.cursor/commands/create_doc.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Create Documentation
2+
3+
## Function
4+
Create comprehensive documentation following Diátaxis framework and OpenAgentKit standards
5+
6+
## Trigger Condition
7+
When user inputs `/create-doc`
8+
9+
## Behavior
10+
Guide users through creating documentation that follows both Diátaxis framework principles and OpenAgentKit documentation standards
11+
12+
## Process Flow
13+
14+
### Step 1: Documentation Type Selection
15+
Use `/doc-type` to determine the correct documentation type:
16+
- Tutorial (Learning + Doing)
17+
- How-to Guide (Working + Doing)
18+
- Reference (Working + Understanding)
19+
- Explanation (Learning + Understanding)
20+
21+
### Step 2: Content Planning
22+
- [ ] Create mind map of reader goals and use cases
23+
- [ ] Define target audience and their knowledge level
24+
- [ ] Plan information architecture and navigation
25+
- [ ] Identify key concepts and examples needed
26+
27+
### Step 3: Structure Creation
28+
Based on documentation type, use appropriate template:
29+
- `/tutorial` for learning-oriented content
30+
- `/howto` for task-oriented content
31+
- `/reference` for information-oriented content
32+
- `/explanation` for understanding-oriented content
33+
34+
### Step 4: Content Writing
35+
Apply Diátaxis writing principles:
36+
- [ ] "Face-to-face" principle - write conversationally
37+
- [ ] Zero knowledge assumption - define all terms
38+
- [ ] Pyramid principle - most important first
39+
- [ ] Hemingway clarity - short, active sentences
40+
- [ ] Include multimedia elements - diagrams, code examples
41+
42+
### Step 5: Frontmatter Configuration
43+
Ensure proper MDX frontmatter:
44+
```yaml
45+
---
46+
title: "[Page Title]"
47+
description: "[Brief description for SEO]"
48+
---
49+
```
50+
51+
### Step 6: Quality Review (MANDATORY)
52+
- [ ] **Existence Verification**: Verify every function, package, and API endpoint exists in codebase
53+
- [ ] **No Fabricated Content**: Ensure no fake CLI commands, non-existent configs, or made-up features
54+
- [ ] **Preview Marking**: All incomplete features must be marked with "*Coming soon*" or "*In development*"
55+
- [ ] **Code Validation**: Test all code examples are runnable and accurate
56+
- [ ] **Reality Check**: Question if features seem too advanced for project maturity
57+
- [ ] **Diátaxis Compliance**: Verify content type and structure appropriateness
58+
- [ ] **Cross-Reference Validation**: Test all internal and external links
59+
60+
## Integration with OpenAgentKit Standards
61+
62+
### Required Elements
63+
- **Title**: Clear, descriptive title in frontmatter
64+
- **Structure**: Follow Diátaxis framework for content organization
65+
- **Language**: English for all technical content
66+
- **Examples**: Include practical, runnable code samples
67+
- **Accuracy**: All code examples must be verified against actual codebase
68+
- **Honesty**: No fabricated functionality - use "*Coming soon*" for incomplete features
69+
70+
### Optional Enhancements
71+
- **Interactive elements**: Use MDX components when appropriate
72+
- **Multiple language examples**: JavaScript, TypeScript, Python
73+
- **Error handling**: Include error handling in code examples
74+
- **Cross-references**: Link to related documentation
75+
76+
## Usage Examples
77+
78+
```
79+
/create-doc I need to create documentation for our new API authentication system
80+
→ Guide through type selection, structure, and content creation
81+
82+
/create-doc Help me document the agent configuration process
83+
→ Determine if it's tutorial (learning) or how-to (working) based on user needs
84+
```
85+
86+
## Success Criteria (MANDATORY)
87+
- [ ] **Zero Fabricated Content**: No fake CLI commands, non-existent packages, or made-up features
88+
- [ ] **All Code Verified**: Every code example tested against actual codebase
89+
- [ ] **Preview Marking**: All incomplete features clearly marked as "*Coming soon*"
90+
- [ ] **Diátaxis Compliance**: Follows framework principles for content type
91+
- [ ] **OpenAgentKit Standards**: Meets all documentation requirements
92+
- [ ] **User Needs Addressed**: Content effectively serves target audience
93+
- [ ] **Consistent Quality**: Maintains professional tone and structure

.cursor/commands/doc_type.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Documentation Type Selector
2+
3+
## Function
4+
Help users identify the correct Diátaxis documentation type for their content
5+
6+
## Trigger Condition
7+
When user inputs `/doc-type`
8+
9+
## Behavior
10+
Guide users through the Diátaxis framework to determine the most appropriate documentation type for their content
11+
12+
## Diátaxis Framework Decision Tree
13+
14+
### Step 1: Identify User State
15+
**Is the user in Learning mode or Working mode?**
16+
17+
**Learning Mode** (Acquiring new skills/knowledge):
18+
- User is new to the topic
19+
- User wants to understand concepts
20+
- User is building foundational knowledge
21+
- User needs guided learning experience
22+
23+
**Working Mode** (Applying existing knowledge):
24+
- User has basic knowledge of the topic
25+
- User needs to complete specific tasks
26+
- User needs to look up information
27+
- User is solving problems
28+
29+
### Step 2: Identify Knowledge Type
30+
**Is the content about Understanding or Doing?**
31+
32+
**Understanding** (Theoretical knowledge):
33+
- Explaining concepts and principles
34+
- Providing context and background
35+
- Describing how things work
36+
- Information lookup and reference
37+
38+
**Doing** (Practical knowledge):
39+
- Step-by-step instructions
40+
- Hands-on learning
41+
- Task completion
42+
- Problem solving
43+
44+
### Step 3: Determine Documentation Type
45+
46+
```
47+
Learning Mode + Doing = TUTORIAL
48+
Learning Mode + Understanding = EXPLANATION
49+
Working Mode + Doing = HOW-TO GUIDE
50+
Working Mode + Understanding = REFERENCE
51+
```
52+
53+
## Documentation Type Characteristics
54+
55+
### Tutorial (Learning + Doing)
56+
- **Purpose**: Skill acquisition through guided learning
57+
- **Tone**: Instructional, supportive, encouraging
58+
- **Structure**: Progressive learning with hands-on practice
59+
- **Use when**: Teaching new skills, onboarding, educational content
60+
61+
### How-to Guide (Working + Doing)
62+
- **Purpose**: Task completion and problem solving
63+
- **Tone**: Practical, direct, solution-focused
64+
- **Structure**: Direct, actionable steps
65+
- **Use when**: Specific tasks, troubleshooting, operational procedures
66+
67+
### Reference (Working + Understanding)
68+
- **Purpose**: Information lookup and verification
69+
- **Tone**: Neutral, factual, authoritative
70+
- **Structure**: Comprehensive, structured data
71+
- **Use when**: API docs, command references, technical specifications
72+
73+
### Explanation (Learning + Understanding)
74+
- **Purpose**: Concept comprehension and context
75+
- **Tone**: Educational, analytical, thought-provoking
76+
- **Structure**: Conceptual explanation and analysis
77+
- **Use when**: Architecture overviews, concept explanations, background context
78+
79+
## Usage Examples
80+
81+
```
82+
/doc-type I want to help users learn React Hooks from scratch
83+
→ TUTORIAL (Learning + Doing)
84+
85+
/doc-type I need to document how to deploy an application
86+
→ HOW-TO GUIDE (Working + Doing)
87+
88+
/doc-type I want to explain what microservices architecture is
89+
→ EXPLANATION (Learning + Understanding)
90+
91+
/doc-type I need to document API endpoint parameters
92+
→ REFERENCE (Working + Understanding)
93+
```
94+
95+
## Quality Checklist
96+
- [ ] Identified correct user state (Learning vs. Working)
97+
- [ ] Identified correct knowledge type (Understanding vs. Doing)
98+
- [ ] Selected appropriate documentation type
99+
- [ ] Applied correct tone and structure
100+
- [ ] Followed Diátaxis framework principles

.cursor/commands/explanation.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Create Explanation Documentation
2+
3+
## Function
4+
Create understanding-oriented explanation documentation following the Diátaxis framework
5+
6+
## Trigger Condition
7+
When user inputs `/explanation`
8+
9+
## Behavior
10+
Create a document that meets Diátaxis explanation standards, helping users understand concepts, principles, and context
11+
12+
## Diátaxis Classification
13+
- **User State**: Learning mode (seeking understanding)
14+
- **Knowledge Type**: Understanding-oriented (concept comprehension)
15+
- **Purpose**: Deep comprehension and insight
16+
17+
## Explanation Characteristics
18+
- **User State**: Learning mode, seeking understanding
19+
- **Goal**: Deep comprehension and insight
20+
- **Approach**: Conceptual explanation and analysis
21+
- **Focus**: Understanding and context
22+
- **Tone**: Educational, analytical, thought-provoking
23+
24+
## Document Structure Template
25+
26+
```markdown
27+
# [Concept] Explanation
28+
29+
## What is [Concept]
30+
Definition and basic meaning of [concept]
31+
32+
## Why [Concept] is Needed
33+
- [Problem solved 1]
34+
- [Value provided 1]
35+
- [Application scenario 1]
36+
37+
## How [Concept] Works
38+
[Detailed explanation of how the concept works]
39+
40+
### Core Mechanisms
41+
1. [Mechanism 1]: [Detailed explanation]
42+
2. [Mechanism 2]: [Detailed explanation]
43+
3. [Mechanism 3]: [Detailed explanation]
44+
45+
### Workflow
46+
```mermaid
47+
graph TD
48+
A[Start] --> B[Step 1]
49+
B --> C[Step 2]
50+
C --> D[Step 3]
51+
D --> E[End]
52+
```
53+
54+
## Related Concepts
55+
- **[Related concept 1]**: [Relationship explanation]
56+
- **[Related concept 2]**: [Relationship explanation]
57+
- **[Related concept 3]**: [Relationship explanation]
58+
59+
## Practical Applications
60+
### Application Scenario 1: [Scenario Name]
61+
- **Background**: [Scenario background]
62+
- **Application**: [How to apply]
63+
- **Effect**: [Expected effect]
64+
65+
### Application Scenario 2: [Scenario Name]
66+
[Repeat above structure]
67+
68+
## Best Practices
69+
- [Practice recommendation 1]
70+
- [Practice recommendation 2]
71+
- [Practice recommendation 3]
72+
73+
## Common Misconceptions
74+
**Misconception 1**: [Incorrect understanding]
75+
**Correct Understanding**: [Correct explanation]
76+
77+
**Misconception 2**: [Incorrect understanding]
78+
**Correct Understanding**: [Correct explanation]
79+
80+
## Further Learning
81+
- [Advanced learning resource 1]
82+
- [Related topic 1]
83+
- [Practice project suggestions]
84+
```
85+
86+
## Writing Guidelines
87+
88+
### 1. Understanding-Oriented
89+
- Focus on promoting understanding
90+
- Provide in-depth analysis and explanation
91+
- Help users build conceptual frameworks
92+
93+
### 2. Depth
94+
- Provide in-depth analysis and explanation
95+
- Explain principles and mechanisms
96+
- Provide rich context
97+
98+
### 3. Contextual
99+
- Provide necessary background knowledge
100+
- Explain the history and development of concepts
101+
- Describe application scenarios and value
102+
103+
### 4. Inspiring
104+
- Inspire user thinking
105+
- Provide different perspectives
106+
- Encourage deep exploration
107+
108+
## Quality Checklist
109+
- [ ] Clear concept definition
110+
- [ ] In-depth principle explanation
111+
- [ ] Rich background information
112+
- [ ] Practical application scenarios
113+
- [ ] Related concept relationships
114+
- [ ] Best practice recommendations
115+
- [ ] Common misconception clarification
116+
- [ ] Further learning resources
117+
118+
## Usage Example
119+
120+
```
121+
/explanation Create an explanation document about microservices architecture
122+
```
123+
124+
This will generate a document to help users deeply understand microservices architecture, including concept definition, working principles, application scenarios, and best practices.

.cursor/commands/git_commit.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Git Commit Workflow
2+
3+
## Function
4+
Git commit and push workflow following OpenAgentKit standards
5+
6+
## Trigger Condition
7+
When user inputs `/git_commit`
8+
9+
## Behavior
10+
1. Commit code using conventional-changelog style
11+
2. Execute `git push origin <branch-name>`
12+
13+
## Commit Message Format
14+
Follow conventional-changelog style:
15+
```
16+
type(scope): description
17+
18+
[optional body]
19+
20+
[optional footer]
21+
```
22+
23+
### Commit Types
24+
- `feat`: New feature
25+
- `fix`: Bug fix
26+
- `docs`: Documentation changes
27+
- `style`: Code style changes (formatting, etc.)
28+
- `refactor`: Code refactoring
29+
- `test`: Adding or updating tests
30+
- `chore`: Maintenance tasks
31+
32+
### Examples
33+
```
34+
feat(auth): add OAuth2 authentication support
35+
fix(ui): resolve button alignment issue in mobile view
36+
docs(api): update authentication endpoint documentation
37+
```
38+
39+
## Quality Checklist
40+
- [ ] Commit message follows conventional-changelog format
41+
- [ ] Changes are properly staged
42+
- [ ] No sensitive information in commit
43+
- [ ] Code passes linting and tests

0 commit comments

Comments
 (0)