learnship 2.3.0 → 2.3.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "learnship",
3
3
  "description": "Agentic engineering done right — 57 structured workflows, 17 specialist agent personas, persistent memory across sessions, integrated learning partner, and impeccable UI design system. Works with Claude Code, Windsurf, Cursor, Gemini CLI, OpenCode, and Codex.",
4
- "version": "2.3.0",
4
+ "version": "2.3.1",
5
5
  "author": {
6
6
  "name": "Favio Vazquez",
7
7
  "email": "favio.vazquezp@gmail.com"
@@ -2,7 +2,7 @@
2
2
  "name": "learnship",
3
3
  "displayName": "learnship",
4
4
  "description": "Agentic engineering done right — 57 structured workflows, 17 specialist agent personas, persistent memory across sessions, integrated learning partner, and impeccable UI design system.",
5
- "version": "2.3.0",
5
+ "version": "2.3.1",
6
6
  "logo": "assets/logo.png",
7
7
  "author": {
8
8
  "name": "Favio Vazquez",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learnship",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Agentic engineering done right — 57 structured workflows, 17 specialist agent personas, persistent memory across sessions, integrated learning partner, and impeccable UI design system.",
5
5
  "author": "Favio Vazquez",
6
6
  "homepage": "https://faviovazquez.github.io/learnship/",
@@ -6,7 +6,7 @@ description: Analyze an existing codebase and produce structured reference docs
6
6
 
7
7
  Analyze an existing codebase through structured focused exploration. Produces 7 structured documents in `.planning/codebase/` that feed into `new-project` when adding features to existing code.
8
8
 
9
- **Use before:** `/new-project` on a brownfield (existing) codebase.
9
+ **Use before:** `/new-project` on a brownfield (existing) codebase, or before `/new-milestone` when the codebase has changed significantly.
10
10
 
11
11
  **Philosophy:** Each agent gets fresh context, explores a specific domain, and writes documents directly. The orchestrator only confirms what was created — it never receives document contents.
12
12
 
@@ -100,6 +100,64 @@ If a MILESTONE-CONTEXT.md was consumed, delete it:
100
100
  git rm .planning/MILESTONE-CONTEXT.md 2>/dev/null || true
101
101
  ```
102
102
 
103
+ ## Step 6a: Codebase Map Check
104
+
105
+ Check if the codebase has changed significantly since the last map:
106
+
107
+ ```bash
108
+ node -e "
109
+ const fs=require('fs');
110
+ const hasCbMap=fs.existsSync('.planning/codebase');
111
+ if(!hasCbMap){console.log('NO_MAP');}
112
+ else{
113
+ const mapFiles=fs.readdirSync('.planning/codebase').filter(f=>f.endsWith('.md'));
114
+ const mapAge=mapFiles.length>0?Math.max(...mapFiles.map(f=>fs.statSync('.planning/codebase/'+f).mtimeMs)):0;
115
+ const daysSinceMap=Math.floor((Date.now()-mapAge)/(1000*60*60*24));
116
+ console.log('HAS_MAP');console.log('map_files: '+mapFiles.length);console.log('days_since_update: '+daysSinceMap);
117
+ }
118
+ "
119
+ ```
120
+
121
+ **If `NO_MAP`:** Offer codebase mapping:
122
+
123
+ ```
124
+ AskUserQuestion([
125
+ {
126
+ header: "Codebase Map",
127
+ question: "No codebase map found. The codebase may have evolved since the last milestone. Want to map it before planning new features?",
128
+ multiSelect: false,
129
+ options: [
130
+ { label: "Map codebase (Recommended)", description: "Run /map-codebase to analyze current architecture, then return here" },
131
+ { label: "Skip", description: "Continue without mapping — I know the current state" }
132
+ ]
133
+ }
134
+ ])
135
+ ```
136
+
137
+ - **Map codebase:** Tell the user: "Run `/map-codebase` first, then come back to `/new-milestone`." Then **STOP. Exit this workflow.**
138
+ - **Skip:** Continue to Step 6b.
139
+
140
+ **If `HAS_MAP` and `days_since_update` > 30:** Offer to refresh:
141
+
142
+ ```
143
+ AskUserQuestion([
144
+ {
145
+ header: "Stale Codebase Map",
146
+ question: "Your codebase map is [N] days old. Want to refresh it before planning new features?",
147
+ multiSelect: false,
148
+ options: [
149
+ { label: "Refresh map", description: "Run /map-codebase to update, then return here" },
150
+ { label: "Use existing map", description: "Current map is close enough" }
151
+ ]
152
+ }
153
+ ])
154
+ ```
155
+
156
+ - **Refresh map:** Tell the user: "Run `/map-codebase` first, then come back to `/new-milestone`." Then **STOP. Exit this workflow.**
157
+ - **Use existing map:** Continue to Step 6b.
158
+
159
+ **If `HAS_MAP` and `days_since_update` <= 30:** Continue silently to Step 6b.
160
+
103
161
  ## Step 6b: Config Review
104
162
 
105
163
  Check if the project config has all v2 keys:
@@ -40,13 +40,18 @@ node -e "const fs=require('fs'); console.log(fs.existsSync('.planning/PROJECT.md
40
40
  ```bash
41
41
  node -e "
42
42
  const fs=require('fs'),path=require('path');
43
- function walk(dir,skip){let n=0;try{for(const e of fs.readdirSync(dir,{withFileTypes:true})){const f=path.join(dir,e.name);if(skip.some(s=>f.includes(s)))continue;n+=e.isDirectory()?walk(f,skip):1;}}catch(e){}return n;}
44
- const n=walk('.',['/.git/','node_modules','.planning','__pycache__','.venv']);
45
- console.log(n>2?'HAS_CODE':'BLANK');console.log(n+' files');
43
+ const skip=new Set(['.git','node_modules','.planning','__pycache__','.venv','.windsurf','.claude','.cursor','.codex','.gemini','.opencode','.config']);
44
+ const codeExt=new Set(['.ts','.js','.py','.go','.rs','.swift','.java','.kt','.c','.cpp','.h','.cs','.rb','.php','.dart','.scala','.lua','.r','.R','.zig','.ex','.exs','.clj']);
45
+ const pkgFiles=['package.json','requirements.txt','Cargo.toml','go.mod','Package.swift','build.gradle','pom.xml','Gemfile','composer.json','pubspec.yaml','CMakeLists.txt','Makefile','mix.exs'];
46
+ function hasCode(dir,depth){if(depth>3)return false;try{for(const e of fs.readdirSync(dir,{withFileTypes:true})){if(e.isFile()&&codeExt.has(path.extname(e.name)))return true;if(e.isDirectory()&&!skip.has(e.name)&&hasCode(path.join(dir,e.name),depth+1))return true;}}catch{}return false;}
47
+ const hasPkg=pkgFiles.some(f=>fs.existsSync(f));
48
+ const hasCodeFiles=hasCode('.',0);
49
+ const hasCbMap=fs.existsSync('.planning/codebase');
50
+ if(hasCodeFiles||hasPkg){console.log('HAS_CODE');console.log('has_package: '+(hasPkg?'yes':'no'));console.log('has_codebase_map: '+(hasCbMap?'yes':'no'));console.log('needs_map: '+(!hasCbMap?'yes':'no'));}else{console.log('BLANK');}
46
51
  "
47
52
  ```
48
53
 
49
- **If HAS_CODE:** Note this internally as `EXISTING_CODEBASE = true`. You will scan the codebase briefly in Step 1b before questioning. Do NOT use existing code as an excuse to skip or shorten the questioning ceremony — the ceremony exists precisely because you need the user's intent, not just their code.
54
+ **If HAS_CODE:** Note this internally as `EXISTING_CODEBASE = true`. Also record `needs_map` (true if `.planning/codebase/` doesn't exist yet). You will offer codebase mapping in Step 1b before questioning. Do NOT use existing code as an excuse to skip or shorten the questioning ceremony — the ceremony exists precisely because you need the user's intent, not just their code.
50
55
 
51
56
  Check if git is initialized:
52
57
 
@@ -69,13 +74,47 @@ Create the planning directory:
69
74
  node -e "require('fs').mkdirSync('.planning/research',{recursive:true})"
70
75
  ```
71
76
 
72
- ## Step 1b: Existing Codebase Scan (only if EXISTING_CODEBASE = true)
77
+ ## Step 1b: Existing Codebase Handling (only if EXISTING_CODEBASE = true)
73
78
 
74
- If `EXISTING_CODEBASE = true`, do a quick structural scan before questioning so your follow-up questions are grounded in reality:
79
+ If `EXISTING_CODEBASE = true`, first check whether a codebase map is needed.
80
+
81
+ **If `needs_map` is true** (existing code detected but no `.planning/codebase/`):
82
+
83
+ ```
84
+ AskUserQuestion([
85
+ {
86
+ header: "Existing Codebase Detected",
87
+ question: "I detected existing code in this directory. Would you like to map the codebase first? This produces structured reference docs that make the questioning phase sharper.",
88
+ multiSelect: false,
89
+ options: [
90
+ { label: "Map codebase first (Recommended)", description: "Run /map-codebase to analyze architecture, stack, conventions, and concerns — then return here" },
91
+ { label: "Quick scan only", description: "Do a fast structural scan and continue without full mapping" },
92
+ { label: "Skip — I know this codebase", description: "Proceed directly to configuration questions" }
93
+ ]
94
+ }
95
+ ])
96
+ ```
97
+
98
+ > 🛑 STOP. Wait for the user's reply before continuing.
99
+
100
+ - **Map codebase first:** Tell the user: "Run `/map-codebase` first, then come back to `/new-project` — the codebase map will be available for the questioning phase." Then **STOP. Exit this workflow.** The user will return to `/new-project` after mapping completes.
101
+ - **Quick scan only:** Continue with the quick scan below.
102
+ - **Skip:** Continue directly to Step 2 (configuration).
103
+
104
+ **If `needs_map` is false** (codebase map already exists): Read the existing map for context and continue with the quick scan below.
105
+
106
+ **Quick structural scan** (for "Quick scan only" or when map already exists):
75
107
 
76
108
  ```bash
77
- find . -maxdepth 3 -not -path './.git/*' -not -path './node_modules/*' -not -path './.planning/*' -not -path './__pycache__/*' -not -path './.venv/*' | sort | head -40
78
- # PowerShell: Get-ChildItem -Recurse -Depth 3 | Where-Object { $_.FullName -notmatch '\.git|node_modules|\.planning|__pycache__|\.venv' } | Select-Object -First 40
109
+ find . -maxdepth 3 -not -path './.git/*' -not -path './node_modules/*' -not -path './.planning/*' -not -path './__pycache__/*' -not -path './.venv/*' -not -path './.windsurf/*' -not -path './.claude/*' -not -path './.cursor/*' -not -path './.codex/*' -not -path './.gemini/*' -not -path './.opencode/*' | sort | head -40
110
+ # PowerShell: Get-ChildItem -Recurse -Depth 3 | Where-Object { $_.FullName -notmatch '\.git|node_modules|\.planning|__pycache__|\.venv|\.windsurf|\.claude|\.cursor|\.codex|\.gemini|\.opencode' } | Select-Object -First 40
111
+ ```
112
+
113
+ If `.planning/codebase/` exists, also read the summary docs:
114
+ ```bash
115
+ cat .planning/codebase/ARCHITECTURE.md 2>/dev/null | head -40
116
+ cat .planning/codebase/STACK.md 2>/dev/null | head -40
117
+ cat .planning/codebase/CONCERNS.md 2>/dev/null | head -20
79
118
  ```
80
119
 
81
120
  Note the tech stack, key directories, and any README content internally. Use this ONLY to ask sharper follow-up questions — never to infer the user's intent or skip ceremony steps.
@@ -1039,6 +1078,8 @@ After verify-work passes: `/review` for multi-persona code review, `/ship` to te
1039
1078
 
1040
1079
  💡 For ambitious projects, consider running `/challenge` to stress-test the scope through product and engineering lenses before starting Phase 1.
1041
1080
 
1081
+ 💡 Building on an existing codebase? Run `/ideate` for codebase-grounded idea generation — it scans your code for hotspots and improvement opportunities.
1082
+
1042
1083
  💡 Working near sensitive areas (auth, payments, migrations)? Run `/guard [scope]` to activate safety mode.
1043
1084
 
1044
1085
  > **Platform detected:** `[PLATFORM]` — parallelization is `[true/false]`
@@ -223,7 +223,7 @@ node bin/install.js --all
223
223
 
224
224
  This ensures:
225
225
  - **Windsurf** — skills already live in `.windsurf/skills/` (updated in place above)
226
- - **Claude Code** — `~/.claude/skills/` rebuilt with updated skill content + rewritten `references/` paths
226
+ - **Claude Code** — Claude skills directory rebuilt with updated skill content + rewritten `references/` paths
227
227
  - **OpenCode / Gemini CLI / Codex** — `learnship/skills/` context files updated
228
228
 
229
229
  ---
@@ -256,7 +256,7 @@ impeccable:
256
256
 
257
257
  All platforms updated (installer re-run):
258
258
  Windsurf ✓ skills updated in place
259
- Claude Code ✓ ~/.claude/skills/ rebuilt
259
+ Claude Code ✓ skills directory rebuilt
260
260
  Other platforms ✓ learnship/skills/ context files updated
261
261
 
262
262
  Backup saved at: .windsurf/skills/.upstream-backup-<timestamp>/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learnship",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
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",