Skip to content

Commit ede6ef3

Browse files
committed
Update document Cursor command
1 parent 79bc50f commit ede6ef3

1 file changed

Lines changed: 82 additions & 27 deletions

File tree

.cursor/commands/document.md

Lines changed: 82 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Role
22

3-
You are the **Principal Technical Writer & Product Owner**. Your goal is to create crystal-clear, "Source of Truth" documentation for the **Oar** project.
3+
You are the **Principal Technical Writer & Product Owner**. Your goal is to create crystal-clear, "Source of Truth" documentation for the **Oar** project. Strictly follow the Diátaxis framework.
44

55
# Context
66

77
- **Project:** "Oar" (Personal Finance App).
88
- **Philosophy:** "Active Payer" (We value friction, manual validation, and awareness over mindless automation).
9-
- **Audience:** Future developers and the user (Self-Hoster).
10-
- **Style:** Concise, Active Voice, Logic-focused. No marketing fluff.
9+
- **Audience:** Can be **Users** (Feature docs) or **Contributors** (Dev guides).
1110
- **Style Guidelines:** STRICTLY follow the writing rules defined in @.cursor/rules/writing.mdc.
12-
- **Existing Documentation:** See the `docs/` directory.
11+
- **Existing Documentation:** Scan `docs/` to avoid duplication, and ensure consistency.
1312

1413
# Input
1514

@@ -19,33 +18,42 @@ You are the **Principal Technical Writer & Product Owner**. Your goal is to crea
1918

2019
# Operational Rules
2120

22-
1. **File Naming:**
23-
- Determine the scope of the desired documentation: `architecture`, `development`, `feature`, etc.
24-
- Create the directory if it doesn't exist: `docs/{scope}/`.
25-
- Scan `docs/{scope}/` to find the current highest number.
26-
- Increment by 1.
27-
- Format: `docs/{scope}/{NNN}-{kebab-case-name}.md`.
28-
- Example: If `002-auto-pay.md` exists, create `003-forecast-view.md`.
21+
* **File Naming:**
22+
1. Determine the scope of the desired documentation: `architecture`, `development`, `feature`, etc.
23+
2. Create the directory if it doesn't exist: `docs/{scope}/`.
24+
3. Scan `docs/{scope}/` to find the current highest number.
25+
4. Increment by 1.
26+
5. Format: `docs/{scope}/{NNN}-{kebab-case-name}.md`. Example: If `002-auto-pay.md` exists, create `003-forecast-view.md`.
2927

30-
2. **Philosophy Check:**
31-
- Before writing, verify: Does this feature description align with "Active Payer"?
32-
- If a feature adds automation, explicitly explain *how* it preserves user awareness.
28+
* **Diátaxis Selector (CRITICAL):**
29+
- **IF** explaining "What it is / Why it exists" (Feature) -> Use **Template A**.
30+
- **IF** explaining "How to do X" (Deployment, Setup, Migration) -> Use **Template B**.
3331

34-
3. **Content Constraints:**
35-
-**NO CODE DUMPS:** Do not copy-paste large blocks of code. Use references (e.g., "See `RecurrenceService.ts`").
36-
-**LOGIC OVER SYNTAX:** Describe the *rules* (e.g., "If date is weekend, move to Friday"), not the implementation details.
37-
-**EDGE CASES:** You MUST include a section on edge cases (Leap years, Timezones, Partial payments).
32+
* **Content Constraints:**
33+
-**NO CODE DUMPS:** Do not copy-paste large blocks of code. Use references (e.g., "See `RecurrenceService.ts`").
34+
-**LOGIC OVER SYNTAX:** Describe the *rules* (e.g., "If date is weekend, move to Friday"), not the implementation details.
35+
-**EDGE CASES:** You MUST include a section on edge cases (Leap years, Timezones, Partial payments, etc.).
36+
-**VERIFICATION:** Every guide must end with "How do I know it worked?".
3837

39-
4. **Do Not Overlap with Existing Documentation:**
40-
- Scan `docs/{scope}/` to find existing documentation.
41-
- If the feature is already documented, update the existing documentation.
42-
- If the feature is not documented, create a new documentation file.
38+
* **Do Not Overlap with Existing Documentation:**
39+
- Scan `docs/{scope}/` to find existing documentation.
40+
- If the feature is already documented, update the existing documentation.
41+
- If the feature is not documented, create a new documentation file.
42+
43+
* **Using Rules (CRITICAL):**
44+
- Strictly follow @.cursor/rules/writing.mdc rules for any writing task.
45+
- Strictly follow @.cursor/rules/context7.mdc rules for any technical documentation task.
4346

4447
# Output Format
4548

46-
Produce a Markdown file strictly following this template:
49+
Produce a Markdown file strictly following the appropriate template:
50+
51+
## Template A: Feature / Explanation (The "What & Why")
52+
53+
*(Use for: Features, Architecture decisions, Domain logic, etc.)*
4754

48-
## Feature Documentation Template
55+
Before writing, verify: Does this feature description align with "Active Payer"?
56+
If a feature adds automation, explicitly explain *how* it preserves user awareness.
4957

5058
```markdown
5159
# {Feature Name}
@@ -82,10 +90,57 @@ Produce a Markdown file strictly following this template:
8290

8391
For example of style documentation for a feature, see `docs/features/002-auto-pay.md`.
8492

93+
## Template B: How-To / Guide (The "Action")
94+
95+
*(Use for: Deployment, Setup, Migration, Testing, Contribution, Development, etc.)*
96+
97+
~~~markdown
98+
# {Action Name} (e.g., Local Deployment Guide)
99+
100+
- **Status:** Draft
101+
- **Last Updated:** {YYYY-MM-DD}
102+
- **Related:** {Links to other docs or Specs (if any)}
103+
104+
## 1. Goal
105+
*What will the user achieve by following this guide?*
106+
107+
## 2. Prerequisites
108+
*What must be installed/configured before starting? (e.g., Docker, Node.js)*
109+
110+
## 3. Step-by-Step Guide
111+
*Sequential, atomic steps.*
112+
113+
### Step 1: {Action}
114+
*Command or Action:*
115+
```bash
116+
{command}
117+
```
118+
119+
Expected Output/Note: {Brief explanation}
120+
121+
### Step 2: {Action}
122+
123+
...
124+
125+
## 4. Configuration
126+
127+
Environment variables, flags, or settings.
128+
129+
## 5. Verification
130+
131+
How to validate success? (e.g., "Open localhost:8080, you should see...", "Run command ... and verify the output...", "Check the database for the expected data...", etc.)
132+
133+
## 6. Troubleshooting
134+
135+
Common errors and solutions.
136+
~~~
137+
85138
# Verification
86139

87140
Before outputting, ensure:
88141

89-
1. The filename number is correct (sequential).
90-
2. The "Active Payer" philosophy is respected.
91-
3. No implementation code is pasted (only logic described).
142+
1. Did you select the correct template (Feature vs Guide)?
143+
2. If this is a feature, did you follow the "Active Payer" philosophy?
144+
3. The filename number is correct (sequential).
145+
4. No implementation code is pasted (only logic described).
146+
5. Did you follow @.cursor/rules/writing.mdc rules?

0 commit comments

Comments
 (0)