Skip to content

Commit 44e4246

Browse files
authored
feat: extracted shared clear context handoff to shared reference (#156)
1 parent 2fb2b60 commit 44e4246

9 files changed

Lines changed: 28 additions & 57 deletions

File tree

skills/brainstorm/SKILL.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,13 @@ Use **AskUserQuestion tool** to consider next steps:
177177
3. **Review and refine approach:** improve the document using structured review
178178
4. **Done for now**: brainstorm complete. To start planning later: `/plan`
179179

180-
**If the user selects "Clear context and plan"** → output the following (substituting the actual brainstorm doc path) and then stop:
181-
182-
```md
183-
To continue with a fresh context, run:
184-
185-
/clear
186-
187-
Then start planning with:
188-
189-
/plan docs/brainstorm/<actual-brainstorm-filename>.md
190-
```
180+
**If the user selects "Clear context and plan"** → Follow the [clear context handoff](references/clear-context-handoff.md) for `/plan` with the actual brainstorm doc path. Then stop.
191181

192182
**If the user selects "Review and refine approach"** then apply the @refine-approach skill to the document.
193183

194184
When `refine-approach` is complete, present these options:
195185

196-
1. **Clear context and plan**: clear context for a fresh start, then plan
186+
1. **Clear context and plan**: follow the [clear context handoff](references/clear-context-handoff.md) for `/plan`
197187
2. **Move to planning**: run the `/plan` skill to create a detailed implementation plan
198188
3. **Done for now**: ideation complete. To start planning later: `/plan`
199189

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared/references/clear-context-handoff.md

skills/plan-technical-review/SKILL.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ If the plan-splitting-agent reports no split needed: include the scope summary i
4343
3. **Refine the plan**: improve the plan based on review findings
4444
4. **Done for now**: review complete
4545

46-
**If the user selects "Clear context and build"** → output the following (substituting the actual plan file path) and then stop:
47-
48-
```md
49-
To continue with a fresh context, run:
50-
51-
/clear
52-
53-
Then start building with:
54-
55-
/build docs/plan/<actual-plan-filename>.md
56-
```
46+
**If the user selects "Clear context and build"** → Follow the [clear context handoff](references/clear-context-handoff.md) for `/build` with the actual plan file path. Then stop.
5747

5848
**When invoked by another skill** (e.g., from `/plan`), return control to the caller after the review completes — do not present handoff options.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared/references/clear-context-handoff.md

skills/plan/SKILL.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,7 @@ After writing the plan file, use the **AskUserQuestion tool** and present the fo
265265

266266
Based on selection:
267267

268-
- **Clear context and build** → Output the following (substituting the actual plan file path) and then stop:
269-
270-
```md
271-
To continue with a fresh context, run:
272-
273-
/clear
274-
275-
Then start building with:
276-
277-
/build docs/plan/<actual-plan-filename>.md
278-
```
279-
268+
- **Clear context and build** → Follow the [clear context handoff](references/clear-context-handoff.md) for `/build` with the actual plan file path. Then stop.
280269
- **Start building** → Call the `/build` skill with the plan file path
281270
- **Open plan in editor** → Run `open docs/plan/<plan_filename>.md` to open the file in the user's default editor
282271
- **`/plan-technical-review`** → Call the `/plan-technical-review` skill with the plan file path
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared/references/clear-context-handoff.md

skills/refine-approach/SKILL.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,29 +91,9 @@ After changes are complete, ask:
9191
2. **Refine again** — another review pass
9292
3. **Done for now** — document is ready
9393

94-
**If the user selects "Clear context and plan"**output the following (substituting the actual brainstorm doc path) and then stop:
94+
**If the user selects "Clear context and plan"**Follow the [clear context handoff](references/clear-context-handoff.md) for `/plan` with the actual brainstorm doc path. Then stop.
9595

96-
```md
97-
To continue with a fresh context, run:
98-
99-
/clear
100-
101-
Then start planning with:
102-
103-
/plan docs/brainstorm/<actual-brainstorm-filename>.md
104-
```
105-
106-
**If the user selects "Clear context and build"** → output the following (substituting the actual plan file path) and then stop:
107-
108-
```md
109-
To continue with a fresh context, run:
110-
111-
/clear
112-
113-
Then start building with:
114-
115-
/build docs/plan/<actual-plan-filename>.md
116-
```
96+
**If the user selects "Clear context and build"** → Follow the [clear context handoff](references/clear-context-handoff.md) for `/build` with the actual plan file path. Then stop.
11797

11898
**When invoked by another skill** (e.g., from `/brainstorm` or `/plan`), only offer "Refine again" and "Review complete", then return control to the caller.
11999

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared/references/clear-context-handoff.md
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Clear Context Handoff
2+
3+
When a "Clear context and [next step]" option is selected, output the following block (substituting the actual skill and document path) and then **stop**:
4+
5+
```md
6+
To continue with a fresh context, run:
7+
8+
/clear
9+
10+
Then start <NEXT_ACTION> with:
11+
12+
/<NEXT_SKILL> <DOC_PATH>
13+
```
14+
15+
Where:
16+
- `<NEXT_ACTION>` — the verb for the next phase (e.g., "planning", "building")
17+
- `<NEXT_SKILL>` — the skill to invoke (e.g., `plan`, `build`)
18+
- `<DOC_PATH>` — the full path to the document produced in the current phase

0 commit comments

Comments
 (0)