@ngxtm/devkit 3.17.0 → 3.19.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.
@@ -1,16 +1,21 @@
1
1
  ---
2
2
  name: learn
3
3
  description: Guided project building — you code, AI mentors. Build your own product step-by-step with best practices and deep understanding.
4
- argument-hint: [topic]
4
+ argument-hint: [topic] [--plan <path>]
5
5
  ---
6
6
 
7
- # Learn Mode v3.1
7
+ # Learn Mode v3.2
8
8
 
9
9
  > Build your product. Design the architecture. Write every line. Understand every decision.
10
10
 
11
11
  ## Activation
12
12
 
13
13
  `/learn "topic"` — e.g., `/learn "JWT auth in Express"`, `/learn "build real-time chat"`
14
+ `/learn --plan <path>` — Learn by following an existing plan (topic auto-extracted from plan title)
15
+ `/learn "topic" --plan <path>` — Learn with custom topic + existing plan
16
+
17
+ e.g., `/learn --plan plans/skill-sync-rewrite/plan.md`
18
+ e.g., `/learn "upstream sync" --plan plans/skill-sync-rewrite/plan.md`
14
19
 
15
20
  ---
16
21
 
@@ -18,7 +23,17 @@ argument-hint: [topic]
18
23
 
19
24
  1. **Resume check**: Look in `learn/` for existing file matching topic. If found, read its YAML frontmatter and offer to resume from last checkpoint via `AskUserQuestion`.
20
25
 
21
- 2. **Language detection**: Scan project for config files to identify primary language.
26
+ 2. **Plan import check**: If arguments contain `--plan <path>`:
27
+ a. Read the plan file at `<path>`. Validate it exists and has content.
28
+ b. **Topic resolution**: If no topic provided in arguments, extract from plan's YAML frontmatter `title` field.
29
+ c. Detect plan structure:
30
+ - **Single-file plan**: no `phase-XX` files referenced → tasks = plan's task list
31
+ - **Multi-phase plan**: has `## Phases` table with phase-XX links → each phase = potential learn module
32
+ d. If multi-phase: ask user via `AskUserQuestion` which phase(s) to learn.
33
+ e. Read selected phase file(s) for detailed tasks.
34
+ f. Store parsed steps for REVIEW phase.
35
+
36
+ 3. **Language detection** (skip if `--plan` already implies language from plan context): Scan project for config files to identify primary language.
22
37
 
23
38
  | Language | Config Files | Verify: Syntax | Verify: Run/Test |
24
39
  |----------|-------------|----------------|------------------|
@@ -70,6 +85,8 @@ step: 0
70
85
  total_steps: 0
71
86
  difficulty: {deep|standard|quick}
72
87
  teaching: {guided|scaffolded|demonstrated}
88
+ plan_source: "{path or none}"
89
+ plan_type: {single|multi-phase|none}
73
90
  started: {ISO timestamp}
74
91
  updated: {ISO timestamp}
75
92
  ---
@@ -93,9 +110,32 @@ Update frontmatter: `phase: LEARN`
93
110
 
94
111
  ---
95
112
 
113
+ ## Phase 3-ALT: REVIEW (only when --plan provided, replaces Phase 3 + 4)
114
+
115
+ > Understand the plan before building. Light touch — not redesign.
116
+
117
+ 1. **Summarize**: Present plan overview to user:
118
+ > "This plan proposes: {overview}. It has {N} steps targeting {files}."
119
+ > Key decisions: {list key decisions from plan}
120
+
121
+ 2. **Socratic check** (skip in Quick difficulty): Ask 1-2 questions via `AskUserQuestion`:
122
+ > "Before we start — why do you think {first step} comes before {later step}?"
123
+ > OR "What problem does {key decision} solve?"
124
+ Build on user's answer. Correct misconceptions if any.
125
+
126
+ 3. **Adapt**: Ask via `AskUserQuestion`:
127
+ > "Want to reorder, skip, or add any steps? Or proceed as-is?"
128
+ Adjust step list based on user feedback.
129
+
130
+ 4. **Write to tutorial file**: Record plan source, overview, and adapted steps.
131
+
132
+ Update frontmatter: `phase: REVIEW`, `total_steps: {N}`
133
+
134
+ ---
135
+
96
136
  ## Phase 3: DESIGN (Socratic architecture thinking)
97
137
 
98
- > User thinks first, AI guides not the other way around.
138
+ > **Skip this phase entirely if `--plan` was provided.** Go to Phase 3-ALT: REVIEW instead.
99
139
 
100
140
  1. **Frame the problem**: AI presents the high-level problem to solve:
101
141
  > "We need to build {topic}. Before I suggest anything — how would YOU approach this? What components or pieces do you think we need?"
@@ -134,6 +174,8 @@ Update frontmatter: `phase: DESIGN`
134
174
 
135
175
  ## Phase 4: PLAN (concrete implementation steps)
136
176
 
177
+ > **Skip this phase entirely if `--plan` was provided.** Steps come from REVIEW phase instead.
178
+
137
179
  1. **Break down the chosen design** into 3-7 concrete, verifiable steps. Each step should:
138
180
  - Have a clear goal (what's done when this step is complete)
139
181
  - Build on previous steps (incremental, testable progress)
@@ -155,6 +197,10 @@ Update frontmatter: `phase: PLAN`, `total_steps: {N}`
155
197
 
156
198
  ## Phase 5: BUILD (core phase)
157
199
 
200
+ > If `--plan` was provided, steps come from REVIEW phase (imported plan).
201
+ > If no `--plan`, steps come from Phase 4 (PLAN) as usual.
202
+ > Everything else in BUILD works identically for both paths.
203
+
158
204
  1. **For each step from the PLAN phase, follow the teaching mode**:
159
205
 
160
206
  ### Guided Mode (user codes everything)
@@ -267,6 +313,7 @@ Display: `Tutorial saved: learn/{filename}.md`
267
313
 
268
314
  ## Version History
269
315
 
316
+ - **3.2.0** - Added --plan flag: import existing plan files, REVIEW phase replaces DESIGN+PLAN for plan-driven learning. Flow with plan: INIT → LEARN → REVIEW → BUILD → WRAP-UP
270
317
  - **3.1.0** - Added DESIGN phase (Socratic architecture) and PLAN phase (concrete steps). Full flow: INIT → LEARN → DESIGN → PLAN → BUILD → WRAP-UP
271
318
  - **3.0.0** - Teaching modes (guided/scaffolded/demonstrated), best-practice review, explain-back checkpoints, user-codes-first philosophy
272
319
  - **2.0.0** - Rewrite: adaptive difficulty via codingLevel, 4 phases, WebSearch, Socratic method, resume support, tiered verify, 17 languages, codebase-aware
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngxtm/devkit",
3
- "version": "3.17.0",
3
+ "version": "3.19.0",
4
4
  "description": "Per-project AI skills with smart tech detection - lightweight and context-optimized",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
package/rules-index.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generatedAt": "2026-02-27T06:58:28.250Z",
3
+ "generatedAt": "2026-02-27T13:12:47.270Z",
4
4
  "templates": {
5
5
  "dart": {
6
6
  "path": "templates/dart/rules",
@@ -238,6 +238,7 @@ function buildCompactIndex() {
238
238
  const cleanSkills = (recipe.skills || []).filter(s => !quarantined.has(s));
239
239
  if (cleanSkills.length < 2) continue;
240
240
  index._recipes[name] = {
241
+ d: recipe.description || '',
241
242
  triggers: recipe.triggers || [],
242
243
  skills: cleanSkills,
243
244
  workflow: recipe.workflow || []
@@ -122,6 +122,12 @@ function buildSkillGraph() {
122
122
  if (recipe.skills) {
123
123
  recipe.skills = recipe.skills.filter(s => currentSkills.has(s));
124
124
  }
125
+ if (recipe.workflow) {
126
+ recipe.workflow = recipe.workflow.filter(w => {
127
+ const skillRef = w.split(' ')[0];
128
+ return recipe.skills && recipe.skills.includes(skillRef);
129
+ });
130
+ }
125
131
  if (!recipe.skills || recipe.skills.length < 2) {
126
132
  delete graph._recipes[name];
127
133
  recipesRemoved++;
@@ -168,7 +174,7 @@ function buildSkillGraph() {
168
174
  };
169
175
  graph._meta.lastUpdated = new Date().toISOString().split('T')[0];
170
176
 
171
- // 6. Recompute _tiers
177
+ // 6. Recompute _tiers (excluding quarantined skills)
172
178
  graph._tiers = {
173
179
  't1-orchestrator': [],
174
180
  't2-hub': [],
@@ -178,6 +184,7 @@ function buildSkillGraph() {
178
184
  };
179
185
 
180
186
  for (const [name, data] of Object.entries(graph.graph)) {
187
+ if (data._security === 'quarantined') continue;
181
188
  const hasConnections = (data.connections?.enhances?.length || 0) +
182
189
  (data.connections?.['pairs-with']?.length || 0) > 0;
183
190
  const tierKey = {
@@ -1,16 +1,21 @@
1
1
  ---
2
2
  name: learn
3
3
  description: Guided project building — you code, AI mentors. Build your own product step-by-step with best practices and deep understanding.
4
- argument-hint: [topic]
4
+ argument-hint: [topic] [--plan <path>]
5
5
  ---
6
6
 
7
- # Learn Mode v3.1
7
+ # Learn Mode v3.2
8
8
 
9
9
  > Build your product. Design the architecture. Write every line. Understand every decision.
10
10
 
11
11
  ## Activation
12
12
 
13
13
  `/learn "topic"` — e.g., `/learn "JWT auth in Express"`, `/learn "build real-time chat"`
14
+ `/learn --plan <path>` — Learn by following an existing plan (topic auto-extracted from plan title)
15
+ `/learn "topic" --plan <path>` — Learn with custom topic + existing plan
16
+
17
+ e.g., `/learn --plan plans/skill-sync-rewrite/plan.md`
18
+ e.g., `/learn "upstream sync" --plan plans/skill-sync-rewrite/plan.md`
14
19
 
15
20
  ---
16
21
 
@@ -18,7 +23,17 @@ argument-hint: [topic]
18
23
 
19
24
  1. **Resume check**: Look in `learn/` for existing file matching topic. If found, read its YAML frontmatter and offer to resume from last checkpoint via `AskUserQuestion`.
20
25
 
21
- 2. **Language detection**: Scan project for config files to identify primary language.
26
+ 2. **Plan import check**: If arguments contain `--plan <path>`:
27
+ a. Read the plan file at `<path>`. Validate it exists and has content.
28
+ b. **Topic resolution**: If no topic provided in arguments, extract from plan's YAML frontmatter `title` field.
29
+ c. Detect plan structure:
30
+ - **Single-file plan**: no `phase-XX` files referenced → tasks = plan's task list
31
+ - **Multi-phase plan**: has `## Phases` table with phase-XX links → each phase = potential learn module
32
+ d. If multi-phase: ask user via `AskUserQuestion` which phase(s) to learn.
33
+ e. Read selected phase file(s) for detailed tasks.
34
+ f. Store parsed steps for REVIEW phase.
35
+
36
+ 3. **Language detection** (skip if `--plan` already implies language from plan context): Scan project for config files to identify primary language.
22
37
 
23
38
  | Language | Config Files | Verify: Syntax | Verify: Run/Test |
24
39
  |----------|-------------|----------------|------------------|
@@ -70,6 +85,8 @@ step: 0
70
85
  total_steps: 0
71
86
  difficulty: {deep|standard|quick}
72
87
  teaching: {guided|scaffolded|demonstrated}
88
+ plan_source: "{path or none}"
89
+ plan_type: {single|multi-phase|none}
73
90
  started: {ISO timestamp}
74
91
  updated: {ISO timestamp}
75
92
  ---
@@ -93,9 +110,32 @@ Update frontmatter: `phase: LEARN`
93
110
 
94
111
  ---
95
112
 
113
+ ## Phase 3-ALT: REVIEW (only when --plan provided, replaces Phase 3 + 4)
114
+
115
+ > Understand the plan before building. Light touch — not redesign.
116
+
117
+ 1. **Summarize**: Present plan overview to user:
118
+ > "This plan proposes: {overview}. It has {N} steps targeting {files}."
119
+ > Key decisions: {list key decisions from plan}
120
+
121
+ 2. **Socratic check** (skip in Quick difficulty): Ask 1-2 questions via `AskUserQuestion`:
122
+ > "Before we start — why do you think {first step} comes before {later step}?"
123
+ > OR "What problem does {key decision} solve?"
124
+ Build on user's answer. Correct misconceptions if any.
125
+
126
+ 3. **Adapt**: Ask via `AskUserQuestion`:
127
+ > "Want to reorder, skip, or add any steps? Or proceed as-is?"
128
+ Adjust step list based on user feedback.
129
+
130
+ 4. **Write to tutorial file**: Record plan source, overview, and adapted steps.
131
+
132
+ Update frontmatter: `phase: REVIEW`, `total_steps: {N}`
133
+
134
+ ---
135
+
96
136
  ## Phase 3: DESIGN (Socratic architecture thinking)
97
137
 
98
- > User thinks first, AI guides not the other way around.
138
+ > **Skip this phase entirely if `--plan` was provided.** Go to Phase 3-ALT: REVIEW instead.
99
139
 
100
140
  1. **Frame the problem**: AI presents the high-level problem to solve:
101
141
  > "We need to build {topic}. Before I suggest anything — how would YOU approach this? What components or pieces do you think we need?"
@@ -134,6 +174,8 @@ Update frontmatter: `phase: DESIGN`
134
174
 
135
175
  ## Phase 4: PLAN (concrete implementation steps)
136
176
 
177
+ > **Skip this phase entirely if `--plan` was provided.** Steps come from REVIEW phase instead.
178
+
137
179
  1. **Break down the chosen design** into 3-7 concrete, verifiable steps. Each step should:
138
180
  - Have a clear goal (what's done when this step is complete)
139
181
  - Build on previous steps (incremental, testable progress)
@@ -155,6 +197,10 @@ Update frontmatter: `phase: PLAN`, `total_steps: {N}`
155
197
 
156
198
  ## Phase 5: BUILD (core phase)
157
199
 
200
+ > If `--plan` was provided, steps come from REVIEW phase (imported plan).
201
+ > If no `--plan`, steps come from Phase 4 (PLAN) as usual.
202
+ > Everything else in BUILD works identically for both paths.
203
+
158
204
  1. **For each step from the PLAN phase, follow the teaching mode**:
159
205
 
160
206
  ### Guided Mode (user codes everything)
@@ -267,6 +313,7 @@ Display: `Tutorial saved: learn/{filename}.md`
267
313
 
268
314
  ## Version History
269
315
 
316
+ - **3.2.0** - Added --plan flag: import existing plan files, REVIEW phase replaces DESIGN+PLAN for plan-driven learning. Flow with plan: INIT → LEARN → REVIEW → BUILD → WRAP-UP
270
317
  - **3.1.0** - Added DESIGN phase (Socratic architecture) and PLAN phase (concrete steps). Full flow: INIT → LEARN → DESIGN → PLAN → BUILD → WRAP-UP
271
318
  - **3.0.0** - Teaching modes (guided/scaffolded/demonstrated), best-practice review, explain-back checkpoints, user-codes-first philosophy
272
319
  - **2.0.0** - Rewrite: adaptive difficulty via codingLevel, 4 phases, WebSearch, Socratic method, resume support, tiered verify, 17 languages, codebase-aware