Skip to content

Commit 68c69f7

Browse files
Merge pull request #57 from joelanford/add-eng-note-command
Add doc plugin with /doc:note command
2 parents c69d499 + 0ba291f commit 68c69f7

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

.claude-plugin/marketplace.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"source": "./plugins/ci",
2525
"description": "A plugin to work with OpenShift CI"
2626
},
27+
{
28+
"name": "doc",
29+
"source": "./plugins/doc",
30+
"description": "A plugin for engineering documentation and notes"
31+
},
2732
{
2833
"name": "session",
2934
"source": "./plugins/session",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "doc",
3+
"description": "A plugin for engineering documentation and notes",
4+
"version": "0.0.1",
5+
"author": {
6+
"name": "OpenShift Engineering"
7+
}
8+
}

plugins/doc/commands/note.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
description: Generate professional engineering notes and append them to a log file
3+
argument-hint: [task description]
4+
---
5+
6+
## Name
7+
doc:note
8+
9+
## Synopsis
10+
```
11+
/doc:note [task description]
12+
```
13+
14+
## Description
15+
The `doc:note` command generates professional engineering notes about completed tasks and appends them to a persistent log file (`~/engineering-notes.md`). It automatically searches for relevant context including GitHub PR URLs, issue numbers, and Jira ticket references in the conversation history and git repository.
16+
17+
This command helps engineers maintain a structured record of their daily work, making it easier to:
18+
- Track accomplishments for performance reviews
19+
- Generate status reports and weekly updates
20+
- Maintain a searchable history of technical decisions
21+
- Document completed work with proper attribution
22+
23+
## Implementation
24+
The command performs the following steps:
25+
1. **Context gathering**: Searches conversation history for GitHub PR URLs, issue numbers, or Jira ticket keys (e.g., PROJ-123)
26+
2. **Git analysis**: If in a git repository, checks recent commits and current branch name for references
27+
3. **Note generation**: Creates a 1-2 sentence note with:
28+
- Today's date in YYYY-MM-DD format
29+
- Accomplishment framed in past tense
30+
- Technical details and specific technologies used
31+
- Impact and value delivered
32+
- All relevant links inline
33+
4. **File management**: Appends the note to `~/engineering-notes.md` (creates file if it doesn't exist) with proper spacing
34+
35+
If the task description argument is omitted, the command will attempt to discover a task description from relevant context (e.g. git repository status and conversation history). If no relevant context is discovered, or if more information is needed, the command will prompt for further context.
36+
37+
## Return Value
38+
- **Success**: Confirmation message with the generated note
39+
- **File created**: `~/engineering-notes.md` (if it didn't exist)
40+
- **File updated**: Note appended with blank line separator
41+
42+
## Examples
43+
44+
1. **Basic usage with task description**:
45+
```
46+
/doc:note Implemented user authentication with OAuth2
47+
```
48+
Generates:
49+
```
50+
2025-10-24 - Implemented user authentication using OAuth2. Integrated with Google and GitHub providers, added JWT token management, and secured API endpoints with role-based access control.
51+
52+
```
53+
54+
2. **Without task description (auto-discovers from context)**:
55+
```
56+
/doc:note
57+
```
58+
The command analyzes git repository and conversation history to generate a note. If insufficient context is available, it will prompt for details.
59+
60+
3. **With git context**:
61+
```
62+
/doc:note Fixed critical bug in payment processor
63+
```
64+
If on a branch named `fix/payment-timeout` with recent commits, generates:
65+
```
66+
2025-10-24 - Fixed critical timeout bug in payment processor (PR #123). Optimized database queries and added connection pooling, reducing payment processing time by 60% and eliminating timeout errors.
67+
68+
```
69+
70+
## Arguments
71+
- `[task description]`: Optional description of the completed task. If omitted, the command attempts to discover context automatically.

0 commit comments

Comments
 (0)