@orderful/droid 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.claude/CLAUDE.md +6 -7
  2. package/.github/workflows/changeset-check.yml +11 -1
  3. package/.github/workflows/ci.yml +5 -0
  4. package/.github/workflows/release.yml +7 -0
  5. package/CHANGELOG.md +36 -0
  6. package/dist/commands/tui.d.ts.map +1 -1
  7. package/dist/commands/tui.js +98 -19
  8. package/dist/commands/tui.js.map +1 -1
  9. package/dist/lib/skills.d.ts +38 -0
  10. package/dist/lib/skills.d.ts.map +1 -1
  11. package/dist/lib/skills.js +130 -4
  12. package/dist/lib/skills.js.map +1 -1
  13. package/dist/skills/comments/SKILL.md +28 -5
  14. package/dist/skills/comments/SKILL.yaml +6 -2
  15. package/dist/skills/comments/commands/comments.md +15 -34
  16. package/dist/skills/project/SKILL.md +93 -0
  17. package/dist/skills/project/SKILL.yaml +35 -0
  18. package/dist/skills/project/commands/README.md +26 -0
  19. package/dist/skills/project/commands/project.md +39 -0
  20. package/dist/skills/project/references/changelog.md +70 -0
  21. package/dist/skills/project/references/creating.md +58 -0
  22. package/dist/skills/project/references/loading.md +40 -0
  23. package/dist/skills/project/references/templates.md +124 -0
  24. package/dist/skills/project/references/updating.md +64 -0
  25. package/dist/skills/project/references/versioning.md +36 -0
  26. package/package.json +1 -1
  27. package/src/commands/tui.tsx +120 -21
  28. package/src/lib/skills.ts +160 -4
  29. package/src/skills/comments/SKILL.md +28 -5
  30. package/src/skills/comments/SKILL.yaml +6 -2
  31. package/src/skills/comments/commands/comments.md +15 -34
  32. package/src/skills/project/SKILL.md +93 -0
  33. package/src/skills/project/SKILL.yaml +35 -0
  34. package/src/skills/project/commands/README.md +26 -0
  35. package/src/skills/project/commands/project.md +39 -0
  36. package/src/skills/project/references/changelog.md +70 -0
  37. package/src/skills/project/references/creating.md +58 -0
  38. package/src/skills/project/references/loading.md +40 -0
  39. package/src/skills/project/references/templates.md +124 -0
  40. package/src/skills/project/references/updating.md +64 -0
  41. package/src/skills/project/references/versioning.md +36 -0
package/src/lib/skills.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync } from 'fs';
1
+ import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
2
2
  import { join, dirname } from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { fileURLToPath } from 'url';
@@ -156,6 +156,129 @@ export function getInstalledSkill(skillName: string): InstalledSkill | null {
156
156
  return config.skills[skillName] || null;
157
157
  }
158
158
 
159
+ /**
160
+ * Check if a skill has an update available
161
+ */
162
+ export function getSkillUpdateStatus(skillName: string): {
163
+ hasUpdate: boolean;
164
+ installedVersion: string | null;
165
+ bundledVersion: string | null;
166
+ } {
167
+ const installed = getInstalledSkill(skillName);
168
+ const bundledSkillDir = join(BUNDLED_SKILLS_DIR, skillName);
169
+ const manifest = existsSync(bundledSkillDir) ? loadSkillManifest(bundledSkillDir) : null;
170
+
171
+ if (!installed || !manifest) {
172
+ return {
173
+ hasUpdate: false,
174
+ installedVersion: installed?.version || null,
175
+ bundledVersion: manifest?.version || null,
176
+ };
177
+ }
178
+
179
+ return {
180
+ hasUpdate: manifest.version !== installed.version,
181
+ installedVersion: installed.version,
182
+ bundledVersion: manifest.version,
183
+ };
184
+ }
185
+
186
+ /**
187
+ * Get all installed skills that have updates available
188
+ */
189
+ export function getSkillsWithUpdates(): Array<{
190
+ name: string;
191
+ installedVersion: string;
192
+ bundledVersion: string;
193
+ }> {
194
+ const config = loadConfig();
195
+ const updates: Array<{ name: string; installedVersion: string; bundledVersion: string }> = [];
196
+
197
+ for (const skillName of Object.keys(config.skills)) {
198
+ const status = getSkillUpdateStatus(skillName);
199
+ if (status.hasUpdate && status.installedVersion && status.bundledVersion) {
200
+ updates.push({
201
+ name: skillName,
202
+ installedVersion: status.installedVersion,
203
+ bundledVersion: status.bundledVersion,
204
+ });
205
+ }
206
+ }
207
+
208
+ return updates;
209
+ }
210
+
211
+ /**
212
+ * Update a skill to the latest bundled version
213
+ */
214
+ export function updateSkill(skillName: string): { success: boolean; message: string } {
215
+ const status = getSkillUpdateStatus(skillName);
216
+
217
+ if (!status.installedVersion) {
218
+ return { success: false, message: `Skill '${skillName}' is not installed` };
219
+ }
220
+
221
+ if (!status.bundledVersion) {
222
+ return { success: false, message: `Skill '${skillName}' not found in bundled skills` };
223
+ }
224
+
225
+ if (!status.hasUpdate) {
226
+ return { success: false, message: `Skill '${skillName}' is already at latest version (${status.installedVersion})` };
227
+ }
228
+
229
+ // Reinstall the skill (install handles overwriting existing files)
230
+ const result = installSkill(skillName);
231
+ if (result.success) {
232
+ return {
233
+ success: true,
234
+ message: `Updated ${skillName} from ${status.installedVersion} to ${status.bundledVersion}`,
235
+ };
236
+ }
237
+
238
+ return result;
239
+ }
240
+
241
+ /**
242
+ * Update all installed skills that have newer bundled versions
243
+ */
244
+ export function updateAllSkills(): {
245
+ updated: Array<{ name: string; from: string; to: string }>;
246
+ failed: Array<{ name: string; error: string }>;
247
+ upToDate: number;
248
+ } {
249
+ const config = loadConfig();
250
+ const result = {
251
+ updated: [] as Array<{ name: string; from: string; to: string }>,
252
+ failed: [] as Array<{ name: string; error: string }>,
253
+ upToDate: 0,
254
+ };
255
+
256
+ for (const skillName of Object.keys(config.skills)) {
257
+ const status = getSkillUpdateStatus(skillName);
258
+
259
+ if (!status.hasUpdate) {
260
+ result.upToDate++;
261
+ continue;
262
+ }
263
+
264
+ const updateResult = updateSkill(skillName);
265
+ if (updateResult.success) {
266
+ result.updated.push({
267
+ name: skillName,
268
+ from: status.installedVersion!,
269
+ to: status.bundledVersion!,
270
+ });
271
+ } else {
272
+ result.failed.push({
273
+ name: skillName,
274
+ error: updateResult.message,
275
+ });
276
+ }
277
+ }
278
+
279
+ return result;
280
+ }
281
+
159
282
  /**
160
283
  * Install a skill
161
284
  */
@@ -186,6 +309,34 @@ export function installSkill(skillName: string): { success: boolean; message: st
186
309
 
187
310
  const skillsPath = getSkillsInstallPath(config.ai_tool);
188
311
  const targetSkillDir = join(skillsPath, skillName);
312
+ const commandsPath = getCommandsInstallPath(config.ai_tool);
313
+
314
+ // Check for collisions BEFORE installing (only if not already installed by droid)
315
+ if (!config.skills[skillName]) {
316
+ // Check skill folder collision
317
+ if (existsSync(targetSkillDir)) {
318
+ return {
319
+ success: false,
320
+ message: `Cannot install: skill folder '${skillName}' already exists at ${targetSkillDir}`,
321
+ };
322
+ }
323
+
324
+ // Check command file collisions
325
+ const commandsSource = join(bundledSkillDir, 'commands');
326
+ if (existsSync(commandsSource)) {
327
+ const commandFiles = readdirSync(commandsSource).filter(f => f.endsWith('.md') && f.toLowerCase() !== 'readme.md');
328
+ for (const file of commandFiles) {
329
+ const targetCommandPath = join(commandsPath, file);
330
+ if (existsSync(targetCommandPath)) {
331
+ const commandName = file.replace('.md', '');
332
+ return {
333
+ success: false,
334
+ message: `Cannot install: command /${commandName} already exists at ${targetCommandPath}`,
335
+ };
336
+ }
337
+ }
338
+ }
339
+ }
189
340
 
190
341
  // Ensure skills directory exists
191
342
  if (!existsSync(skillsPath)) {
@@ -206,11 +357,16 @@ export function installSkill(skillName: string): { success: boolean; message: st
206
357
  // Copy commands if present
207
358
  const commandsSource = join(bundledSkillDir, 'commands');
208
359
  if (existsSync(commandsSource)) {
209
- const commandsPath = getCommandsInstallPath(config.ai_tool);
210
360
  if (!existsSync(commandsPath)) {
211
361
  mkdirSync(commandsPath, { recursive: true });
212
362
  }
213
- cpSync(commandsSource, commandsPath, { recursive: true });
363
+ const commandFiles = readdirSync(commandsSource).filter(f => f.endsWith('.md') && f.toLowerCase() !== 'readme.md');
364
+ for (const file of commandFiles) {
365
+ const sourcePath = join(commandsSource, file);
366
+ const targetPath = join(commandsPath, file);
367
+ const content = readFileSync(sourcePath, 'utf-8');
368
+ writeFileSync(targetPath, content);
369
+ }
214
370
  }
215
371
 
216
372
  // Update config
@@ -249,7 +405,7 @@ export function uninstallSkill(skillName: string): { success: boolean; message:
249
405
  const commandsSource = join(bundledSkillDir, 'commands');
250
406
  if (existsSync(commandsSource)) {
251
407
  const commandsPath = getCommandsInstallPath(config.ai_tool);
252
- const commandFiles = readdirSync(commandsSource);
408
+ const commandFiles = readdirSync(commandsSource).filter(f => f.endsWith('.md') && f.toLowerCase() !== 'readme.md');
253
409
  for (const file of commandFiles) {
254
410
  const commandPath = join(commandsPath, file);
255
411
  if (existsSync(commandPath)) {
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: comments
3
- description: Inline conversation in any file via @droid/@user markers
3
+ description: >-
4
+ Enable inline code conversations using @droid markers. Leave comments like
5
+ "> @droid should we cache this?" and get responses inline. Use /comments check
6
+ to scan for markers and address them, /comments cleanup to remove resolved threads.
7
+ Ideal for code review notes, quick questions, and async collaboration in any file.
4
8
  globs:
5
9
  - "**/*"
6
10
  alwaysApply: false
@@ -28,10 +32,29 @@ The AI will respond with `> @{user_mention}` (configured in droid setup, e.g., `
28
32
 
29
33
  ## Tag Convention
30
34
 
31
- | Who | Tag |
32
- |-----|-----|
33
- | AI | `@droid` (+ any configured aliases) |
34
- | User | Configured (e.g., `@fry`) |
35
+ | Tag | Who's Speaking | Purpose |
36
+ |-----|----------------|---------|
37
+ | `@droid` | User | User leaving notes/questions for AI |
38
+ | `@{user}` (e.g., `@fry`) | AI | AI leaving responses/questions for user |
39
+
40
+ **The pattern:** The tag indicates who you're addressing, not who's writing. When you write `> @droid`, you're talking TO the AI. When the AI writes `> @fry`, it's talking TO you.
41
+
42
+ ## When NOT to Use
43
+
44
+ - **Multi-file refactors** → describe in a task or issue, not scattered comments
45
+ - **Formal code review** → use PR review process
46
+ - **Questions needing persistent answers** → capture in dedicated documentation
47
+
48
+ Inline comments shine for localized questions and actions within a file. For longer back-and-forth discussions in documents, they work great too - just be mindful that very long threads may be better moved to dedicated docs.
49
+
50
+ ## Context Gathering
51
+
52
+ When you find a `@droid` marker:
53
+
54
+ 1. **Read surrounding context** - 20-30 lines around the comment
55
+ 2. **Check git status** - Prioritize files with uncommitted changes
56
+ 3. **Look for related markers** - Multiple comments in same file may be connected
57
+ 4. **Consider file type** - Match response format to the file (code comments vs markdown)
35
58
 
36
59
  ## Commands
37
60
 
@@ -1,6 +1,10 @@
1
1
  name: comments
2
- description: Inline conversation in any file via @droid/@user markers
3
- version: 0.1.0
2
+ description: >-
3
+ Enable inline code conversations using @droid markers. Leave comments like
4
+ "> @droid should we cache this?" and get responses inline. Use /comments check
5
+ to scan for markers and address them, /comments cleanup to remove resolved threads.
6
+ Ideal for code review notes, quick questions, and async collaboration in any file.
7
+ version: 0.2.0
4
8
  status: beta
5
9
  dependencies: []
6
10
  provides_output: false
@@ -1,6 +1,16 @@
1
+ ---
2
+ description: Check and respond to inline @droid comments in code and docs
3
+ argument-hint: [check|cleanup] [path]
4
+ allowed-tools: Read, Edit, Grep, Glob, Bash(git diff:*), Bash(git status:*)
5
+ ---
6
+
1
7
  # /comments - Check and respond to inline comments
2
8
 
3
- Check for `> @droid` comments (and configured aliases like `@claude`) in files and address them.
9
+ Entry point for inline comment workflows. See the **comments skill** for full behavior.
10
+
11
+ ## Arguments
12
+
13
+ $ARGUMENTS
4
14
 
5
15
  ## Usage
6
16
 
@@ -11,38 +21,9 @@ Check for `> @droid` comments (and configured aliases like `@claude`) in files a
11
21
  /comments cleanup # Remove resolved comment threads
12
22
  ```
13
23
 
14
- ## Arguments
15
-
16
- $ACTION - The action to perform: check (default) or cleanup
17
- $PATH - Optional path to scope the search
18
-
19
24
  ## Behavior
20
25
 
21
- When you find a `> @droid` comment (or configured alias):
22
-
23
- 1. **Read the context** - Understand what the comment is asking by reading surrounding code/text
24
- 2. **Determine intent**:
25
- - If it's an **action request** (e.g., "add error handling", "refactor this"):
26
- - Execute the requested action
27
- - Remove the comment (unless preserve_comments is true)
28
- - If it's a **question** (e.g., "what do you think?", "is this approach good?"):
29
- - Respond with `> @{user_mention}` on a new line below
30
- - Keep the original comment for context
31
- 3. **Check git diff first** - If there's uncommitted changes, prioritize checking those files
32
-
33
- ## Response Format
34
-
35
- When responding to questions, use the configured user tag:
36
-
37
- ```markdown
38
- > @droid Should we use async/await here?
39
-
40
- > @fry Yes, async/await would be cleaner here because...
41
- ```
42
-
43
- ## Configuration
44
-
45
- Check `~/.droid/skills/comments/overrides.yaml` for:
46
- - `user_mention` - Your @mention for responses
47
- - `ai_mentions` - Additional mentions to recognize (e.g., `@claude`)
48
- - `preserve_comments` - Keep or remove addressed comments
26
+ Refer to the comments skill for:
27
+ - **Check**: How to find markers, determine intent (action vs question), respond appropriately
28
+ - **Cleanup**: How to identify resolved threads and summarize decisions
29
+ - **Configuration**: `user_mention`, `ai_mentions`, `preserve_comments` settings
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: project
3
+ description: >-
4
+ Manage project context files for persistent AI memory across sessions.
5
+ Load project context before working (/project {name}), update with
6
+ new learnings (/project update), or create new projects (/project create).
7
+ Use when working on multi-session features, refactors, or any work that
8
+ benefits from accumulated context.
9
+ globs:
10
+ - "**/PROJECT.md"
11
+ alwaysApply: false
12
+ ---
13
+
14
+ # Project Skill
15
+
16
+ Persistent project context that survives across sessions. Projects are folders containing `PROJECT.md` + `CHANGELOG.md`.
17
+
18
+ ## Why Projects?
19
+
20
+ Chat history disappears. Projects persist.
21
+
22
+ - **Context accumulates** - Each session starts with full project knowledge
23
+ - **Decisions are captured** - No re-explaining why something was built a certain way
24
+ - **Progress is tracked** - Semantic versioning + changelog show evolution
25
+
26
+ ## When NOT to Use
27
+
28
+ - One-off tasks that don't need persistence
29
+ - Simple questions or lookups
30
+ - Tasks with sufficient context already in conversation
31
+ - Quick fixes that don't warrant project tracking
32
+
33
+ ## Configuration
34
+
35
+ Check `~/.droid/skills/project/overrides.yaml` for user settings:
36
+
37
+ | Setting | Default | Description |
38
+ |---------|---------|-------------|
39
+ | `projects_dir` | `~/{ai_tool}/projects` | Where projects are stored (varies by AI tool) |
40
+ | `preset` | `markdown` | Output format: `markdown` or `obsidian` |
41
+
42
+ Default `projects_dir` by AI tool:
43
+ - **claude-code**: `~/.claude/projects`
44
+ - **opencode**: `~/.opencode/projects`
45
+
46
+ ## Commands
47
+
48
+ | Command | Action |
49
+ |---------|--------|
50
+ | `/project` | List and select a project |
51
+ | `/project {keywords}` | Fuzzy-match and load |
52
+ | `/project create {name}` | Create new project |
53
+ | `/project update` | Update from conversation context |
54
+
55
+ ## Loading a Project
56
+
57
+ **Trigger:** `/project {keywords}` or user asks to load/open a project
58
+
59
+ **TLDR:** Fuzzy-match keywords against project folders, read PROJECT.md, summarize context.
60
+
61
+ Full procedure: `references/loading.md`
62
+
63
+ ## Updating a Project
64
+
65
+ **Trigger:** `/project update` or user asks to capture/save learnings
66
+
67
+ **TLDR:** Analyze conversation for decisions/patterns/progress, propose changes, bump version, update changelog.
68
+
69
+ Full procedure: `references/updating.md`
70
+ Version rules: `references/versioning.md`
71
+ Changelog format: `references/changelog.md`
72
+
73
+ ## Creating a Project
74
+
75
+ **Trigger:** `/project create {name?}` or user asks to start a new project
76
+
77
+ **TLDR:** Create folder in `projects_dir`, generate PROJECT.md + CHANGELOG.md from templates.
78
+
79
+ Full procedure: `references/creating.md`
80
+ Templates: `references/templates.md`
81
+
82
+ ## The Flywheel
83
+
84
+ Projects work best in a cycle:
85
+
86
+ 1. **Load** - `/project {name}` gives Claude full context
87
+ 2. **Research/Plan** - Explore the problem, consider approaches
88
+ 3. **Document** - Capture decisions in PROJECT.md before implementing
89
+ 4. **Implement** - Build with full context of why decisions were made
90
+ 5. **Capture** - `/project update` saves new learnings
91
+ 6. **Repeat** - Next session starts with accumulated knowledge
92
+
93
+ Each cycle starts further ahead than the last.
@@ -0,0 +1,35 @@
1
+ name: project
2
+ description: >-
3
+ Manage project context files for persistent AI memory across sessions.
4
+ Load project context before working (/project {name}), update with
5
+ new learnings (/project update), or create new projects (/project create).
6
+ Use when working on multi-session features, refactors, or any work that
7
+ benefits from accumulated context.
8
+ version: 0.1.0
9
+ status: beta
10
+ dependencies: []
11
+ provides_output: false
12
+ config_schema:
13
+ projects_dir:
14
+ type: string
15
+ description: Path to projects directory (default varies by AI tool)
16
+ preset:
17
+ type: select
18
+ description: Output format for templates
19
+ default: "markdown"
20
+ options:
21
+ - markdown
22
+ - obsidian
23
+ examples:
24
+ - title: "Load project by name"
25
+ code: |
26
+ /project transaction templates
27
+ # Fuzzy matches "transaction-templates" folder
28
+ - title: "Update after work session"
29
+ code: |
30
+ /project update
31
+ # Analyzes conversation, proposes PROJECT.md updates
32
+ - title: "Create new project"
33
+ code: |
34
+ /project create billing-refactor
35
+ # Creates folder with PROJECT.md and CHANGELOG.md
@@ -0,0 +1,26 @@
1
+ # Project Commands
2
+
3
+ Commands for managing project context files.
4
+
5
+ ## Available Commands
6
+
7
+ | Command | Description |
8
+ |---------|-------------|
9
+ | `/project` | Main command - load, update, or create projects |
10
+
11
+ ## How It Works
12
+
13
+ The `/project` command handles multiple operations via subcommands:
14
+
15
+ - `/project` or `/project {keywords}` - Load a project
16
+ - `/project load {name}` - Explicit load
17
+ - `/project update {name?}` - Update project from conversation
18
+ - `/project create {name?}` - Create new project
19
+
20
+ ## Adding Commands
21
+
22
+ If you want to add additional project-related commands (like `/project stats` or `/project archive`), create a new `.md` file in this directory. The command will be namespaced under the skill name.
23
+
24
+ Example: `project-stats.md` -> `/project stats` (if following the hyphenated naming convention)
25
+
26
+ See the skill's SKILL.md for the full behavior specification.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Manage project context files for persistent AI memory across sessions
3
+ argument-hint: [name | update [name] | create [name]]
4
+ allowed-tools: Read, Write, Edit, Glob, Bash(mkdir:*), Bash(ls:*)
5
+ ---
6
+
7
+ # /project
8
+
9
+ Entry point for project context management. See the **project skill** for full behavior.
10
+
11
+ ## Arguments
12
+
13
+ $ARGUMENTS
14
+
15
+ ## Usage
16
+
17
+ ```
18
+ /project # List and select a project
19
+ /project {keywords} # Fuzzy-match and load
20
+ /project update # Update from conversation context
21
+ /project update {name} # Update specific project
22
+ /project create # Create new project interactively
23
+ /project create {name} # Create with name
24
+ ```
25
+
26
+ ## Configuration
27
+
28
+ From `~/.droid/skills/project/overrides.yaml`:
29
+ - `projects_dir` - Where projects live (default varies by AI tool)
30
+ - `preset` - Template format: `markdown` or `obsidian`
31
+
32
+ ## Behavior
33
+
34
+ Refer to the project skill for:
35
+ - **Loading**: How to fuzzy-match, handle multiple matches, summarize after load
36
+ - **Updating**: What to extract from conversation, versioning rules, changelog format
37
+ - **Creating**: Template structure by preset, required files
38
+
39
+ The skill's `references/` folder contains detailed specs for versioning, changelog formatting, and templates.
@@ -0,0 +1,70 @@
1
+ # Changelog Formatting
2
+
3
+ Projects use a split file pattern to minimize context usage when loading.
4
+
5
+ ## File Structure
6
+
7
+ - `CHANGELOG.md` (sibling to PROJECT.md) - Complete version history
8
+ - `PROJECT.md` - Only 3 most recent entries + link to full history
9
+
10
+ ## On Update
11
+
12
+ 1. **Check for CHANGELOG.md** sibling
13
+ - If missing: Create it and migrate any existing entries from PROJECT.md
14
+
15
+ 2. **Add new entry to CHANGELOG.md** (prepend after header)
16
+
17
+ 3. **Update PROJECT.md changelog section**
18
+ - Keep only 3 most recent entries
19
+ - Ensure link to full history exists
20
+
21
+ ## CHANGELOG.md Format
22
+
23
+ ```markdown
24
+ # Changelog
25
+
26
+ All notable changes to the {Project Name} project.
27
+
28
+ ## X.Y.Z - YYYY-MM-DD
29
+ - [Change description]
30
+ - [Another change]
31
+
32
+ ## X.Y.Z - YYYY-MM-DD
33
+ - [Previous changes]
34
+ ```
35
+
36
+ ## PROJECT.md Changelog Section Format
37
+
38
+ **Markdown preset:**
39
+ ```markdown
40
+ ## Changelog
41
+
42
+ See [CHANGELOG.md](CHANGELOG.md) for full history.
43
+
44
+ ### X.Y.Z - YYYY-MM-DD
45
+ - [Most recent]
46
+
47
+ ### X.Y.Z - YYYY-MM-DD
48
+ - [Second most recent]
49
+
50
+ ### X.Y.Z - YYYY-MM-DD
51
+ - [Third most recent]
52
+ ```
53
+
54
+ **Obsidian preset:**
55
+ ```markdown
56
+ ## Changelog
57
+
58
+ See [[CHANGELOG|full history]].
59
+
60
+ ### X.Y.Z - YYYY-MM-DD
61
+ - [Most recent]
62
+ ```
63
+
64
+ ## Guidelines
65
+
66
+ - Use present tense ("Add feature" not "Added feature")
67
+ - Keep entries concise but descriptive
68
+ - Group related changes in a single bullet when appropriate
69
+ - Most recent version at the top
70
+ - Use `##` headers in CHANGELOG.md, `###` in PROJECT.md
@@ -0,0 +1,58 @@
1
+ # Creating a Project
2
+
3
+ **Trigger:** `/project create {name?}` or user asks to start a new project
4
+
5
+ ## Procedure
6
+
7
+ 1. **Get project name**
8
+ - Use provided name, or ask if not provided
9
+ - Convert to kebab-case for folder name
10
+ - Convert to Title Case for display name
11
+
12
+ 2. **Create project folder**
13
+ - Path: `{projects_dir}/{kebab-case-name}/`
14
+ - Verify folder doesn't already exist
15
+
16
+ 3. **Create files from templates** (see `templates.md`)
17
+ - `PROJECT.md` - Main context file
18
+ - `CHANGELOG.md` - Version history
19
+ - Format varies by `preset` config (markdown vs obsidian)
20
+
21
+ 4. **Confirm creation**
22
+ - Show created folder path
23
+ - Offer to help fill in sections (Overview, Goals, Technical Details)
24
+
25
+ ## Naming Convention
26
+
27
+ | Input | Folder Name | Display Name |
28
+ |-------|-------------|--------------|
29
+ | "billing refactor" | `billing-refactor` | "Billing Refactor" |
30
+ | "API v2" | `api-v2` | "API V2" |
31
+ | "my-feature" | `my-feature` | "My Feature" |
32
+
33
+ ## Example
34
+
35
+ ```
36
+ User: /project create billing refactor
37
+
38
+ Claude: Creating new project...
39
+
40
+ Created: ~/.claude/projects/billing-refactor/
41
+ ├── PROJECT.md
42
+ └── CHANGELOG.md
43
+
44
+ Project "Billing Refactor" initialized at v0.1.0.
45
+
46
+ Would you like help filling in the Overview, Goals, or Technical Details sections?
47
+ ```
48
+
49
+ ## Initial Structure
50
+
51
+ New projects start minimal and grow organically. Common sections added over time:
52
+
53
+ - **Current Work** - Active tasks and focus areas
54
+ - **Decisions Log** - Key decisions with rationale
55
+ - **Related** - Links to other docs, tickets, repos
56
+ - **Roadmap** - Future phases
57
+
58
+ See `templates.md` for the full initial template.
@@ -0,0 +1,40 @@
1
+ # Loading a Project
2
+
3
+ **Trigger:** `/project {keywords}` or user asks to load/open a project
4
+
5
+ ## Procedure
6
+
7
+ 1. **List projects** in configured `projects_dir`
8
+ - Each subfolder with a `PROJECT.md` is a project
9
+
10
+ 2. **If no name provided:**
11
+ - Use AskUserQuestion to present available projects
12
+ - Let user select which to load
13
+
14
+ 3. **If name/keywords provided:**
15
+ - Parse as space-separated keywords (e.g., "transaction templates" → `["transaction", "templates"]`)
16
+ - Find folders where name contains ALL keywords (case-insensitive, hyphens as word separators)
17
+
18
+ 4. **Based on matches:**
19
+ - **No matches**: List available projects, ask user to select
20
+ - **One match**: Read `{folder}/PROJECT.md`
21
+ - **Multiple matches**: Use AskUserQuestion to select from matches
22
+
23
+ 5. **After loading:**
24
+ - Confirm which project was loaded
25
+ - Summarize key context (2-3 sentences)
26
+ - Use project contents for all subsequent work in the session
27
+
28
+ ## Example
29
+
30
+ ```
31
+ User: /project transaction templates
32
+
33
+ Claude: Found project "transaction-templates". Loading...
34
+
35
+ Loaded #project-transaction-templates (v1.16.1)
36
+
37
+ This project covers Handlebars templates for EDI transaction generation.
38
+ Key focus areas: template rendering service, permission controls, and
39
+ the upcoming UI for template management.
40
+ ```