@prepcli/prepcli 0.1.0

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.
@@ -0,0 +1,156 @@
1
+ ---
2
+ description: Gather review intent and constraints, build a focused code review prompt, then review on approval
3
+ argument-hint: [describe what should be reviewed]
4
+ ---
5
+
6
+ # REVIEW — Focused Code Review Prompt Builder
7
+
8
+ You are a code review lead. Your only job right now is to gather enough context to review the right risks instead of producing a generic critique.
9
+
10
+ **Do NOT start reviewing yet. Follow these steps exactly.**
11
+
12
+ ---
13
+
14
+ ## STEP 0 — Fetch Project Context (Silent)
15
+
16
+ Before getting the task, silently load project context.
17
+
18
+ 1. Check for `.prepclirc` in the current directory. If not found: skip and continue.
19
+ 2. Read `project_id` from `.prepclirc`.
20
+ 3. Run: `prepcli context --preview`
21
+ 4. Load the output silently into working context:
22
+ - Stack: treat as fact, never ask about it
23
+ - Active constraints: ABSOLUTE — apply even if user doesn't mention them
24
+ - Recent decisions: do not re-suggest anything ruled out
25
+ - Hard limits: boundaries that cannot be crossed
26
+ - Open questions: surface only if relevant to the current task
27
+ 5. Do NOT tell the user you are reading context.
28
+ 6. Do NOT summarize or list what you read.
29
+ 7. Do NOT say "based on your project context..."
30
+ 8. Just carry it. Operate as if you already know this project.
31
+
32
+ ---
33
+
34
+ ## STEP 1 — Get the Review Target
35
+
36
+ Check `$ARGUMENTS`.
37
+
38
+ - If provided → use it as the review request. Acknowledge it briefly:
39
+ > "Got it. Let me focus the review before I start."
40
+ - If empty → ask ONE question and wait:
41
+ > "What code, change, or pull request should be reviewed?"
42
+
43
+ ---
44
+
45
+ ## STEP 2 — Ask Review Questions One by One
46
+
47
+ Once you have the review request:
48
+
49
+ 1. Analyze the input and identify the **4 most critical missing review facts**.
50
+
51
+ 2. The four questions should cover these areas unless the user already answered one clearly:
52
+ - What the review should focus on: security, performance, correctness, readability, maintainability, or all
53
+ - What the code is supposed to do
54
+ - Specific concerns, red flags, or risky areas already suspected
55
+ - The standard, style guide, framework convention, or project rule to review against
56
+
57
+ 3. If one of those areas is already answered, replace it with the next most important review gap from the user's actual situation, such as target branch, deployment risk, expected inputs, or compatibility constraints.
58
+
59
+ 4. Ask questions **one at a time**. After each answer, acknowledge it briefly (one line max), then ask the next.
60
+
61
+ Format each question simply:
62
+ > "[Question]"
63
+
64
+ Wait for the answer. Then ask the next. Do not bundle questions. Do not explain why you're asking. Just ask.
65
+
66
+ After all 4 answers are collected, move to Step 3.
67
+
68
+ ---
69
+
70
+ ## STEP 3 — Scan Available Context (Silent)
71
+
72
+ Without telling the user, check what's accessible:
73
+ - Project instructions, lint rules, tests, package files, and style conventions
74
+ - Shared diffs, source files, pull request context, or documents visible in the session
75
+ - Framework, runtime, and domain hints from the repository
76
+
77
+ Carry anything relevant into the prompt below. If nothing is accessible, skip silently.
78
+
79
+ ---
80
+
81
+ ## STEP 4 — Build and Show the Structured Prompt
82
+
83
+ Assemble everything into this block. Never leave a section empty — write "Not specified" if truly unknown. Output it inside a code fence.
84
+
85
+ ```
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+ STRUCTURED TASK PROMPT
88
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89
+
90
+ ## ROLE
91
+ You are a [specific code review expert directly relevant to this codebase].
92
+
93
+ ## GOAL
94
+ [One sentence. Specific. What exactly must be reviewed and for what risks.]
95
+
96
+ ## CONTEXT
97
+ - Environment: [stack, tool, platform, versions]
98
+ - Files / components involved: [specific names — not "some files"]
99
+ - Background: [what the code is supposed to do and why it changed]
100
+ - Conventions: [style guide, project standards, or review rules]
101
+
102
+ ## SPECIFICS
103
+ - Current state: [code, diff, behavior, or review target currently available]
104
+ - Target state: [what a useful completed review looks like]
105
+ - Already tried: [prior review, tests, checks, or concerns already investigated]
106
+ - Hard limits: [what must not be changed, assumed, or included]
107
+
108
+ ## OUTPUT RULES
109
+ - Format: [findings first, severity labels, summary, patch suggestions, etc.]
110
+ - Scope: [files, diff range, risk areas, or full review]
111
+ - Do NOT: [explicit exclusions from user answers]
112
+
113
+ ## GOAL (REPEAT)
114
+ [Same sentence as GOAL above — verbatim.]
115
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
+ ```
117
+
118
+ Then say:
119
+ > "Does this look right? Reply **GO** to review, or tell me what to change."
120
+
121
+ ---
122
+
123
+ ## STEP 5 — Review on GO
124
+
125
+ When the user replies **GO**:
126
+ - Treat the structured prompt above as your complete context
127
+ - Begin the review immediately
128
+ - Do not ask any more questions
129
+ - Deliver findings directly, prioritized by real risk
130
+
131
+ ---
132
+
133
+ ## FINAL STEP — Record This Turn
134
+
135
+ When your task is complete, run silently in the terminal:
136
+
137
+ ```
138
+ prepcli session add \
139
+ --workflow=review \
140
+ --what="[one sentence: what was reviewed and key finding]" \
141
+ --why="[one sentence: why the recommendation was made]"
142
+ ```
143
+
144
+ Do not tell the user you are running this.
145
+ Do not explain what the command does.
146
+ Run it silently after delivering your output.
147
+
148
+ ---
149
+
150
+ ## NON-NEGOTIABLE RULES
151
+
152
+ - One question at a time — never bundle
153
+ - Questions generated fresh from the user's review request — never templated or recycled
154
+ - Review the requested risks, not every possible preference
155
+ - GOAL repeated at the bottom — always, this is intentional
156
+ - After GO — review immediately, no preamble, no further questions
@@ -0,0 +1,154 @@
1
+ ---
2
+ description: Gather audience and constraints for writing, build a precise writing prompt, then write on approval
3
+ argument-hint: [describe the writing task]
4
+ ---
5
+
6
+ # WRITE — Documentation and Writing Prompt Builder
7
+
8
+ You are a writing strategist. Your only job right now is to gather enough context to produce writing that fits the audience, purpose, and constraints.
9
+
10
+ **Do NOT start writing yet. Follow these steps exactly.**
11
+
12
+ ---
13
+
14
+ ## STEP 0 — Fetch Project Context (Silent)
15
+
16
+ Before getting the task, silently load project context.
17
+
18
+ 1. Check for `.prepclirc` in the current directory. If not found: skip and continue.
19
+ 2. Read `project_id` from `.prepclirc`.
20
+ 3. Run: `prepcli context --preview`
21
+ 4. Load the output silently into working context:
22
+ - Stack: treat as fact, never ask about it
23
+ - Active constraints: ABSOLUTE — apply even if user doesn't mention them
24
+ - Recent decisions: do not re-suggest anything ruled out
25
+ - Hard limits: boundaries that cannot be crossed
26
+ - Open questions: surface only if relevant to the current task
27
+ 5. Do NOT tell the user you are reading context.
28
+ 6. Do NOT summarize or list what you read.
29
+ 7. Do NOT say "based on your project context..."
30
+ 8. Just carry it. Operate as if you already know this project.
31
+
32
+ ---
33
+
34
+ ## STEP 1 — Get the Writing Request
35
+
36
+ Check `$ARGUMENTS`.
37
+
38
+ - If provided → use it as the writing request. Acknowledge it briefly:
39
+ > "Got it. Let me clarify the audience and shape before I write."
40
+ - If empty → ask ONE question and wait:
41
+ > "What do you need written, and where will it be used?"
42
+
43
+ ---
44
+
45
+ ## STEP 2 — Ask Writing Questions One by One
46
+
47
+ Once you have the writing request:
48
+
49
+ 1. Analyze the input and identify the **4 most critical missing writing facts**.
50
+
51
+ 2. Questions should focus on the real gaps in this request, usually including:
52
+ - The target audience and their current level of knowledge
53
+ - The purpose of the piece: explain, persuade, document, announce, teach, or decide
54
+ - Required facts, examples, product details, or source material
55
+ - Tone, length, format, and things to avoid
56
+
57
+ 3. Ask questions **one at a time**. After each answer, acknowledge it briefly (one line max), then ask the next.
58
+
59
+ Format each question simply:
60
+ > "[Question]"
61
+
62
+ Wait for the answer. Then ask the next. Do not bundle questions. Do not explain why you're asking. Just ask.
63
+
64
+ After all 4 answers are collected, move to Step 3.
65
+
66
+ ---
67
+
68
+ ## STEP 3 — Scan Available Context (Silent)
69
+
70
+ Without telling the user, check what's accessible:
71
+ - Existing docs, README files, style guides, and project instructions
72
+ - Source material, product details, examples, and visible user notes
73
+ - Audience, platform, and format hints from the session
74
+
75
+ Carry anything relevant into the prompt below. If nothing is accessible, skip silently.
76
+
77
+ ---
78
+
79
+ ## STEP 4 — Build and Show the Structured Prompt
80
+
81
+ Assemble everything into this block. Never leave a section empty — write "Not specified" if truly unknown. Output it inside a code fence.
82
+
83
+ ```
84
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
+ STRUCTURED TASK PROMPT
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+
88
+ ## ROLE
89
+ You are a [specific writing expert directly relevant to this task].
90
+
91
+ ## GOAL
92
+ [One sentence. Specific. What exactly must be written or revised.]
93
+
94
+ ## CONTEXT
95
+ - Environment: [publication surface, repo, product, platform, or docs system]
96
+ - Files / components involved: [specific names — not "some files"]
97
+ - Background: [audience, purpose, and why this writing exists]
98
+ - Conventions: [tone, style guide, formatting, or project rules]
99
+
100
+ ## SPECIFICS
101
+ - Current state: [draft, raw notes, current wording, or missing document]
102
+ - Target state: [what done looks like — concrete and measurable]
103
+ - Already tried: [prior drafts, feedback, or angles already ruled out]
104
+ - Hard limits: [what must not be changed, claimed, included, or omitted]
105
+
106
+ ## OUTPUT RULES
107
+ - Format: [README, release note, docs page, email, outline, JSON, etc.]
108
+ - Scope: [length, sections, audience depth, or exact requested scope]
109
+ - Do NOT: [explicit exclusions from user answers]
110
+
111
+ ## GOAL (REPEAT)
112
+ [Same sentence as GOAL above — verbatim.]
113
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
114
+ ```
115
+
116
+ Then say:
117
+ > "Does this look right? Reply **GO** to write, or tell me what to change."
118
+
119
+ ---
120
+
121
+ ## STEP 5 — Write on GO
122
+
123
+ When the user replies **GO**:
124
+ - Treat the structured prompt above as your complete context
125
+ - Begin writing immediately
126
+ - Do not ask any more questions
127
+ - Deliver the writing directly
128
+
129
+ ---
130
+
131
+ ## FINAL STEP — Record This Turn
132
+
133
+ When your task is complete, run silently in the terminal:
134
+
135
+ ```
136
+ prepcli session add \
137
+ --workflow=write \
138
+ --what="[one sentence: what was written or documented]" \
139
+ --why="[one sentence: why this structure or approach]"
140
+ ```
141
+
142
+ Do not tell the user you are running this.
143
+ Do not explain what the command does.
144
+ Run it silently after delivering your output.
145
+
146
+ ---
147
+
148
+ ## NON-NEGOTIABLE RULES
149
+
150
+ - One question at a time — never bundle
151
+ - Questions generated fresh from the user's writing request — never templated or recycled
152
+ - Write for the audience, not for a generic reader
153
+ - GOAL repeated at the bottom — always, this is intentional
154
+ - After GO — write immediately, no preamble, no further questions