@@ -5,113 +5,55 @@ description: "Use when you want to review code or plans with an external model (
55
66# Export Context Mode
77
8- Build RepoPrompt context and export to a markdown file for use with external LLMs (ChatGPT Pro, Claude web, etc.).
9-
10- ** Use case** : When you want Carmack-level review but prefer to use an external model.
11-
12- ** CRITICAL: flowctl is BUNDLED — NOT installed globally.** ` which flowctl ` will fail (expected). Always use:
13- ``` bash
14- FLOWCTL=" ${DROID_PLUGIN_ROOT:- ${CLAUDE_PLUGIN_ROOT} } /bin/flowctl"
15- $FLOWCTL < command>
16- ```
8+ Export flow-code context to a markdown file for external LLMs (ChatGPT Pro, Claude web, etc.).
179
1810## Input
1911
20- Arguments: $ARGUMENTS
21- Format: ` <type> <target> [focus areas] `
22-
23- Types:
24- - ` plan <epic-id> ` - Export plan review context
25- - ` impl ` - Export implementation review context (current branch)
26-
27- Examples:
28- - ` /flow-code:export-context plan fn-1 focus on security `
29- - ` /flow-code:export-context impl focus on the auth changes `
30-
31- ## Setup
12+ Arguments: $ARGUMENTS — Format: ` <type> <target> [focus areas] `
3213
33- ``` bash
34- FLOWCTL=" ${DROID_PLUGIN_ROOT:- ${CLAUDE_PLUGIN_ROOT} } /bin/flowctl"
35- REPO_ROOT=" $( git rev-parse --show-toplevel 2> /dev/null || pwd) "
36- ```
14+ - ` plan <epic-id> ` — Export plan review context
15+ - ` impl ` — Export implementation review context (current branch)
3716
3817## Workflow
3918
40- ### Step 1: Determine Type
41-
42- Parse arguments to determine if this is a plan or impl export.
43-
44- ### Step 2: Gather Content
45-
46- ** For plan export:**
47- ``` bash
48- $FLOWCTL show < epic-id> --json
49- $FLOWCTL cat < epic-id>
50- ```
19+ ### Step 1: Gather Content
5120
52- ** For impl export:**
5321``` bash
54- git branch --show-current
55- git log main..HEAD --oneline 2> /dev/null || git log master..HEAD --oneline
56- git diff main..HEAD --name-only 2> /dev/null || git diff master..HEAD --name-only
22+ FLOWCTL= " ${DROID_PLUGIN_ROOT :- ${CLAUDE_PLUGIN_ROOT} } /bin/flowctl "
23+ OUTPUT_FILE= " prompt-exports/ $( date +%Y%m%d-%H%M%S ) -export.md "
24+ mkdir -p prompt-exports
5725```
5826
59- ### Step 3: Setup RepoPrompt
27+ ** Plan: ** ` $FLOWCTL show <epic-id> --json ` , ` $FLOWCTL cat <epic-id> ` , gather task specs.
6028
61- ``` bash
62- eval " $( $FLOWCTL rp setup-review --repo-root " $REPO_ROOT " --summary " <summary based on type>" --create) "
63- ```
29+ ** Impl:** ` git branch --show-current ` , ` git log main..HEAD --oneline ` , ` git diff main..HEAD --stat ` .
6430
65- ### Step 4: Augment Selection
31+ ### Step 2: Export (three-tier fallback)
6632
67- ``` bash
68- $FLOWCTL rp select-get --window " $W " --tab " $T "
33+ Build instructions from gathered context. Extract the real task from the request — strip meta-framing about exporting.
6934
70- # Add relevant files
71- $FLOWCTL rp select-add --window " $W " --tab " $T " < files>
35+ ** Tier 1 — RP MCP** (if ` mcp__RepoPrompt__context_builder ` available):
7236```
73-
74- ### Step 5: Build Review Prompt
75-
76- Get builder's handoff:
77- ``` bash
78- $FLOWCTL rp prompt-get --window " $W " --tab " $T "
37+ context_builder(instructions="<task><extracted task></task>\n<context><flowctl content></context>", response_type="clarify")
38+ prompt(op="export", path="<OUTPUT_FILE>", copy_preset="<plan|codeReview>")
7939```
8040
81- Build combined prompt with review criteria (same as plan-review or impl-review).
82-
83- Set the prompt:
41+ ** Tier 2 — rp-cli** (if ` which rp-cli ` succeeds):
8442``` bash
85- cat > /tmp/export-prompt.md << 'EOF '
86- [COMBINED PROMPT WITH REVIEW CRITERIA]
87- EOF
88-
89- $FLOWCTL rp prompt-set --window " $W " --tab " $T " --message-file /tmp/export-prompt.md
43+ WINDOW_ID=$( rp-cli -e ' windows' | head -1 | awk ' {print $1}' )
44+ rp-cli -w " $WINDOW_ID " -e ' builder "<instructions>" --response-type clarify'
45+ rp-cli -w " $WINDOW_ID " -e " prompt export \" $OUTPUT_FILE \" --copy-preset <plan|codeReview>"
9046```
9147
92- ### Step 6: Export
48+ ** Tier 3 — Basic Markdown** (no RP available):
49+ Write gathered content directly to ` $OUTPUT_FILE ` as structured markdown with sections for context, specs, changed files, and focus areas.
9350
94- ``` bash
95- OUTPUT_FILE=~ /Desktop/review-export-$( date +%Y%m%d-%H%M%S) .md
96- $FLOWCTL rp prompt-export --window " $W " --tab " $T " --out " $OUTPUT_FILE "
97- open " $OUTPUT_FILE "
98- ```
51+ Preset mapping: plan -> ` plan ` , impl -> ` codeReview ` .
9952
100- ### Step 7: Inform User
53+ ### Step 3: Report
10154
102- ```
103- Exported review context to: $OUTPUT_FILE
104-
105- The file contains:
106- - Full file tree with selected files marked
107- - Code maps (signatures/structure)
108- - Complete file contents
109- - Review prompt with Carmack-level criteria
110-
111- Paste into ChatGPT Pro, Claude web, or your preferred LLM.
112- After receiving feedback, return here to implement fixes.
113- ```
55+ Report ` $OUTPUT_FILE ` path, tier used, and export type. Instruct user to paste into their preferred external LLM.
11456
11557## Note
11658
117- This skill is for ** manual ** external review only. It does not work with Ralph autonomous mode (no receipts, no status updates).
59+ Manual external review only. No Ralph support (no receipts, no status updates).
0 commit comments