claude-autopm 3.1.0 → 3.1.2

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.
@@ -4,11 +4,11 @@ allowed-tools: Bash, Read, Write, LS
4
4
 
5
5
  # PRD New
6
6
 
7
- Launch interactive brainstorming session for new product requirement document.
7
+ Create new product requirement document - interactively or from existing content.
8
8
 
9
9
  ## Usage
10
10
  ```
11
- /pm:prd-new <feature_name> [--local]
11
+ /pm:prd-new <feature_name> [options]
12
12
  ```
13
13
 
14
14
  ## Flags
@@ -19,11 +19,62 @@ Launch interactive brainstorming session for new product requirement document.
19
19
  : No GitHub/Azure synchronization required
20
20
  : Ideal for working offline or without remote provider configured
21
21
 
22
- Example:
22
+ `--content`, `-c`
23
+ : PRD content for non-interactive mode
24
+ : Use `@filepath` to read from file (e.g., `--content @/path/to/draft.md`)
25
+ : Use inline text for short content (e.g., `--content "# My PRD..."`)
26
+ : Skips interactive wizard completely
27
+ : Ideal for importing existing PRDs or automated workflows
28
+
29
+ `--force`, `-f`
30
+ : Overwrite existing PRD file if it exists
31
+
32
+ `--priority`, `-p`
33
+ : Set PRD priority (P0/P1/P2/P3, default: P2)
34
+
35
+ `--timeline`
36
+ : Set PRD timeline (e.g., "Q1 2025")
37
+
38
+ ## Examples
39
+
40
+ ### Interactive mode (default)
41
+ ```
42
+ /pm:prd-new user-authentication
43
+ ```
44
+
45
+ ### Local mode
23
46
  ```
24
47
  /pm:prd-new user-authentication --local
25
48
  ```
26
49
 
50
+ ### From existing file
51
+ ```
52
+ /pm:prd-new payment-gateway --content @docs/drafts/payment-prd.md
53
+ ```
54
+
55
+ ### From clipboard/inline content
56
+ ```
57
+ /pm:prd-new api-v2 --content "# API v2 Redesign
58
+
59
+ ## Problem Statement
60
+ Current API has performance issues...
61
+
62
+ ## Goals
63
+ 1. Improve response times
64
+ 2. Better error handling
65
+ "
66
+ ```
67
+
68
+ ### With metadata
69
+ ```
70
+ /pm:prd-new critical-fix --content @bug-report.md --priority P0 --timeline "This Sprint"
71
+ ```
72
+
73
+ ### Force overwrite
74
+ ```
75
+ /pm:prd-new existing-feature --content @updated-prd.md --force
76
+ ```
77
+
27
78
  ## Required Documentation Access
28
79
 
29
80
  **MANDATORY:** Before creating PRDs, query Context7 for best practices:
@@ -42,6 +93,43 @@ Example:
42
93
 
43
94
  ## Instructions
44
95
 
96
+ ### Mode Detection
97
+
98
+ Parse the arguments to detect the mode:
99
+ - If `--content @<filepath>` is present → **Content from file mode**
100
+ - If `--content "<text>"` is present → **Content from inline text mode**
101
+ - Otherwise → **Interactive mode**
102
+
103
+ ### Content from File Mode (`--content @filepath`)
104
+
105
+ 1. Extract the file path from `--content @<filepath>` argument
106
+ 2. Use the Read tool to read the source file content
107
+ 3. Check if target PRD already exists at `.claude/prds/<feature_name>.md`
108
+ - If exists and `--force` not provided → Error and stop
109
+ - If exists and `--force` provided → Continue (will overwrite)
110
+ 4. Prepare the PRD content:
111
+ - If source content starts with `---` (has frontmatter) → Use as-is
112
+ - If no frontmatter → Add frontmatter with:
113
+ ```yaml
114
+ ---
115
+ title: <feature_name>
116
+ status: draft
117
+ priority: <from --priority or P2>
118
+ created: <current ISO timestamp>
119
+ author: <from git config or "unknown">
120
+ timeline: <from --timeline or "TBD">
121
+ ---
122
+ ```
123
+ 5. Create directory `.claude/prds/` if it doesn't exist (use Bash: `mkdir -p .claude/prds`)
124
+ 6. Write the PRD file using the Write tool to `.claude/prds/<feature_name>.md`
125
+ 7. Confirm success and show next steps
126
+
127
+ ### Content from Inline Text Mode (`--content "text"`)
128
+
129
+ Same as file mode, but use the inline text directly instead of reading from file.
130
+
131
+ ### Interactive Mode (default)
132
+
45
133
  Run `node .claude/scripts/pm/prd-new.js $ARGUMENTS` using the Bash tool and show me the complete output.
46
134
 
47
135
  This will launch an interactive brainstorming session that will:
@@ -52,4 +140,16 @@ This will launch an interactive brainstorming session that will:
52
140
  5. Capture technical considerations
53
141
  6. Generate a comprehensive PRD with proper frontmatter
54
142
 
55
- The script handles all validation, creates the necessary directories, and saves the PRD to `.claude/prds/$ARGUMENTS.md`.
143
+ The script handles all validation, creates the necessary directories, and saves the PRD to `.claude/prds/<feature_name>.md`.
144
+
145
+ ## Output
146
+
147
+ After successful PRD creation, show:
148
+ ```
149
+ ✅ PRD created: .claude/prds/<feature_name>.md
150
+
151
+ 📋 Next steps:
152
+ 1. Review: /pm:prd-show <feature_name>
153
+ 2. Edit: /pm:prd-edit <feature_name>
154
+ 3. Parse: /pm:prd-parse <feature_name>
155
+ ```