learnship 1.9.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.
- package/.claude-plugin/plugin.json +26 -0
- package/.cursor-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +791 -0
- package/SKILL.md +86 -0
- package/agents/debugger.md +102 -0
- package/agents/executor.md +115 -0
- package/agents/learnship-debugger.md +146 -0
- package/agents/learnship-executor.md +155 -0
- package/agents/learnship-phase-researcher.md +128 -0
- package/agents/learnship-plan-checker.md +119 -0
- package/agents/learnship-planner.md +146 -0
- package/agents/learnship-verifier.md +157 -0
- package/agents/planner.md +109 -0
- package/agents/researcher.md +80 -0
- package/agents/verifier.md +114 -0
- package/bin/install.js +1242 -0
- package/bin/learnship.js +56 -0
- package/commands/learnship/add-phase.md +22 -0
- package/commands/learnship/add-tests.md +24 -0
- package/commands/learnship/add-todo.md +21 -0
- package/commands/learnship/audit-milestone.md +21 -0
- package/commands/learnship/check-todos.md +22 -0
- package/commands/learnship/cleanup.md +22 -0
- package/commands/learnship/complete-milestone.md +22 -0
- package/commands/learnship/debug.md +27 -0
- package/commands/learnship/decision-log.md +22 -0
- package/commands/learnship/diagnose-issues.md +23 -0
- package/commands/learnship/discovery-phase.md +24 -0
- package/commands/learnship/discuss-milestone.md +23 -0
- package/commands/learnship/discuss-phase.md +23 -0
- package/commands/learnship/execute-phase.md +27 -0
- package/commands/learnship/execute-plan.md +26 -0
- package/commands/learnship/health.md +20 -0
- package/commands/learnship/help.md +19 -0
- package/commands/learnship/insert-phase.md +22 -0
- package/commands/learnship/knowledge-base.md +21 -0
- package/commands/learnship/list-phase-assumptions.md +21 -0
- package/commands/learnship/ls.md +20 -0
- package/commands/learnship/map-codebase.md +23 -0
- package/commands/learnship/milestone-retrospective.md +21 -0
- package/commands/learnship/new-milestone.md +23 -0
- package/commands/learnship/new-project.md +24 -0
- package/commands/learnship/next.md +22 -0
- package/commands/learnship/pause-work.md +21 -0
- package/commands/learnship/plan-milestone-gaps.md +22 -0
- package/commands/learnship/plan-phase.md +24 -0
- package/commands/learnship/progress.md +20 -0
- package/commands/learnship/quick.md +27 -0
- package/commands/learnship/reapply-patches.md +21 -0
- package/commands/learnship/release.md +21 -0
- package/commands/learnship/remove-phase.md +23 -0
- package/commands/learnship/research-phase.md +23 -0
- package/commands/learnship/resume-work.md +21 -0
- package/commands/learnship/set-profile.md +21 -0
- package/commands/learnship/settings.md +21 -0
- package/commands/learnship/transition.md +21 -0
- package/commands/learnship/update.md +21 -0
- package/commands/learnship/validate-phase.md +22 -0
- package/commands/learnship/verify-work.md +23 -0
- package/cursor-rules/learnship.mdc +60 -0
- package/gemini-extension.json +10 -0
- package/hooks/hooks-claude.json +15 -0
- package/hooks/hooks-cursor.json +10 -0
- package/hooks/session-start +43 -0
- package/install.sh +254 -0
- package/learnship/references/design-commands.md +119 -0
- package/learnship/references/git-integration.md +249 -0
- package/learnship/references/learning-design.md +142 -0
- package/learnship/references/model-profiles.md +90 -0
- package/learnship/references/planning-config.md +184 -0
- package/learnship/references/questioning.md +162 -0
- package/learnship/references/ui-brand.md +160 -0
- package/learnship/references/verification-patterns.md +608 -0
- package/learnship/templates/agents.md +166 -0
- package/learnship/templates/context.md +72 -0
- package/learnship/templates/plan.md +202 -0
- package/learnship/templates/project.md +184 -0
- package/learnship/templates/requirements.md +231 -0
- package/learnship/templates/state.md +176 -0
- package/learnship/templates/uat.md +80 -0
- package/learnship/workflows/add-phase.md +84 -0
- package/learnship/workflows/add-tests.md +191 -0
- package/learnship/workflows/add-todo.md +108 -0
- package/learnship/workflows/audit-milestone.md +178 -0
- package/learnship/workflows/check-todos.md +138 -0
- package/learnship/workflows/cleanup.md +107 -0
- package/learnship/workflows/complete-milestone.md +191 -0
- package/learnship/workflows/debug.md +245 -0
- package/learnship/workflows/decision-log.md +131 -0
- package/learnship/workflows/diagnose-issues.md +145 -0
- package/learnship/workflows/discovery-phase.md +183 -0
- package/learnship/workflows/discuss-milestone.md +136 -0
- package/learnship/workflows/discuss-phase.md +244 -0
- package/learnship/workflows/execute-phase.md +345 -0
- package/learnship/workflows/execute-plan.md +149 -0
- package/learnship/workflows/health.md +171 -0
- package/learnship/workflows/help.md +153 -0
- package/learnship/workflows/insert-phase.md +106 -0
- package/learnship/workflows/knowledge-base.md +168 -0
- package/learnship/workflows/list-phase-assumptions.md +129 -0
- package/learnship/workflows/ls.md +145 -0
- package/learnship/workflows/map-codebase.md +142 -0
- package/learnship/workflows/milestone-retrospective.md +178 -0
- package/learnship/workflows/new-milestone.md +200 -0
- package/learnship/workflows/new-project.md +340 -0
- package/learnship/workflows/next.md +100 -0
- package/learnship/workflows/pause-work.md +122 -0
- package/learnship/workflows/plan-milestone-gaps.md +160 -0
- package/learnship/workflows/plan-phase.md +288 -0
- package/learnship/workflows/progress.md +118 -0
- package/learnship/workflows/quick.md +256 -0
- package/learnship/workflows/reapply-patches.md +130 -0
- package/learnship/workflows/release.md +217 -0
- package/learnship/workflows/remove-phase.md +128 -0
- package/learnship/workflows/research-phase.md +137 -0
- package/learnship/workflows/resume-work.md +162 -0
- package/learnship/workflows/set-profile.md +78 -0
- package/learnship/workflows/settings.md +204 -0
- package/learnship/workflows/sync-upstream-skills.md +269 -0
- package/learnship/workflows/transition.md +165 -0
- package/learnship/workflows/update.md +166 -0
- package/learnship/workflows/validate-phase.md +174 -0
- package/learnship/workflows/verify-work.md +264 -0
- package/package.json +62 -0
- package/references/design-commands.md +119 -0
- package/references/git-integration.md +249 -0
- package/references/learning-design.md +142 -0
- package/references/model-profiles.md +90 -0
- package/references/planning-config.md +184 -0
- package/references/questioning.md +162 -0
- package/references/ui-brand.md +160 -0
- package/references/verification-patterns.md +608 -0
- package/skills/agentic-learning/SKILL.md +373 -0
- package/skills/agentic-learning/references/either-or-format.md +161 -0
- package/skills/agentic-learning/references/learning-science.md +190 -0
- package/skills/agentic-learning/references/struggle-ladder.md +140 -0
- package/skills/impeccable/SKILL.md +125 -0
- package/skills/impeccable/adapt/SKILL.md +199 -0
- package/skills/impeccable/animate/SKILL.md +190 -0
- package/skills/impeccable/audit/SKILL.md +129 -0
- package/skills/impeccable/bolder/SKILL.md +132 -0
- package/skills/impeccable/clarify/SKILL.md +180 -0
- package/skills/impeccable/colorize/SKILL.md +158 -0
- package/skills/impeccable/critique/SKILL.md +118 -0
- package/skills/impeccable/delight/SKILL.md +317 -0
- package/skills/impeccable/distill/SKILL.md +137 -0
- package/skills/impeccable/extract/SKILL.md +95 -0
- package/skills/impeccable/frontend-design/SKILL.md +127 -0
- package/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
- package/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
- package/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
- package/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
- package/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
- package/skills/impeccable/frontend-design/reference/typography.md +131 -0
- package/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
- package/skills/impeccable/harden/SKILL.md +358 -0
- package/skills/impeccable/normalize/SKILL.md +67 -0
- package/skills/impeccable/onboard/SKILL.md +243 -0
- package/skills/impeccable/optimize/SKILL.md +269 -0
- package/skills/impeccable/polish/SKILL.md +202 -0
- package/skills/impeccable/quieter/SKILL.md +118 -0
- package/skills/impeccable/teach-impeccable/SKILL.md +69 -0
- package/templates/agents.md +166 -0
- package/templates/config.json +22 -0
- package/templates/context.md +72 -0
- package/templates/plan.md +202 -0
- package/templates/project.md +184 -0
- package/templates/requirements.md +231 -0
- package/templates/state.md +176 -0
- package/templates/uat.md +80 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute an ad-hoc task with full agentic guarantees — atomic commits, state tracking, no full planning ceremony
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Quick Task
|
|
6
|
+
|
|
7
|
+
Execute small, ad-hoc tasks with full agentic guarantees: atomic commits, STATE.md tracking, optional discussion and verification.
|
|
8
|
+
|
|
9
|
+
**Usage:** `quick [description]`
|
|
10
|
+
|
|
11
|
+
**Flags:**
|
|
12
|
+
- `--discuss` — lightweight discussion phase before planning (surfaces gray areas)
|
|
13
|
+
- `--full` — adds plan-checking and post-execution verification
|
|
14
|
+
|
|
15
|
+
**Composable:** `quick --discuss --full "add dark mode toggle"` gives discussion + plan-checking + verification.
|
|
16
|
+
|
|
17
|
+
## Step 1: Get Task Description
|
|
18
|
+
|
|
19
|
+
If a description was provided as an argument, use it. Otherwise ask:
|
|
20
|
+
|
|
21
|
+
"What do you want to do?"
|
|
22
|
+
|
|
23
|
+
Wait for response. Store as `DESCRIPTION`.
|
|
24
|
+
|
|
25
|
+
Display banner based on active flags:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
29
|
+
learnship ► QUICK TASK [flags if any]
|
|
30
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Step 2: Initialize
|
|
34
|
+
|
|
35
|
+
Check that a project exists:
|
|
36
|
+
```bash
|
|
37
|
+
test -f .planning/ROADMAP.md && echo "OK" || echo "MISSING"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If ROADMAP.md missing: stop — run `new-project` first. Quick tasks require an active project.
|
|
41
|
+
|
|
42
|
+
Generate a slug from the description (lowercase, hyphens, max 40 chars).
|
|
43
|
+
|
|
44
|
+
Find the next task number:
|
|
45
|
+
```bash
|
|
46
|
+
ls .planning/quick/ 2>/dev/null | grep -E "^[0-9]+" | sort -n | tail -1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Set `NEXT_NUM` to the next available number (001, 002, etc.).
|
|
50
|
+
|
|
51
|
+
Create task directory:
|
|
52
|
+
```bash
|
|
53
|
+
mkdir -p ".planning/quick/${NEXT_NUM}-${SLUG}"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Report: "Creating quick task ${NEXT_NUM}: ${DESCRIPTION}"
|
|
57
|
+
|
|
58
|
+
## Step 3: Discussion Phase (only with `--discuss`)
|
|
59
|
+
|
|
60
|
+
**Skip this step if `--discuss` flag is not present.**
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
learnship ► DISCUSSING: [DESCRIPTION]
|
|
65
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Analyze `DESCRIPTION` to identify 2-4 gray areas — implementation decisions that would change the outcome.
|
|
69
|
+
|
|
70
|
+
Present them for selection (multi-select):
|
|
71
|
+
- Each area is a concrete decision point (not generic)
|
|
72
|
+
- Include an "All clear — skip discussion" option
|
|
73
|
+
|
|
74
|
+
If "All clear" → skip to Step 4.
|
|
75
|
+
|
|
76
|
+
For each selected area, ask 1-2 focused questions with concrete options. Max 2 questions per area — keep it lightweight.
|
|
77
|
+
|
|
78
|
+
Write `CONTEXT.md` to the task directory:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
# Quick Task [NEXT_NUM]: [DESCRIPTION] - Context
|
|
82
|
+
|
|
83
|
+
**Gathered:** [date]
|
|
84
|
+
**Status:** Ready for planning
|
|
85
|
+
|
|
86
|
+
<domain>
|
|
87
|
+
## Task Boundary
|
|
88
|
+
|
|
89
|
+
[DESCRIPTION]
|
|
90
|
+
|
|
91
|
+
</domain>
|
|
92
|
+
|
|
93
|
+
<decisions>
|
|
94
|
+
## Implementation Decisions
|
|
95
|
+
|
|
96
|
+
### [Area discussed]
|
|
97
|
+
- [Decision captured]
|
|
98
|
+
|
|
99
|
+
### Claude's Discretion
|
|
100
|
+
[Areas not discussed or "you decide" answers]
|
|
101
|
+
|
|
102
|
+
</decisions>
|
|
103
|
+
|
|
104
|
+
<specifics>
|
|
105
|
+
## Specific Ideas
|
|
106
|
+
|
|
107
|
+
[Any specific references or examples]
|
|
108
|
+
|
|
109
|
+
</specifics>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Step 4: Create Plan
|
|
113
|
+
|
|
114
|
+
Using `@./agents/planner.md` as your planning persona, read:
|
|
115
|
+
- `.planning/STATE.md`
|
|
116
|
+
- CONTEXT.md if it exists (from `--discuss`)
|
|
117
|
+
- The task description
|
|
118
|
+
|
|
119
|
+
Create a **single PLAN.md** with 1-3 focused tasks in `.planning/quick/${NEXT_NUM}-${SLUG}/${NEXT_NUM}-PLAN.md`.
|
|
120
|
+
|
|
121
|
+
Each task needs:
|
|
122
|
+
- `<files>` — exact files to create/modify
|
|
123
|
+
- `<action>` — specific implementation instructions
|
|
124
|
+
- `<verify>` — how to confirm it worked
|
|
125
|
+
- `<done>` — observable completion criteria
|
|
126
|
+
|
|
127
|
+
If `--full`: also include `must_haves` in plan frontmatter (truths, artifacts, key_links).
|
|
128
|
+
|
|
129
|
+
Verify plan was created:
|
|
130
|
+
```bash
|
|
131
|
+
test -f ".planning/quick/${NEXT_NUM}-${SLUG}/${NEXT_NUM}-PLAN.md" && echo "OK"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Step 5: Plan Check (only with `--full`)
|
|
135
|
+
|
|
136
|
+
**Skip if `--full` flag is not present.**
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
learnship ► CHECKING PLAN
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Using `@./agents/verifier.md`, verify the plan against the task description:
|
|
145
|
+
- Does the plan address the task description?
|
|
146
|
+
- Do tasks have files, action, verify, done fields?
|
|
147
|
+
- Is this appropriately sized for a quick task (1-3 tasks)?
|
|
148
|
+
- If `--discuss`: does the plan honor locked decisions from CONTEXT.md?
|
|
149
|
+
|
|
150
|
+
**Revision loop (max 2 iterations):** If issues found, revise and re-check.
|
|
151
|
+
|
|
152
|
+
If still failing after 2 iterations: present remaining issues and ask — **Force proceed** or **Abort**.
|
|
153
|
+
|
|
154
|
+
## Step 6: Execute
|
|
155
|
+
|
|
156
|
+
Using `@./agents/executor.md` as your execution persona, read the PLAN.md and execute each task:
|
|
157
|
+
|
|
158
|
+
1. Read the task's `<files>`, `<action>`, `<verify>`, `<done>` fields
|
|
159
|
+
2. Implement what the action describes
|
|
160
|
+
3. Verify using the verify criteria
|
|
161
|
+
4. Commit atomically:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git add [files modified]
|
|
165
|
+
git commit -m "feat(quick-${NEXT_NUM}): [task description]"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
After all tasks complete, write `${NEXT_NUM}-SUMMARY.md`:
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
# Quick Task [NEXT_NUM] Summary
|
|
172
|
+
|
|
173
|
+
**Task:** [DESCRIPTION]
|
|
174
|
+
**Completed:** [date]
|
|
175
|
+
|
|
176
|
+
## What was done
|
|
177
|
+
[2-3 sentences]
|
|
178
|
+
|
|
179
|
+
## Files changed
|
|
180
|
+
- [file]: [what changed]
|
|
181
|
+
|
|
182
|
+
## Commit
|
|
183
|
+
[commit hash]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Step 7: Verify Results (only with `--full`)
|
|
187
|
+
|
|
188
|
+
**Skip if `--full` flag is not present.**
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
192
|
+
learnship ► VERIFYING RESULTS
|
|
193
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Using `@./agents/verifier.md`, check `must_haves` from the plan against the actual codebase.
|
|
197
|
+
|
|
198
|
+
Write `${NEXT_NUM}-VERIFICATION.md`. Store status as `VERIFICATION_STATUS`.
|
|
199
|
+
|
|
200
|
+
## Step 8: Update STATE.md
|
|
201
|
+
|
|
202
|
+
Read `.planning/STATE.md` and append to the Quick Tasks table (create section if it doesn't exist):
|
|
203
|
+
|
|
204
|
+
```markdown
|
|
205
|
+
### Quick Tasks Completed
|
|
206
|
+
|
|
207
|
+
| # | Description | Date | Commit | Directory |
|
|
208
|
+
|---|-------------|------|--------|-----------|
|
|
209
|
+
| [NEXT_NUM] | [DESCRIPTION] | [date] | [hash] | [path] |
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Update "Last activity" line:
|
|
213
|
+
```
|
|
214
|
+
Last activity: [date] - Completed quick task [NEXT_NUM]: [DESCRIPTION]
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Step 9: Final Commit
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
git add ".planning/quick/${NEXT_NUM}-${SLUG}/" .planning/STATE.md
|
|
221
|
+
git commit -m "docs(quick-${NEXT_NUM}): ${DESCRIPTION}"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Display completion:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
228
|
+
learnship ► QUICK TASK COMPLETE ✓
|
|
229
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
230
|
+
|
|
231
|
+
Quick Task [NEXT_NUM]: [DESCRIPTION]
|
|
232
|
+
|
|
233
|
+
Summary: .planning/quick/[NEXT_NUM]-[SLUG]/[NEXT_NUM]-SUMMARY.md
|
|
234
|
+
[If --full: Verification: [status]]
|
|
235
|
+
Commit: [hash]
|
|
236
|
+
|
|
237
|
+
Ready for next task: quick
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Learning Checkpoint
|
|
243
|
+
|
|
244
|
+
Read `learning_mode` from `.planning/config.json`.
|
|
245
|
+
|
|
246
|
+
**If `auto`:** Offer based on how the task went:
|
|
247
|
+
|
|
248
|
+
> 💡 **Learning moment:** Task done. Pick the action that matches what happened:
|
|
249
|
+
>
|
|
250
|
+
> `@agentic-learning struggle [task]` — If the task was tricky or used unfamiliar patterns: work through a similar problem from scratch with a hint ladder. Builds deeper intuition than just reading the solution.
|
|
251
|
+
>
|
|
252
|
+
> `@agentic-learning learn [task topic]` — If the task touched an unfamiliar domain: active retrieval while the context is fresh. You explain first, gaps get filled.
|
|
253
|
+
>
|
|
254
|
+
> `@agentic-learning either-or` — If you made a meaningful design decision during the task: log the choice and the alternatives considered.
|
|
255
|
+
|
|
256
|
+
**If `manual`:** No note for quick tasks (keep it fast).
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Restore local workflow customizations after updating the platform
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Reapply Patches
|
|
6
|
+
|
|
7
|
+
Restore local modifications to platform workflows after running `/update`. The update workflow backs up locally modified files before overwriting — this workflow merges your changes back.
|
|
8
|
+
|
|
9
|
+
**Usage:** `reapply-patches`
|
|
10
|
+
|
|
11
|
+
**Use after:** `/update` reports that local changes were backed up.
|
|
12
|
+
|
|
13
|
+
## Step 1: Find Backed-Up Patches
|
|
14
|
+
|
|
15
|
+
Check for the local patches directory:
|
|
16
|
+
```bash
|
|
17
|
+
ls .windsurf/local-patches/ 2>/dev/null || ls ~/.codeium/windsurf/local-patches/ 2>/dev/null
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Also check for a patches manifest:
|
|
21
|
+
```bash
|
|
22
|
+
cat .windsurf/local-patches/PATCHES.md 2>/dev/null
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If no patches directory found:
|
|
26
|
+
```
|
|
27
|
+
No local patches found. Nothing to reapply.
|
|
28
|
+
|
|
29
|
+
If you expected patches, check:
|
|
30
|
+
- .windsurf/local-patches/
|
|
31
|
+
- ~/.codeium/windsurf/local-patches/
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Stop.
|
|
35
|
+
|
|
36
|
+
## Step 2: Inventory Patches
|
|
37
|
+
|
|
38
|
+
Read the patches directory and list what was backed up:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
find .windsurf/local-patches/ -name "*.md" -o -name "*.json" 2>/dev/null | sort
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Display:
|
|
45
|
+
```
|
|
46
|
+
Found [N] backed-up local modification(s):
|
|
47
|
+
|
|
48
|
+
- [filename] — [last modified date]
|
|
49
|
+
- [filename] — [last modified date]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Step 3: Review Each Patch
|
|
53
|
+
|
|
54
|
+
For each backed-up file, compare it with the current installed version:
|
|
55
|
+
|
|
56
|
+
Read the backed-up file and the current installed file. Identify:
|
|
57
|
+
- Lines only in your local version (customizations)
|
|
58
|
+
- Lines only in the new version (upstream changes)
|
|
59
|
+
- Lines in both (unchanged)
|
|
60
|
+
|
|
61
|
+
Display a summary for each file:
|
|
62
|
+
```
|
|
63
|
+
## [filename]
|
|
64
|
+
|
|
65
|
+
Your local changes:
|
|
66
|
+
- [Line/section you added or modified]
|
|
67
|
+
- [Another change]
|
|
68
|
+
|
|
69
|
+
New upstream content:
|
|
70
|
+
- [What the update added or changed]
|
|
71
|
+
|
|
72
|
+
Conflict? [Yes/No — if yes, describe what overlaps]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Step 4: Merge Strategy
|
|
76
|
+
|
|
77
|
+
For each file, choose the merge approach:
|
|
78
|
+
|
|
79
|
+
**Non-conflicting changes** (your edits and upstream edits touch different sections):
|
|
80
|
+
→ Auto-merge: apply your changes on top of the new version
|
|
81
|
+
|
|
82
|
+
**Conflicting changes** (same section modified by both):
|
|
83
|
+
→ Show the conflict, ask:
|
|
84
|
+
```
|
|
85
|
+
Conflict in [filename]:
|
|
86
|
+
|
|
87
|
+
Your version:
|
|
88
|
+
[your text]
|
|
89
|
+
|
|
90
|
+
Upstream version:
|
|
91
|
+
[upstream text]
|
|
92
|
+
|
|
93
|
+
Choose:
|
|
94
|
+
1. Keep yours (discard upstream change)
|
|
95
|
+
2. Keep upstream (discard your change)
|
|
96
|
+
3. Merge manually — I'll show you both and you edit
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Wait for choice.
|
|
100
|
+
|
|
101
|
+
## Step 5: Apply Merged Files
|
|
102
|
+
|
|
103
|
+
Write each merged file to its target location. Verify the write succeeded.
|
|
104
|
+
|
|
105
|
+
## Step 6: Clean Up Patches
|
|
106
|
+
|
|
107
|
+
After successfully reapplying all patches:
|
|
108
|
+
```bash
|
|
109
|
+
rm -rf .windsurf/local-patches/
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Or if the user wants to keep the backup:
|
|
113
|
+
```bash
|
|
114
|
+
mv .windsurf/local-patches/ .windsurf/local-patches-$(date +%Y%m%d)/
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Step 7: Confirm
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
121
|
+
learnship ► PATCHES REAPPLIED ✓
|
|
122
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
123
|
+
|
|
124
|
+
[N] local modification(s) restored:
|
|
125
|
+
- [file]: [brief description of what was restored]
|
|
126
|
+
|
|
127
|
+
Local patches directory cleared.
|
|
128
|
+
|
|
129
|
+
Your customizations are now active on top of the updated platform.
|
|
130
|
+
```
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Cut a new learnship release — bump version, update changelog, push to public-main, tag, create GitHub release
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Release — learnship
|
|
6
|
+
|
|
7
|
+
Ships a new version to the public GitHub repo and creates a GitHub release with changelog notes.
|
|
8
|
+
|
|
9
|
+
> **Private workflow** — gitignored, never shipped with the product.
|
|
10
|
+
> Requires a GitHub PAT with `repo` scope in the environment or entered at runtime.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 1: Confirm you are on main and clean
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cd /home/ec2-user/favio/agentic-development
|
|
18
|
+
git status
|
|
19
|
+
git log --oneline -5
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Everything must be clean. If not, commit or stash first.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Step 2: Decide the version bump
|
|
27
|
+
|
|
28
|
+
Ask the user: "What kind of release is this?"
|
|
29
|
+
|
|
30
|
+
- **patch** — bug fixes only (e.g. `1.1.0` → `1.1.1`)
|
|
31
|
+
- **minor** — new workflows, skills, or agent personas (e.g. `1.1.0` → `1.2.0`)
|
|
32
|
+
- **major** — breaking changes or major new capability layers (e.g. `1.1.0` → `2.0.0`)
|
|
33
|
+
|
|
34
|
+
Read the current version:
|
|
35
|
+
```bash
|
|
36
|
+
node -e "console.log(JSON.parse(require('fs').readFileSync('package.json','utf8')).version)"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Calculate the new version based on the bump type.
|
|
40
|
+
|
|
41
|
+
Ask the user: "Releasing as vX.Y.Z — confirm?"
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 3: Collect release notes
|
|
46
|
+
|
|
47
|
+
Ask the user: "What changed in this release? List the highlights."
|
|
48
|
+
|
|
49
|
+
Wait for their input. Then organize into:
|
|
50
|
+
- `### Added` — new workflows, skills, features
|
|
51
|
+
- `### Changed` — behaviour changes, improvements
|
|
52
|
+
- `### Fixed` — bugs resolved
|
|
53
|
+
|
|
54
|
+
If any section has no entries, omit it.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 4: Update CHANGELOG.md
|
|
59
|
+
|
|
60
|
+
Prepend a new entry above the current latest version in `CHANGELOG.md`:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## [vX.Y.Z] — [Short title]
|
|
64
|
+
|
|
65
|
+
**Released:** YYYY-MM-DD
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
- ...
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
- ...
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use today's date (run `date +%Y-%m-%d` to get it).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Step 5: Bump version in package.json
|
|
79
|
+
|
|
80
|
+
Edit `package.json` — change the `"version"` field to the new version string.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 6: Run tests to verify nothing is broken
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bash tests/run_all.sh
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If any test fails, stop and fix before proceeding.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Step 7: Commit on main
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git add CHANGELOG.md package.json
|
|
98
|
+
git commit -m "chore: release vX.Y.Z — [short title]"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Step 8: Set remote URL with PAT
|
|
104
|
+
|
|
105
|
+
Ask the user for their GitHub PAT if not already set, or check if it's in `.env`:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
source .env 2>/dev/null && echo "PAT found: ${GITHUB_PAT:0:8}..." || echo "PAT not in .env — will prompt"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If not in `.env`, ask: "Please provide your GitHub PAT."
|
|
112
|
+
|
|
113
|
+
Set the remote:
|
|
114
|
+
```bash
|
|
115
|
+
git remote set-url origin https://<PAT>@github.com/FavioVazquez/learnship.git
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Step 9: Cherry-pick release commit onto public-main
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git checkout public-main
|
|
124
|
+
|
|
125
|
+
# Bring over CHANGELOG.md and package.json from main
|
|
126
|
+
git checkout main -- CHANGELOG.md package.json
|
|
127
|
+
git add CHANGELOG.md package.json
|
|
128
|
+
git commit -m "chore: release vX.Y.Z — [short title]"
|
|
129
|
+
|
|
130
|
+
# Push to GitHub main
|
|
131
|
+
git push origin public-main:main
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Step 10: Tag the release
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
git tag vX.Y.Z
|
|
140
|
+
git push origin vX.Y.Z
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Step 11: Create GitHub release via API
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
RELEASE_NOTES="$(cat <<'NOTES'
|
|
149
|
+
## What's new in vX.Y.Z
|
|
150
|
+
|
|
151
|
+
[paste formatted release notes here]
|
|
152
|
+
|
|
153
|
+
## Install
|
|
154
|
+
|
|
155
|
+
\`\`\`bash
|
|
156
|
+
npx github:FavioVazquez/learnship
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
See [CHANGELOG.md](https://github.com/FavioVazquez/learnship/blob/main/CHANGELOG.md) for full details.
|
|
160
|
+
NOTES
|
|
161
|
+
)"
|
|
162
|
+
|
|
163
|
+
curl -s -X POST \
|
|
164
|
+
-H "Authorization: token <PAT>" \
|
|
165
|
+
-H "Content-Type: application/json" \
|
|
166
|
+
https://api.github.com/repos/FavioVazquez/learnship/releases \
|
|
167
|
+
-d "{
|
|
168
|
+
\"tag_name\": \"vX.Y.Z\",
|
|
169
|
+
\"target_commitish\": \"main\",
|
|
170
|
+
\"name\": \"vX.Y.Z — [Short title]\",
|
|
171
|
+
\"body\": $(echo "$RELEASE_NOTES" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))'),
|
|
172
|
+
\"draft\": false,
|
|
173
|
+
\"prerelease\": false
|
|
174
|
+
}" | python3 -c "import sys,json; r=json.load(sys.stdin); print(r.get('html_url', r.get('message','ERROR')))"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If successful, the release URL is printed.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Step 12: Switch back to main and strip the PAT
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
git checkout main
|
|
185
|
+
git remote set-url origin https://github.com/FavioVazquez/learnship.git
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Verify the token is gone:
|
|
189
|
+
```bash
|
|
190
|
+
git remote -v
|
|
191
|
+
# Must show plain HTTPS — no token visible
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Step 13: Verify
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
git log --oneline public-main -3 # new release commit at top
|
|
200
|
+
git tag --sort=-version:refname | head -5 # new tag at top
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Open the release URL printed in Step 11 to confirm it looks correct on GitHub.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Done
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
✓ vX.Y.Z tagged and pushed
|
|
211
|
+
✓ GitHub release created with notes
|
|
212
|
+
✓ CHANGELOG.md and package.json updated
|
|
213
|
+
✓ PAT stripped from remote URL
|
|
214
|
+
✓ Back on local main
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Next release: repeat from Step 1.
|