create-pathfinder 1.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.
Files changed (62) hide show
  1. package/AGENTS.md +7 -0
  2. package/CLAUDE.md +71 -0
  3. package/LICENSE +21 -0
  4. package/README.md +60 -0
  5. package/bin/create-pathfinder.mjs +8 -0
  6. package/context/ai-interaction.md +76 -0
  7. package/context/coding-standards.md +72 -0
  8. package/context/current-feature.md +46 -0
  9. package/context/features/example-feature-spec.md +99 -0
  10. package/context/history.md +14 -0
  11. package/context/learning/learner-profile.md +35 -0
  12. package/context/learning/lessons/.gitkeep +0 -0
  13. package/context/learning/progress.md +28 -0
  14. package/context/project-overview.md +198 -0
  15. package/copy-list.json +11 -0
  16. package/package.json +51 -0
  17. package/prompts/01-kickstart-project.md +1 -0
  18. package/prompts/01-teach-current-feature.md +9 -0
  19. package/prompts/02-debate-me.md +1 -0
  20. package/prompts/02-quiz-current-feature.md +7 -0
  21. package/prompts/03-challenge-current-feature.md +7 -0
  22. package/prompts/03-prototype.md +1 -0
  23. package/prompts/04-teach-current-architecture.md +7 -0
  24. package/prompts/04-to-specs.md +1 -0
  25. package/prompts/05-learning-review.md +5 -0
  26. package/prompts/05-load-feature.md +1 -0
  27. package/prompts/06-start-feature.md +1 -0
  28. package/prompts/07-review-feature.md +1 -0
  29. package/prompts/08-complete-feature.md +1 -0
  30. package/prompts/09-learn-feature.md +1 -0
  31. package/prompts/10-learn-codebase.md +1 -0
  32. package/prompts/11-handoff.md +1 -0
  33. package/prompts/12-skillsmith.md +1 -0
  34. package/prompts/13-reverse-engineer.md +18 -0
  35. package/prompts/14-reflect.md +13 -0
  36. package/skills/challenge-me/SKILL.md +81 -0
  37. package/skills/complete-feature/SKILL.md +17 -0
  38. package/skills/debate-me/SKILL.md +82 -0
  39. package/skills/handoff/SKILL.md +12 -0
  40. package/skills/kickstart-pathfinder/SKILL.md +49 -0
  41. package/skills/learn-codebase/SKILL.md +33 -0
  42. package/skills/learn-feature/SKILL.md +48 -0
  43. package/skills/learning-review/SKILL.md +76 -0
  44. package/skills/load-feature/SKILL.md +17 -0
  45. package/skills/prototype/SKILL.md +46 -0
  46. package/skills/quiz-me/SKILL.md +78 -0
  47. package/skills/reflect/SKILL.md +481 -0
  48. package/skills/reverse-engineer/SKILL.md +252 -0
  49. package/skills/review-feature/SKILL.md +25 -0
  50. package/skills/skillsmith/SKILL.md +14 -0
  51. package/skills/start-feature/SKILL.md +25 -0
  52. package/skills/teach-architecture/SKILL.md +79 -0
  53. package/skills/teach-feature/SKILL.md +110 -0
  54. package/skills/to-specs/SKILL.md +45 -0
  55. package/src/cli.mjs +156 -0
  56. package/src/install.mjs +99 -0
  57. package/src/kit.mjs +94 -0
  58. package/templates/CHANGELOG.template.md +11 -0
  59. package/templates/feature-spec.template.md +99 -0
  60. package/templates/lesson.template.md +71 -0
  61. package/templates/progress-entry.template.md +23 -0
  62. package/templates/project-overview.template.md +198 -0
@@ -0,0 +1,481 @@
1
+ ---
2
+ name: reflect
3
+ description: Review meaningful completed work to extract project-specific lessons, identify reusable Pathfinder workflow improvements, and evaluate the quality of the reflection process itself.
4
+ ---
5
+
6
+ # Reflect
7
+
8
+ Review completed work and identify evidence that the development workflow itself should improve.
9
+
10
+ ## Purpose
11
+
12
+ Projects produce lessons.
13
+
14
+ Most lessons belong to the project.
15
+
16
+ Some reveal reusable weaknesses in the workflow.
17
+
18
+ Reflect identifies the difference and proposes improvements without changing Pathfinder automatically.
19
+
20
+ Reflect also evaluates its own effectiveness. When the reflection process itself proves inadequate, it may propose improvements to this skill.
21
+
22
+ > Projects produce lessons. Pathfinder keeps the reusable ones.
23
+
24
+ ## When to use
25
+
26
+ Use Reflect after meaningful work such as:
27
+
28
+ * completing a significant feature
29
+ * resolving a difficult bug
30
+ * finishing a migration or refactor
31
+ * completing a project phase
32
+ * receiving significant human correction
33
+ * discovering repeated workflow friction
34
+ * encountering a surprising failure or assumption
35
+ * discovering that Pathfinder guidance was incomplete or ineffective
36
+
37
+ Do not invoke Reflect after every trivial change.
38
+
39
+ Reflection should produce signal, not ceremony.
40
+
41
+ ## Goal
42
+
43
+ Answer two questions:
44
+
45
+ > What did this execution teach us that could make a future execution better?
46
+
47
+ And:
48
+
49
+ > Did the reflection process itself work well enough to discover that?
50
+
51
+ ---
52
+
53
+ # Part 1 — Reflect on the work
54
+
55
+ ## 1. Reconstruct what happened
56
+
57
+ Review the relevant work and available evidence.
58
+
59
+ Inspect where relevant:
60
+
61
+ * plans
62
+ * implementation
63
+ * tests
64
+ * verification results
65
+ * debugging history
66
+ * user corrections
67
+ * rejected or abandoned approaches
68
+ * resulting documentation
69
+ * relevant commits or diffs
70
+ * existing Pathfinder guidance
71
+
72
+ Do not rely on vague recollection when repository evidence is available.
73
+
74
+ Distinguish what actually happened from what was intended to happen.
75
+
76
+ ## 2. Identify learning signals
77
+
78
+ Look specifically for:
79
+
80
+ * incorrect assumptions
81
+ * repeated mistakes
82
+ * unnecessary work
83
+ * missing verification
84
+ * weak verification
85
+ * steps performed too early or too late
86
+ * information that should have been discovered sooner
87
+ * human corrections
88
+ * repeated manual intervention
89
+ * useful techniques discovered during the work
90
+ * limitations in an existing Pathfinder skill
91
+ * gaps between Pathfinder's intended workflow and what actually happened
92
+ * cases where an existing rule prevented a problem
93
+ * cases where following existing guidance still produced a poor result
94
+
95
+ Success alone is not evidence that the workflow was good.
96
+
97
+ Failure alone is not evidence that the workflow must change.
98
+
99
+ ## 3. Separate local knowledge from reusable learning
100
+
101
+ Classify each finding as one of:
102
+
103
+ ### PROJECT
104
+
105
+ Specific to this repository, stack, business domain, architecture, environment, or team.
106
+
107
+ Keep it with the project.
108
+
109
+ Examples:
110
+
111
+ * a particular API requires a custom header
112
+ * this repository uses Vitest rather than Jest
113
+ * this service must start before another service
114
+ * a framework-specific workaround is required
115
+
116
+ ### WORKFLOW CANDIDATE
117
+
118
+ Potentially useful across unrelated projects.
119
+
120
+ Examples:
121
+
122
+ * implementation began before existing behavior was established
123
+ * verification covered the happy path but ignored known edge cases
124
+ * debugging continued before the failure was reliably reproduced
125
+ * an undocumented dependency should have been discovered during system analysis
126
+ * the agent repeatedly needed human correction for something the workflow could have surfaced earlier
127
+
128
+ ### NOISE
129
+
130
+ Interesting but not useful enough to preserve.
131
+
132
+ Discard it.
133
+
134
+ Not every observation deserves memory.
135
+
136
+ ## 4. Test generality
137
+
138
+ For every WORKFLOW CANDIDATE ask:
139
+
140
+ * Would this still make sense with another programming language?
141
+ * Would it still make sense with another framework?
142
+ * Would it still make sense in another business domain?
143
+ * Is it solving a recurring class of problem rather than this exact incident?
144
+ * Is Pathfinder responsible for this part of the process?
145
+ * Would following this guidance generally improve future work?
146
+ * Could the proposed rule unnecessarily constrain unrelated projects?
147
+
148
+ If the lesson fails these tests, keep it project-specific.
149
+
150
+ Generalize behavior, not technology.
151
+
152
+ ## 5. Check for existing coverage
153
+
154
+ Before proposing anything new, inspect the existing Pathfinder workflow and skills.
155
+
156
+ Determine whether the lesson is already covered.
157
+
158
+ Prefer improving an existing mechanism over adding another one.
159
+
160
+ Use this order:
161
+
162
+ 1. already covered — no change
163
+ 2. clarify existing documentation
164
+ 3. improve an existing skill
165
+ 4. add or strengthen a workflow invariant
166
+ 5. create a new skill only when it represents a distinct reusable operation
167
+
168
+ Avoid duplicate skills.
169
+
170
+ Do not respond to every failure by adding another instruction.
171
+
172
+ ## 6. Require evidence
173
+
174
+ Every proposed Pathfinder improvement must include:
175
+
176
+ ### Observation
177
+
178
+ What happened?
179
+
180
+ ### Evidence
181
+
182
+ What concrete part of the execution demonstrates it?
183
+
184
+ ### Generalization
185
+
186
+ Why could this recur outside this project?
187
+
188
+ ### Current gap
189
+
190
+ Why does Pathfinder not already handle it?
191
+
192
+ ### Proposed change
193
+
194
+ What is the smallest change that would address it?
195
+
196
+ ### Risk
197
+
198
+ How could this rule become harmful, redundant, overly restrictive, or too specific?
199
+
200
+ ### Validation
201
+
202
+ How could future work demonstrate that the improvement actually helped?
203
+
204
+ Do not promote intuition into workflow policy without evidence.
205
+
206
+ ## 7. Prefer the smallest durable improvement
207
+
208
+ Possible outcomes include:
209
+
210
+ * no change
211
+ * project documentation update
212
+ * AGENTS.md clarification
213
+ * existing skill improvement
214
+ * workflow invariant
215
+ * new skill candidate
216
+
217
+ The best reflection may conclude that Pathfinder should not change.
218
+
219
+ Every improvement adds maintenance and context cost.
220
+
221
+ An improvement should remove more uncertainty than complexity it introduces.
222
+
223
+ ---
224
+
225
+ # Part 2 — Reflect on Reflect
226
+
227
+ Reflect is subject to the same evidence standard it applies to Pathfinder.
228
+
229
+ After completing the primary reflection, evaluate the quality of the reflection process itself.
230
+
231
+ This is bounded recursive self-improvement.
232
+
233
+ Its purpose is not to endlessly rewrite Reflect.
234
+
235
+ Its purpose is to discover whether Reflect systematically failed to do its own job.
236
+
237
+ ## 8. Evaluate reflection quality
238
+
239
+ Ask:
240
+
241
+ * Did Reflect miss an important signal that was visible in the evidence?
242
+ * Did Reflect overgeneralize a project-specific issue?
243
+ * Did Reflect classify reusable knowledge as project-specific?
244
+ * Did Reflect propose something Pathfinder already covers?
245
+ * Did Reflect recommend unnecessary new rules or skills?
246
+ * Was the evidence requirement too weak?
247
+ * Were recommendations actionable?
248
+ * Was the reflection disproportionately verbose for the value produced?
249
+ * Did Reflect confuse an outcome with evidence?
250
+ * Did Reflect identify symptoms rather than the underlying workflow problem?
251
+ * Did a human reject or substantially correct the reflection?
252
+ * Has the same weakness appeared in previous uses of Reflect?
253
+
254
+ Do not search for a self-improvement merely because this section exists.
255
+
256
+ "No improvement needed" is a valid and desirable result.
257
+
258
+ ## 9. Identify Reflect improvement candidates
259
+
260
+ If the reflection process itself demonstrated a meaningful weakness, classify it as:
261
+
262
+ ### REFLECT IMPROVEMENT CANDIDATE
263
+
264
+ This classification is reserved for improvements to `reflect/SKILL.md` itself.
265
+
266
+ Do not use it for general Pathfinder improvements.
267
+
268
+ For each candidate provide:
269
+
270
+ ### Observed weakness
271
+
272
+ What was inadequate about Reflect's behavior or reasoning?
273
+
274
+ ### Evidence
275
+
276
+ What concrete output, omission, human correction, or repeated failure demonstrates the weakness?
277
+
278
+ ### Root cause
279
+
280
+ What part of the current Reflect process allowed the weakness?
281
+
282
+ ### Proposed change
283
+
284
+ What is the smallest change to `reflect/SKILL.md` that could improve future reflections?
285
+
286
+ ### Regression risk
287
+
288
+ Could the change make Reflect:
289
+
290
+ * more verbose
291
+ * more rigid
292
+ * more repetitive
293
+ * biased toward finding problems
294
+ * prone to overgeneralization
295
+ * excessively conservative
296
+ * more expensive in context or execution time
297
+
298
+ ### Validation
299
+
300
+ What future behavior would demonstrate that the modification actually improved Reflect?
301
+
302
+ Do not recursively optimize stylistic preferences, wording preferences, or isolated cosmetic issues.
303
+
304
+ Self-improvements must materially improve reflection quality.
305
+
306
+ ## 10. Evidence levels for self-improvement
307
+
308
+ Treat evidence for changes to Reflect according to three levels:
309
+
310
+ ### Level 1 — Incident
311
+
312
+ One reflection exposed a plausible weakness.
313
+
314
+ This may justify an improvement candidate.
315
+
316
+ It does not establish a general pattern.
317
+
318
+ ### Level 2 — Pattern
319
+
320
+ The same weakness has appeared across multiple reflections or required repeated human correction.
321
+
322
+ This provides stronger justification for changing Reflect.
323
+
324
+ ### Level 3 — Validation
325
+
326
+ A proposed change addresses the weakness and subsequent reflections demonstrate better behavior without obvious regression.
327
+
328
+ This is the strongest evidence that the improvement should remain.
329
+
330
+ When history is available, prefer patterns over isolated incidents.
331
+
332
+ Do not fabricate historical evidence.
333
+
334
+ ## 11. Bound the recursion
335
+
336
+ Reflect may perform only one self-evaluation pass per invocation.
337
+
338
+ The recursion is:
339
+
340
+ Work
341
+ → Reflect on work
342
+ → Reflect on Reflect
343
+ → Stop
344
+
345
+ Do not perform:
346
+
347
+ Reflect
348
+ → Reflect on Reflect
349
+ → Reflect on the reflection of Reflect
350
+ → continue recursively
351
+
352
+ Further improvement must happen through a future invocation with new evidence.
353
+
354
+ Recursive improvement should accumulate evidence across executions, not consume the current execution with unlimited meta-analysis.
355
+
356
+ ---
357
+
358
+ # Promotion rules
359
+
360
+ ## Pathfinder improvements
361
+
362
+ Reflect proposes.
363
+
364
+ Humans promote.
365
+
366
+ Do not silently modify Pathfinder's workflow, AGENTS.md, skills, templates, principles, or other durable guidance unless explicitly asked to implement an accepted recommendation.
367
+
368
+ ## Reflect self-improvements
369
+
370
+ The same rule applies to Reflect itself.
371
+
372
+ Reflect may propose changes to `reflect/SKILL.md`.
373
+
374
+ It must not automatically rewrite its own skill definition unless the human explicitly approves implementation.
375
+
376
+ Self-reference does not lower the evidence threshold.
377
+
378
+ It raises it.
379
+
380
+ ---
381
+
382
+ # Output
383
+
384
+ Return only sections that contain meaningful information.
385
+
386
+ Do not inflate the output to satisfy the template.
387
+
388
+ ## What happened
389
+
390
+ A concise reconstruction of the relevant execution.
391
+
392
+ ## What we learned
393
+
394
+ The important findings and supporting evidence.
395
+
396
+ ## Classification
397
+
398
+ For each meaningful finding:
399
+
400
+ * PROJECT
401
+ * WORKFLOW CANDIDATE
402
+ * NOISE
403
+
404
+ Omit trivial noise when it adds no value.
405
+
406
+ ## Pathfinder gaps
407
+
408
+ Only genuine gaps not already covered.
409
+
410
+ If none exist, say so.
411
+
412
+ ## Recommended changes
413
+
414
+ Rank recommendations from highest to lowest value.
415
+
416
+ For each recommendation provide:
417
+
418
+ * target
419
+ * proposed change
420
+ * evidence
421
+ * expected benefit
422
+ * risk of overgeneralization
423
+ * validation approach
424
+ * confidence
425
+
426
+ ## No-change findings
427
+
428
+ Mention important observations that should not modify Pathfinder and explain why.
429
+
430
+ ## Reflect self-evaluation
431
+
432
+ Briefly assess whether this reflection process itself performed adequately.
433
+
434
+ If no material weakness was discovered, state:
435
+
436
+ `No Reflect improvement proposed.`
437
+
438
+ Do not invent one.
439
+
440
+ ## Reflect improvement candidates
441
+
442
+ Include this section only when evidence supports changing `reflect/SKILL.md`.
443
+
444
+ For each candidate provide:
445
+
446
+ * observed weakness
447
+ * evidence
448
+ * evidence level
449
+ * root cause
450
+ * proposed change
451
+ * regression risk
452
+ * validation
453
+ * confidence
454
+
455
+ ---
456
+
457
+ # Principles
458
+
459
+ > Execution is evidence.
460
+
461
+ > Projects produce lessons. Pathfinder keeps the reusable ones.
462
+
463
+ > Prefer improving an existing rule over adding a new one.
464
+
465
+ > Generalize behavior, not technology.
466
+
467
+ > Reflect proposes. Humans promote.
468
+
469
+ > Reflect is subject to the same evidence standard it applies to Pathfinder.
470
+
471
+ > Self-reference does not lower the evidence threshold.
472
+
473
+ > An improvement is not successful because it sounds better. It is successful because it performs better.
474
+
475
+ > Every improvement should remove more uncertainty than complexity it introduces.
476
+
477
+ > A workflow that cannot learn will repeat its mistakes.
478
+
479
+ > A workflow that learns everything will become unusable.
480
+
481
+ > Recursion should accumulate evidence, not meta-analysis.