learnship 2.2.2 → 2.3.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 +2 -2
- package/.cursor-plugin/plugin.json +2 -2
- package/README.md +19 -8
- package/agents/learnship-doc-verifier.md +79 -0
- package/agents/learnship-project-researcher.md +78 -0
- package/agents/learnship-research-synthesizer.md +89 -0
- package/agents/learnship-researcher.md +113 -0
- package/agents/learnship-roadmapper.md +56 -0
- package/bin/install.js +59 -1
- package/gemini-extension.json +2 -2
- package/learnship/agents/doc-verifier.md +73 -0
- package/learnship/agents/phase-researcher.md +92 -0
- package/learnship/agents/project-researcher.md +72 -0
- package/learnship/agents/research-synthesizer.md +83 -0
- package/learnship/agents/roadmapper.md +50 -0
- package/learnship/workflows/audit-milestone.md +6 -1
- package/learnship/workflows/challenge.md +14 -2
- package/learnship/workflows/compound.md +6 -1
- package/learnship/workflows/debug.md +12 -2
- package/learnship/workflows/diagnose-issues.md +6 -1
- package/learnship/workflows/execute-phase.md +14 -2
- package/learnship/workflows/execute-plan.md +7 -1
- package/learnship/workflows/ideate.md +12 -2
- package/learnship/workflows/map-codebase.md +6 -1
- package/learnship/workflows/new-milestone.md +14 -2
- package/learnship/workflows/new-project.md +18 -2
- package/learnship/workflows/plan-phase.md +21 -3
- package/learnship/workflows/quick.md +30 -5
- package/learnship/workflows/research-phase.md +7 -1
- package/learnship/workflows/review.md +6 -1
- package/learnship/workflows/secure-phase.md +6 -1
- package/learnship/workflows/validate-phase.md +6 -1
- package/learnship/workflows/verify-work.md +17 -3
- package/package.json +2 -3
- package/install.sh +0 -254
|
@@ -148,7 +148,13 @@ Wait for agent to complete, then verify RESEARCH.md was written.
|
|
|
148
148
|
|
|
149
149
|
**If `parallelization` is `false` (sequential mode):**
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
<persona_context>
|
|
152
|
+
You are now the **learnship phase researcher**. Your training data is stale — verify before asserting.
|
|
153
|
+
Tag every claim: [VERIFIED: source], [CITED: url], or [ASSUMED]. Never present assumed knowledge as verified fact.
|
|
154
|
+
Use WebSearch for implementation patterns, WebFetch for official docs, codebase scan for existing patterns to reuse.
|
|
155
|
+
</persona_context>
|
|
156
|
+
|
|
157
|
+
Read `@./agents/phase-researcher.md` for the full persona definition. Investigate how to implement this phase.
|
|
152
158
|
|
|
153
159
|
**Online research first.** Before writing anything, run at least 3 WebSearch queries relevant to this phase's domain. Use WebFetch to read official docs for any libraries discovered. Then read:
|
|
154
160
|
- The CONTEXT.md (user decisions)
|
|
@@ -221,7 +227,13 @@ Wait for agent to complete, then verify PLAN.md files were written.
|
|
|
221
227
|
|
|
222
228
|
**If `parallelization` is `false` (sequential mode):**
|
|
223
229
|
|
|
224
|
-
|
|
230
|
+
<persona_context>
|
|
231
|
+
You are now the **learnship planner**. Create implementation plans that are executable in a single context window.
|
|
232
|
+
Each plan covers one logical unit of work. Tasks use XML format. Include YAML frontmatter with wave, depends_on, files_modified.
|
|
233
|
+
Right-size plans: too small = overhead, too large = risk. Aim for plans completable in one focused session.
|
|
234
|
+
</persona_context>
|
|
235
|
+
|
|
236
|
+
Read `@./agents/planner.md` for the full persona definition. Read all available context:
|
|
225
237
|
- `.planning/STATE.md`
|
|
226
238
|
- `.planning/ROADMAP.md`
|
|
227
239
|
- `.planning/REQUIREMENTS.md`
|
|
@@ -287,7 +299,13 @@ If still failing after 3 iterations: present issues and ask — **Force proceed*
|
|
|
287
299
|
|
|
288
300
|
**If `parallelization` is `false` (sequential mode):**
|
|
289
301
|
|
|
290
|
-
|
|
302
|
+
<persona_context>
|
|
303
|
+
You are now the **learnship verifier**. Check plans against requirements and roadmap.
|
|
304
|
+
Every v1 requirement must map to at least one plan task. Success criteria must be observable and testable.
|
|
305
|
+
Flag gaps, missing coverage, unrealistic estimates, and circular dependencies.
|
|
306
|
+
</persona_context>
|
|
307
|
+
|
|
308
|
+
Read `@./agents/verifier.md` for the full persona definition. Check the plans against:
|
|
291
309
|
- The phase goal from ROADMAP.md
|
|
292
310
|
- All requirement IDs assigned to this phase
|
|
293
311
|
- CONTEXT.md decisions (are they honored?)
|
|
@@ -139,7 +139,13 @@ Write `CONTEXT.md` to the task directory:
|
|
|
139
139
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
<persona_context>
|
|
143
|
+
You are now the **learnship researcher**. Your training data is stale — verify before asserting.
|
|
144
|
+
Use WebSearch for current best practices, WebFetch for official docs, codebase scan for existing patterns.
|
|
145
|
+
Tag confidence: HIGH/MEDIUM/LOW. Investigation, not confirmation.
|
|
146
|
+
</persona_context>
|
|
147
|
+
|
|
148
|
+
Read `@./agents/researcher.md` for the full persona definition. Do a focused research pass on the task:
|
|
143
149
|
- What libraries or approaches are relevant?
|
|
144
150
|
- What pitfalls should the implementation avoid?
|
|
145
151
|
- Are there existing patterns in the codebase to follow?
|
|
@@ -148,7 +154,12 @@ Write a brief `${NEXT_NUM}-RESEARCH.md` (max 50 lines) to the task directory. Th
|
|
|
148
154
|
|
|
149
155
|
## Step 4: Create Plan
|
|
150
156
|
|
|
151
|
-
|
|
157
|
+
<persona_context>
|
|
158
|
+
You are now the **learnship planner**. Create a focused implementation plan.
|
|
159
|
+
Single plan with 1-3 tasks. Each task must be completable in one context window. Include must_haves.
|
|
160
|
+
</persona_context>
|
|
161
|
+
|
|
162
|
+
Read `@./agents/planner.md` for the full persona definition. Read:
|
|
152
163
|
- `.planning/STATE.md`
|
|
153
164
|
- CONTEXT.md if it exists (from `--discuss`)
|
|
154
165
|
- The task description
|
|
@@ -179,7 +190,12 @@ node -e "const fs=require('fs'); console.log(fs.existsSync('.planning/quick/NEXT
|
|
|
179
190
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
180
191
|
```
|
|
181
192
|
|
|
182
|
-
|
|
193
|
+
<persona_context>
|
|
194
|
+
You are now the **learnship verifier**. Check the plan against the task description.
|
|
195
|
+
Flag gaps, missing coverage, and unrealistic scope.
|
|
196
|
+
</persona_context>
|
|
197
|
+
|
|
198
|
+
Read `@./agents/verifier.md` for the full persona definition. Verify the plan against the task description:
|
|
183
199
|
- Does the plan address the task description?
|
|
184
200
|
- Do tasks have files, action, verify, done fields?
|
|
185
201
|
- Is this appropriately sized for a quick task (1-3 tasks)?
|
|
@@ -191,7 +207,12 @@ If still failing after 2 iterations: present remaining issues and ask — **Forc
|
|
|
191
207
|
|
|
192
208
|
## Step 6: Execute
|
|
193
209
|
|
|
194
|
-
|
|
210
|
+
<persona_context>
|
|
211
|
+
You are now the **learnship executor**. Implement code from the plan, one task at a time.
|
|
212
|
+
Read task files, action, verify, and done fields. Commit atomically after each task.
|
|
213
|
+
</persona_context>
|
|
214
|
+
|
|
215
|
+
Read `@./agents/executor.md` for the full persona definition. Read the PLAN.md and execute each task:
|
|
195
216
|
|
|
196
217
|
1. Read the task's `<files>`, `<action>`, `<verify>`, `<done>` fields
|
|
197
218
|
2. Implement what the action describes
|
|
@@ -231,7 +252,11 @@ After all tasks complete, write `${NEXT_NUM}-SUMMARY.md`:
|
|
|
231
252
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
232
253
|
```
|
|
233
254
|
|
|
234
|
-
|
|
255
|
+
<persona_context>
|
|
256
|
+
You are now the **learnship verifier**. Check must_haves from the plan against the actual codebase.
|
|
257
|
+
</persona_context>
|
|
258
|
+
|
|
259
|
+
Read `@./agents/verifier.md` for the full persona definition. Check `must_haves` from the plan against the actual codebase.
|
|
235
260
|
|
|
236
261
|
Write `${NEXT_NUM}-VERIFICATION.md`. Store status as `VERIFICATION_STATUS`.
|
|
237
262
|
|
|
@@ -116,7 +116,13 @@ Task(
|
|
|
116
116
|
|
|
117
117
|
**If `parallelization.enabled` is `false` (sequential mode):**
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
<persona_context>
|
|
120
|
+
You are now the **learnship phase researcher**. Your training data is stale — verify before asserting.
|
|
121
|
+
Tag every claim: [VERIFIED: source], [CITED: url], or [ASSUMED]. Never present assumed knowledge as verified fact.
|
|
122
|
+
Use WebSearch for implementation patterns, WebFetch for official docs, codebase scan for existing patterns to reuse.
|
|
123
|
+
</persona_context>
|
|
124
|
+
|
|
125
|
+
Read `@./agents/phase-researcher.md` for the full persona definition. In **phase research mode**:
|
|
120
126
|
|
|
121
127
|
**Online research first.** Before writing anything, run at least 3 WebSearch queries relevant to this phase's domain:
|
|
122
128
|
|
|
@@ -122,7 +122,12 @@ Wait for all personas to complete.
|
|
|
122
122
|
|
|
123
123
|
**If `parallelization` is `false` (sequential mode):**
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
<persona_context>
|
|
126
|
+
You are now the **learnship code reviewer**. Review code for correctness, testing, security, and performance.
|
|
127
|
+
Be specific — cite file:line, explain the issue, propose the fix. Severity: critical/major/minor/nit.
|
|
128
|
+
</persona_context>
|
|
129
|
+
|
|
130
|
+
Read `@./agents/code-reviewer.md` for the full persona definition. Run each selected persona sequentially. For each persona:
|
|
126
131
|
|
|
127
132
|
1. Adopt the persona's focus lens
|
|
128
133
|
2. Read the diff through that lens
|
|
@@ -126,7 +126,12 @@ Task(
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
**If `parallelization.enabled` is `false`:**
|
|
129
|
-
|
|
129
|
+
<persona_context>
|
|
130
|
+
You are now the **learnship security auditor**. Run STRIDE threat analysis against the codebase.
|
|
131
|
+
Check each open threat. Verify mitigations are implemented correctly. Update status based on findings.
|
|
132
|
+
</persona_context>
|
|
133
|
+
|
|
134
|
+
Read `@./agents/security-auditor.md` for the full persona definition. Check each open threat against the codebase. Update status based on findings.
|
|
130
135
|
|
|
131
136
|
**For "Accept all":** Add each to the Accepted Risks Log with user's rationale.
|
|
132
137
|
|
|
@@ -130,7 +130,12 @@ Task(
|
|
|
130
130
|
|
|
131
131
|
**If `parallelization.enabled` is `false` (sequential mode):**
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
<persona_context>
|
|
134
|
+
You are now the **learnship verifier**. Write missing test files to close validation gaps.
|
|
135
|
+
Tests must be observable and runnable. Cover the must_haves from each plan. Don't weaken existing tests.
|
|
136
|
+
</persona_context>
|
|
137
|
+
|
|
138
|
+
Read `@./agents/verifier.md` for the full persona definition. Write the missing test files. Rules:
|
|
134
139
|
- Never touch implementation files
|
|
135
140
|
- Match the existing test framework and style
|
|
136
141
|
- Write tests that actually run (import real modules, not mocks of the implementation)
|
|
@@ -277,7 +277,12 @@ Task(
|
|
|
277
277
|
|
|
278
278
|
**If `parallelization.enabled` is `false` (sequential mode):**
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
<persona_context>
|
|
281
|
+
You are now the **learnship debugger**. Diagnose the root cause of each gap.
|
|
282
|
+
One variable at a time. Reproduce before diagnosing. Trace from symptom to root cause.
|
|
283
|
+
</persona_context>
|
|
284
|
+
|
|
285
|
+
Read `@./agents/debugger.md` for the full persona definition. For each issue in the Gaps section, investigate:
|
|
281
286
|
- Read the relevant source files
|
|
282
287
|
- Trace the issue to its root cause
|
|
283
288
|
- Do not fix yet — just diagnose
|
|
@@ -301,9 +306,18 @@ Display:
|
|
|
301
306
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
302
307
|
```
|
|
303
308
|
|
|
304
|
-
|
|
309
|
+
<persona_context>
|
|
310
|
+
You are now the **learnship planner**. Create fix plans for diagnosed gaps.
|
|
311
|
+
Each plan covers one logical unit of work. Include gap_closure: true in frontmatter.
|
|
312
|
+
</persona_context>
|
|
313
|
+
|
|
314
|
+
Read `@./agents/planner.md` for the full persona definition. Read the UAT.md file with diagnosed gaps. Create fix plans in the phase directory with `gap_closure: true` in frontmatter.
|
|
315
|
+
|
|
316
|
+
<persona_context>
|
|
317
|
+
You are now the **learnship verifier**. Verify fix plans close the diagnosed gaps.
|
|
318
|
+
</persona_context>
|
|
305
319
|
|
|
306
|
-
Verify fix plans (max 3 iterations
|
|
320
|
+
Verify fix plans (max 3 iterations — read `@./agents/verifier.md` for the full persona definition) — same loop as `plan-phase`.
|
|
307
321
|
|
|
308
322
|
Present when ready:
|
|
309
323
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "learnship",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Learn as you build. Build with intent. — A multi-platform agentic engineering system for Windsurf, Claude Code, Cursor, OpenCode, Gemini CLI, and Codex: spec-driven workflows, integrated learning, and production-grade design.",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "Learn as you build. Build with intent. — A multi-platform agentic engineering system for Windsurf, Claude Code, Cursor, OpenCode, Gemini CLI, and Codex: 57 spec-driven workflows, 17 specialist agent personas, integrated learning, and production-grade design.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic",
|
|
7
7
|
"development",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"agents",
|
|
28
28
|
"references",
|
|
29
29
|
"templates",
|
|
30
|
-
"install.sh",
|
|
31
30
|
"skills",
|
|
32
31
|
"hooks",
|
|
33
32
|
".claude-plugin",
|
package/install.sh
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# learnship — Installer
|
|
3
|
-
# Usage:
|
|
4
|
-
# bash install.sh # interactive
|
|
5
|
-
# bash install.sh --local # project install (non-interactive)
|
|
6
|
-
# bash install.sh --global # global install (non-interactive)
|
|
7
|
-
# bash install.sh --uninstall --local
|
|
8
|
-
# bash install.sh --uninstall --global
|
|
9
|
-
|
|
10
|
-
set -e
|
|
11
|
-
|
|
12
|
-
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
13
|
-
PLATFORM_NAME="learnship"
|
|
14
|
-
|
|
15
|
-
# Colors
|
|
16
|
-
RED='\033[0;31m'
|
|
17
|
-
GREEN='\033[0;32m'
|
|
18
|
-
YELLOW='\033[1;33m'
|
|
19
|
-
BLUE='\033[0;34m'
|
|
20
|
-
BOLD='\033[1m'
|
|
21
|
-
RESET='\033[0m'
|
|
22
|
-
|
|
23
|
-
# ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
24
|
-
|
|
25
|
-
print_header() {
|
|
26
|
-
echo ""
|
|
27
|
-
echo -e "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
28
|
-
echo -e "${BOLD} ${PLATFORM_NAME}${RESET}"
|
|
29
|
-
echo -e "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
30
|
-
echo ""
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
print_success() { echo -e "${GREEN}✓${RESET} $1"; }
|
|
34
|
-
print_error() { echo -e "${RED}✗${RESET} $1" >&2; }
|
|
35
|
-
print_info() { echo -e "${BLUE}→${RESET} $1"; }
|
|
36
|
-
print_warn() { echo -e "${YELLOW}!${RESET} $1"; }
|
|
37
|
-
|
|
38
|
-
# ─── Argument Parsing ────────────────────────────────────────────────────────
|
|
39
|
-
|
|
40
|
-
SCOPE=""
|
|
41
|
-
UNINSTALL=false
|
|
42
|
-
|
|
43
|
-
for arg in "$@"; do
|
|
44
|
-
case "$arg" in
|
|
45
|
-
--local) SCOPE="local" ;;
|
|
46
|
-
--global) SCOPE="global" ;;
|
|
47
|
-
--uninstall) UNINSTALL=true ;;
|
|
48
|
-
--help|-h)
|
|
49
|
-
echo "Usage: bash install.sh [--local|--global] [--uninstall]"
|
|
50
|
-
echo ""
|
|
51
|
-
echo " --local Install to current project's .windsurf/ directory"
|
|
52
|
-
echo " --global Install to ~/.codeium/windsurf/ (available in all projects)"
|
|
53
|
-
echo " --uninstall Remove the installation"
|
|
54
|
-
echo ""
|
|
55
|
-
echo "Run without flags for interactive mode."
|
|
56
|
-
exit 0
|
|
57
|
-
;;
|
|
58
|
-
*)
|
|
59
|
-
print_error "Unknown argument: $arg"
|
|
60
|
-
echo "Run 'bash install.sh --help' for usage."
|
|
61
|
-
exit 1
|
|
62
|
-
;;
|
|
63
|
-
esac
|
|
64
|
-
done
|
|
65
|
-
|
|
66
|
-
# ─── Determine Target Directory ──────────────────────────────────────────────
|
|
67
|
-
|
|
68
|
-
get_target_dir() {
|
|
69
|
-
local scope="$1"
|
|
70
|
-
if [[ "$scope" == "global" ]]; then
|
|
71
|
-
echo "$HOME/.codeium/windsurf"
|
|
72
|
-
else
|
|
73
|
-
# When run via npx, pwd() is the npx cache — use LEARNSHIP_INSTALL_CWD
|
|
74
|
-
# (set by bin/learnship.js from INIT_CWD) to get the user's actual project dir
|
|
75
|
-
local project_dir="${LEARNSHIP_INSTALL_CWD:-$(pwd)}"
|
|
76
|
-
echo "${project_dir}/.windsurf"
|
|
77
|
-
fi
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
# ─── Interactive Prompt ──────────────────────────────────────────────────────
|
|
81
|
-
|
|
82
|
-
if [[ -z "$SCOPE" ]]; then
|
|
83
|
-
print_header
|
|
84
|
-
|
|
85
|
-
echo -e "${BOLD}Where would you like to install?${RESET}"
|
|
86
|
-
echo ""
|
|
87
|
-
echo " [1] Project — installs to ./.windsurf/ (current project only)"
|
|
88
|
-
echo " [2] Global — installs to ~/.codeium/windsurf/ (all Windsurf projects)"
|
|
89
|
-
echo ""
|
|
90
|
-
read -p "Choice [1/2]: " choice
|
|
91
|
-
|
|
92
|
-
case "$choice" in
|
|
93
|
-
1|"") SCOPE="local" ;;
|
|
94
|
-
2) SCOPE="global" ;;
|
|
95
|
-
*)
|
|
96
|
-
print_error "Invalid choice. Run again and enter 1 or 2."
|
|
97
|
-
exit 1
|
|
98
|
-
;;
|
|
99
|
-
esac
|
|
100
|
-
fi
|
|
101
|
-
|
|
102
|
-
TARGET_DIR="$(get_target_dir "$SCOPE")"
|
|
103
|
-
|
|
104
|
-
# ─── Uninstall ───────────────────────────────────────────────────────────────
|
|
105
|
-
|
|
106
|
-
if [[ "$UNINSTALL" == true ]]; then
|
|
107
|
-
print_header
|
|
108
|
-
echo -e "Uninstalling from: ${BOLD}${TARGET_DIR}${RESET}"
|
|
109
|
-
echo ""
|
|
110
|
-
|
|
111
|
-
REMOVED=0
|
|
112
|
-
|
|
113
|
-
if [[ -d "${TARGET_DIR}/workflows" ]]; then
|
|
114
|
-
# Only remove our workflows (non-destructive: checks for our files)
|
|
115
|
-
for wf in new-project discuss-phase plan-phase execute-phase verify-work quick progress ls next pause-work resume-work complete-milestone; do
|
|
116
|
-
if [[ -f "${TARGET_DIR}/workflows/${wf}.md" ]]; then
|
|
117
|
-
rm "${TARGET_DIR}/workflows/${wf}.md"
|
|
118
|
-
print_info "Removed workflows/${wf}.md"
|
|
119
|
-
((REMOVED++)) || true
|
|
120
|
-
fi
|
|
121
|
-
done
|
|
122
|
-
fi
|
|
123
|
-
|
|
124
|
-
if [[ -d "${TARGET_DIR}/skills/agentic-learning" ]]; then
|
|
125
|
-
rm -rf "${TARGET_DIR}/skills/agentic-learning"
|
|
126
|
-
print_info "Removed skills/agentic-learning/"
|
|
127
|
-
((REMOVED++)) || true
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
if [[ -d "${TARGET_DIR}/skills/impeccable" ]]; then
|
|
131
|
-
rm -rf "${TARGET_DIR}/skills/impeccable"
|
|
132
|
-
print_info "Removed skills/impeccable/"
|
|
133
|
-
((REMOVED++)) || true
|
|
134
|
-
fi
|
|
135
|
-
|
|
136
|
-
if [[ -d "${TARGET_DIR}/skills/frontend-design" ]]; then
|
|
137
|
-
rm -rf "${TARGET_DIR}/skills/frontend-design"
|
|
138
|
-
print_info "Removed skills/frontend-design/ (legacy)"
|
|
139
|
-
((REMOVED++)) || true
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
if [[ $REMOVED -eq 0 ]]; then
|
|
143
|
-
print_warn "Nothing found to remove at ${TARGET_DIR}"
|
|
144
|
-
else
|
|
145
|
-
echo ""
|
|
146
|
-
print_success "Uninstall complete. Removed ${REMOVED} item(s)."
|
|
147
|
-
fi
|
|
148
|
-
exit 0
|
|
149
|
-
fi
|
|
150
|
-
|
|
151
|
-
# ─── Install ─────────────────────────────────────────────────────────────────
|
|
152
|
-
|
|
153
|
-
print_header
|
|
154
|
-
echo -e "Installing to: ${BOLD}${TARGET_DIR}${RESET}"
|
|
155
|
-
if [[ "$SCOPE" == "global" ]]; then
|
|
156
|
-
print_info "Global install — workflows and skills will be available in all Windsurf projects"
|
|
157
|
-
else
|
|
158
|
-
print_info "Project install — workflows and skills available in this project only"
|
|
159
|
-
fi
|
|
160
|
-
echo ""
|
|
161
|
-
|
|
162
|
-
# Validate source directory has the required files
|
|
163
|
-
if [[ ! -d "${REPO_DIR}/.windsurf/workflows" ]]; then
|
|
164
|
-
print_error "Source workflows not found at ${REPO_DIR}/.windsurf/workflows"
|
|
165
|
-
print_error "Make sure you are running install.sh from the agentic-development repo root."
|
|
166
|
-
exit 1
|
|
167
|
-
fi
|
|
168
|
-
|
|
169
|
-
# Create target directories
|
|
170
|
-
mkdir -p "${TARGET_DIR}/workflows"
|
|
171
|
-
mkdir -p "${TARGET_DIR}/skills"
|
|
172
|
-
|
|
173
|
-
# ── Install Workflows ──────────────────────────────────────────────────────
|
|
174
|
-
|
|
175
|
-
echo -e "${BOLD}Installing workflows...${RESET}"
|
|
176
|
-
|
|
177
|
-
WORKFLOW_COUNT=0
|
|
178
|
-
for wf_file in "${REPO_DIR}/.windsurf/workflows/"*.md; do
|
|
179
|
-
wf_name="$(basename "$wf_file")"
|
|
180
|
-
dest="${TARGET_DIR}/workflows/${wf_name}"
|
|
181
|
-
if [[ "$(realpath "$wf_file")" != "$(realpath "$dest" 2>/dev/null)" ]]; then
|
|
182
|
-
cp "$wf_file" "$dest"
|
|
183
|
-
print_success "workflows/${wf_name}"
|
|
184
|
-
((WORKFLOW_COUNT++)) || true
|
|
185
|
-
fi
|
|
186
|
-
done
|
|
187
|
-
|
|
188
|
-
echo ""
|
|
189
|
-
|
|
190
|
-
# ── Install Skills ─────────────────────────────────────────────────────────
|
|
191
|
-
|
|
192
|
-
echo -e "${BOLD}Installing skills...${RESET}"
|
|
193
|
-
|
|
194
|
-
# agentic-learning
|
|
195
|
-
if [[ -d "${REPO_DIR}/.windsurf/skills/agentic-learning" ]]; then
|
|
196
|
-
mkdir -p "${TARGET_DIR}/skills/agentic-learning"
|
|
197
|
-
if [[ "$(realpath "${REPO_DIR}/.windsurf/skills/agentic-learning")" != "$(realpath "${TARGET_DIR}/skills/agentic-learning" 2>/dev/null)" ]]; then
|
|
198
|
-
cp -r "${REPO_DIR}/.windsurf/skills/agentic-learning/"* "${TARGET_DIR}/skills/agentic-learning/"
|
|
199
|
-
fi
|
|
200
|
-
print_success "skills/agentic-learning/ (learning partner)"
|
|
201
|
-
else
|
|
202
|
-
print_warn "skills/agentic-learning/ not found in source — skipping"
|
|
203
|
-
fi
|
|
204
|
-
|
|
205
|
-
# impeccable (full design skill suite)
|
|
206
|
-
if [[ -d "${REPO_DIR}/.windsurf/skills/impeccable" ]]; then
|
|
207
|
-
if [[ "$(realpath "${REPO_DIR}/.windsurf/skills/impeccable")" != "$(realpath "${TARGET_DIR}/skills/impeccable" 2>/dev/null)" ]]; then
|
|
208
|
-
cp -r "${REPO_DIR}/.windsurf/skills/impeccable" "${TARGET_DIR}/skills/impeccable"
|
|
209
|
-
fi
|
|
210
|
-
IMPECCABLE_COUNT=$(find "${REPO_DIR}/.windsurf/skills/impeccable" -name "SKILL.md" | wc -l | tr -d ' ')
|
|
211
|
-
print_success "skills/impeccable/ (${IMPECCABLE_COUNT} design skills — audit, critique, polish, colorize + more)"
|
|
212
|
-
else
|
|
213
|
-
print_warn "skills/impeccable/ not found in source — skipping"
|
|
214
|
-
fi
|
|
215
|
-
|
|
216
|
-
echo ""
|
|
217
|
-
|
|
218
|
-
# ── Done ──────────────────────────────────────────────────────────────────
|
|
219
|
-
|
|
220
|
-
echo -e "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
221
|
-
echo -e "${GREEN}${BOLD} Installation complete!${RESET}"
|
|
222
|
-
echo -e "${BOLD}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
223
|
-
echo ""
|
|
224
|
-
echo -e " ${BOLD}Installed:${RESET} ${WORKFLOW_COUNT} workflows + 2 skill suites (agentic-learning, impeccable)"
|
|
225
|
-
echo -e " ${BOLD}Location:${RESET} ${TARGET_DIR}"
|
|
226
|
-
echo ""
|
|
227
|
-
|
|
228
|
-
if [[ "$SCOPE" == "global" ]]; then
|
|
229
|
-
echo -e " ${BOLD}Next steps:${RESET}"
|
|
230
|
-
echo -e " • Restart Windsurf (or reload the window) to activate"
|
|
231
|
-
echo -e " • Open any project and type ${BOLD}/new-project${RESET} to start"
|
|
232
|
-
else
|
|
233
|
-
echo -e " ${BOLD}Next steps:${RESET}"
|
|
234
|
-
echo -e " • Workflows are immediately available in this project"
|
|
235
|
-
echo -e " • Type ${BOLD}/new-project${RESET} in Cascade to start"
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
echo ""
|
|
239
|
-
echo -e " ${BOLD}Quick reference:${RESET}"
|
|
240
|
-
echo -e " /ls Where am I? What's next? (start every session here)"
|
|
241
|
-
echo -e " /next Auto-pilot — runs the right workflow automatically"
|
|
242
|
-
echo -e " /new-project Initialize a new project"
|
|
243
|
-
echo -e " /discuss-phase [N] Capture implementation decisions"
|
|
244
|
-
echo -e " /plan-phase [N] Create executable plans"
|
|
245
|
-
echo -e " /execute-phase [N] Run all plans in a phase"
|
|
246
|
-
echo -e " /verify-work [N] Manual acceptance testing"
|
|
247
|
-
echo -e " /quick [description] Ad-hoc task with full guarantees"
|
|
248
|
-
echo ""
|
|
249
|
-
echo -e " ${BOLD}Learning mode:${RESET} Set ${BOLD}learning_mode${RESET} in .planning/config.json"
|
|
250
|
-
echo -e " ${BOLD} auto${RESET} (default) Offered at workflow checkpoints"
|
|
251
|
-
echo -e " ${BOLD} manual${RESET} Only when you invoke @agentic-learning"
|
|
252
|
-
echo ""
|
|
253
|
-
echo -e " See ${BOLD}README.md${RESET} or ${BOLD}https://github.com/FavioVazquez/learnship${RESET} for full documentation."
|
|
254
|
-
echo ""
|