create-pathfinder 2.1.0 → 3.1.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.md CHANGED
@@ -70,6 +70,8 @@ Ask before actions identified in `context/ai-interaction.md`, especially depende
70
70
 
71
71
  Canonical Pathfinder skills are tool-neutral and live under `skills/`. Harness-specific representations — `.claude/skills/`, `.agents/skills/` — are generated integration artifacts and must not become independent behavior contracts. Edit the canonical file; regenerate the adapter.
72
72
 
73
+ The Claude Code plugin declared by `.claude-plugin/plugin.json` is a third discovery surface, and the only one that generates nothing: it exposes the canonical `skills/` tree itself, namespaced `/pathfinder:<skill>`. There is no plugin copy of any skill and there must never be one. If a discovery surface and its canonical skill disagree, the canonical skill is correct.
74
+
73
75
  An adapter carries the canonical skill's frontmatter and a pointer to it, and nothing else. If an adapter and its canonical skill disagree, the canonical skill is correct.
74
76
 
75
77
  ## Available skills
@@ -79,11 +81,8 @@ An adapter carries the canonical skill's frontmatter and a pointer to it, and no
79
81
  - `reverse-engineer` — analyze an external reference and produce an evidence-based reconstruction blueprint
80
82
  - `prototype` — create and iterate the cheapest useful validation artifact
81
83
  - `to-specs` — generate context-sized feature specs
82
- - `load-feature` — prepare one feature for implementation
83
- - `start-feature` — implement scoped delivery chunks
84
+ - `feature` — run one action of the Feature delivery loop: `load`, `start`, `review`, `complete`
84
85
  - `debug-issue` — diagnose an observed failure to its root cause, apply the smallest justified fix, and verify it
85
- - `review-feature` — review against requirements, regressions, and standards
86
- - `complete-feature` — verify and close a feature cleanly
87
86
  - `learn-feature` — create an interactive lesson for a completed feature
88
87
  - `learn-codebase` — create a modular learning portal for the repository
89
88
  - `teach-feature` — teach the verified current feature from its spec, diff, tests, and implementation
package/README.md CHANGED
@@ -261,6 +261,23 @@ Pathfinder also never writes to personal/global skill directories such as:
261
261
  ~/.agents/skills/
262
262
  ```
263
263
 
264
+ ### The Claude Code plugin is a separate path
265
+
266
+ Pathfinder is also distributed as a Claude Code plugin, installed with
267
+ `/plugin marketplace add rikilamadrid/pathfinder` followed by
268
+ `/plugin install pathfinder@lamadrid-labs`. It does not replace this installer
269
+ and does not change anything it does.
270
+
271
+ The two install different things. The plugin installs commands, always
272
+ namespaced `/pathfinder:<skill>`, into your Claude Code installation and writes
273
+ nothing into your repository — no kit, no adapters. This installer copies the
274
+ kit your repository keeps under version control, and generates the adapters that
275
+ expose the bare `/<skill>` names.
276
+
277
+ A repository can have both, and then carries both command forms running the same
278
+ canonical skill body. If you arrived through the plugin with no kit yet,
279
+ `/pathfinder:kickstart-pathfinder` offers to install one for you.
280
+
264
281
  ### Interactive selection
265
282
 
266
283
  In an interactive terminal, the installer asks which supported tools to
@@ -38,10 +38,10 @@ Inspect current Git state before acting. If the workflow is unclear or
38
38
 
39
39
  Use the workflow skills instead of recreating their procedures in chat:
40
40
 
41
- 1. `load-feature` — load the active work and relevant context.
42
- 2. `start-feature` — implement the current delivery chunk.
43
- 3. `review-feature` — verify the work and report findings.
44
- 4. `complete-feature` — complete accepted work and durable records.
41
+ 1. `/feature load` — load the active work and relevant context.
42
+ 2. `/feature start` — implement the current delivery chunk.
43
+ 3. `/feature review` — verify the work and report findings.
44
+ 4. `/feature complete` — complete accepted work and durable records.
45
45
  5. `learn-feature` — optionally teach what was implemented.
46
46
 
47
47
  Roles are optional. The workflow must work without activating one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pathfinder",
3
- "version": "2.1.0",
3
+ "version": "3.1.0",
4
4
  "description": "Install the Pathfinder AI-assisted, human-in-the-loop workflow kit into a Git repository.",
5
5
  "keywords": [
6
6
  "pathfinder",
@@ -17,8 +17,7 @@ Do not load unrelated history, roadmap, Features, or repository areas by default
17
17
 
18
18
  ## Use
19
19
 
20
- - `load-feature` to load the work.
21
- - `start-feature` to implement it.
20
+ - `feature` — its load action to load the work, its start action to implement it.
22
21
  - Use the project's existing build, test, and verification commands as needed.
23
22
 
24
23
  ## Rules
package/roles/tester.md CHANGED
@@ -20,7 +20,7 @@ Do not rely on the developer's summary as proof.
20
20
 
21
21
  ## Use
22
22
 
23
- - `review-feature` to verify implemented work.
23
+ - `feature` — its review action, to verify implemented work.
24
24
  - Use the project's existing test commands and relevant testing tools.
25
25
 
26
26
  ## Rules
@@ -29,9 +29,9 @@ Use Debug Issue when there is a concrete unexpected behavior such as:
29
29
 
30
30
  Do not use it merely because implementation work is difficult.
31
31
 
32
- If the task is planned feature construction, use `start-feature`.
32
+ If the task is planned feature construction, use `/feature start`.
33
33
 
34
- If the goal is reviewing completed implementation for possible defects, use `review-feature`.
34
+ If the goal is reviewing completed implementation for possible defects, use `/feature review`.
35
35
 
36
36
  If the real question is broad understanding of the repository, use `learn-codebase`.
37
37
 
@@ -202,8 +202,8 @@ It does not:
202
202
 
203
203
  * implement unrelated feature scope
204
204
  * perform a general repository review
205
- * replace `review-feature`
206
- * replace `complete-feature`
205
+ * replace `/feature review`
206
+ * replace `/feature complete`
207
207
  * silently change architecture or dependencies
208
208
  * turn debugging into opportunistic refactoring
209
209
  * hide uncertainty behind a successful-looking workaround
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: feature
3
+ description: Run one action of the Feature delivery loop — load, start, review, or complete.
4
+ argument-hint: load|start|review|complete
5
+ ---
6
+
7
+ # Feature
8
+
9
+ The Feature delivery loop, as one skill. The human names the action:
10
+
11
+ `/feature load`
12
+ `/feature start`
13
+ `/feature review`
14
+ `/feature complete`
15
+
16
+ ## Process
17
+
18
+ 1. Take the action from the invocation.
19
+ If none was given, list the four actions below and stop.
20
+ If it is not one of the four, say so, list them, and stop.
21
+ 2. Read only `skills/feature/actions/<action>.md` and follow it exactly.
22
+
23
+ ## Actions
24
+
25
+ - `load` — prepare one Feature for execution. Reads its spec and the minimum
26
+ context around it, checks for blockers, records the approval in the spec, and
27
+ writes the session's workspace state.
28
+ - `start` — implement the active delivery chunk in small, stable increments,
29
+ restating the pre-implementation summary before editing anything.
30
+ - `review` — verify implemented work against its Feature and report findings.
31
+ It changes no implementation and accepts nothing.
32
+ - `complete` — complete work the human has accepted, through the project's
33
+ delivery workflow and its durable records.
34
+
35
+ ## Lifecycle
36
+
37
+ The Feature spec's `## Status` holds the durable lifecycle state named in
38
+ `context/ai-interaction.md`:
39
+
40
+ `Proposed` → `Ready` → `In Progress` → `Complete`
41
+
42
+ `Cancelled` and `Superseded` are terminal alternatives.
43
+
44
+ - `load` writes `Proposed` → `Ready`.
45
+ - `start` writes `Ready` → `In Progress`.
46
+ - `complete` writes `Complete`.
47
+ - `review` writes no status. Review is workflow activity, not lifecycle state.
48
+
49
+ `context/current-feature.md` is transient workspace state and records no status.
50
+
51
+ ## Rules
52
+
53
+ - Run the one action the human named. Do not continue into the next one.
54
+ - Read only that action's file. The other three are not context for this work.
55
+ - Human authority is unchanged: approval, acceptance, merge, and release are
56
+ the human's, whichever action is running.
@@ -0,0 +1,22 @@
1
+ # Feature: Complete
2
+
3
+ Invoking this action is the human's acceptance of the Feature. Do not ask for
4
+ acceptance again.
5
+
6
+ Acceptance of the Feature is not approval of the delivery steps below. Each one
7
+ that the project's documented workflow gates is still asked for.
8
+
9
+ 1. Run the project's required final checks.
10
+ 2. Follow the documented Git, merge, version, release, and deployment workflow.
11
+ Ask for approval where it requires it. If that workflow is undocumented or
12
+ `TBD`, stop and ask rather than choosing one.
13
+ 3. Mark the Feature `Complete` in its spec's `## Status`.
14
+ 4. Add a compact entry to `context/history.md`.
15
+ Create it from `templates/history.template.md` if it does not exist.
16
+ 5. Clear or update `context/current-feature.md`. Do nothing if it does not exist.
17
+ 6. If work tracking is configured, sync the completed state.
18
+ 7. Report the completed outcome and any remaining follow-up.
19
+
20
+ Do not re-review accepted work unless final verification exposes a new problem.
21
+
22
+ Do not claim completion if required checks or delivery steps failed.
@@ -1,9 +1,6 @@
1
- ---
2
- name: load-feature
3
- description: Load one approved Feature and the minimum context needed to work on it.
4
- ---
1
+ # Feature: Load
5
2
 
6
- # Load Feature
3
+ Prepare one Feature for execution.
7
4
 
8
5
  1. Select the Feature the human named. Being invoked on it is the approval to
9
6
  prepare it for execution, so its spec does not already have to say `Ready`.
@@ -15,7 +12,7 @@ description: Load one approved Feature and the minimum context needed to work on
15
12
  5. Stop if a required human decision or explicit dependency blocks the work.
16
13
  6. Record the approval in the Feature spec's `## Status`, which holds the
17
14
  durable lifecycle state:
18
- - `Proposed` becomes `Ready`. That is the only value this skill writes.
15
+ - `Proposed` becomes `Ready`. That is the only value this action writes.
19
16
  - `Ready` or `In Progress` is left exactly as it is. Reloading a Feature
20
17
  mid-work is normal and must not rewrite its state.
21
18
  - `Complete`, `Cancelled`, or `Superseded` blocks the load. Report it and
@@ -38,11 +35,11 @@ description: Load one approved Feature and the minimum context needed to work on
38
35
  its key is that Feature number. Do nothing here if it does not.
39
36
  9. Present a short readiness summary.
40
37
 
41
- Do not implement the Feature.
38
+ Do not implement the Feature. That is `/feature start`.
42
39
 
43
40
  Do not scan unrelated repository areas, load history or roadmap by default, or
44
41
  silently resolve `TBD` decisions.
45
42
 
46
43
  Do not rewrite the Feature's substance — its Goal, Context, Requirements, Out of
47
44
  Scope, Delivery Chunks, or Acceptance Criteria. `## Status` is the one field this
48
- skill maintains.
45
+ action maintains.
@@ -1,9 +1,4 @@
1
- ---
2
- name: review-feature
3
- description: Verify implemented work against its Feature and report findings.
4
- ---
5
-
6
- # Review Feature
1
+ # Feature: Review
7
2
 
8
3
  Review the actual diff and behavior, not only the developer's summary.
9
4
 
@@ -31,3 +26,7 @@ Report:
31
26
  Do not modify the implementation unless the human explicitly asks.
32
27
 
33
28
  Do not invent findings or treat passing tests as automatic acceptance.
29
+
30
+ Do not write the Feature's `## Status`. Review is workflow activity, not
31
+ lifecycle state, and a reviewed Feature stays `In Progress` until it is
32
+ completed.
@@ -0,0 +1,33 @@
1
+ # Feature: Start
2
+
3
+ Implement the active delivery chunk.
4
+
5
+ 1. Read only the context needed for the current work.
6
+ 2. Restate the pre-implementation summary the project's agent guide requires,
7
+ and wait for it to be answered where it names a human decision. Do not edit
8
+ any file before this step is done.
9
+ 3. Record the Feature spec's `## Status` as `In Progress`, before the first file
10
+ edit of the first chunk:
11
+ - `Ready` becomes `In Progress`. That is the only value this action writes.
12
+ - `In Progress` is left exactly as it is. Continuing a Feature across
13
+ sessions and chunks is normal and must not rewrite its state.
14
+ - Any other status stops the session. Report it. A Feature that was never
15
+ loaded is not approved for execution, and terminal work is the human's to
16
+ reopen.
17
+ 4. Follow the Feature and existing project conventions.
18
+ 5. Make the smallest complete change.
19
+ 6. Verify the behavior you changed.
20
+ 7. Keep the repository stable.
21
+ 8. Create or update `context/current-feature.md` with the current state and next
22
+ action. Do not record the lifecycle status there; the spec carries it.
23
+
24
+ ## Rules
25
+
26
+ - Stay inside the approved scope.
27
+ - Stop if implementation requires a human decision or material scope change.
28
+ - Do not silently add dependencies or adopt prototype code.
29
+ - Follow the project's approval and Git rules.
30
+ - Do not decide that your own work is accepted.
31
+
32
+ When the chunk is done, report what changed, what was verified, and anything
33
+ unresolved.
@@ -36,18 +36,57 @@ When the user is unsure, provide a small recommendation with reasoning and alter
36
36
 
37
37
  ## Process
38
38
 
39
- 1. Read the kit context and inspect relevant repository facts.
40
- 2. Ask the minimum unresolved questions in small groups.
41
- 3. Summarize requirements, preferences, constraints, open decisions, and contradictions.
42
- 4. Route uncertain product/technical choices to `debate-me` when useful.
43
- 5. Present the proposed context and request human corrections or approval.
44
- 6. Update `context/project-overview.md`, `context/coding-standards.md`, `context/ai-interaction.md`, `CLAUDE.md`, and `AGENTS.md` only after the choices are sufficiently clear.
39
+ 1. If the project is missing kit files, and this session loaded this skill from
40
+ the Pathfinder plugin, offer to install the kit before going further. See
41
+ `Kit Bootstrap` below. Otherwise start at the next step.
42
+ 2. Read the kit context and inspect relevant repository facts.
43
+ 3. Ask the minimum unresolved questions in small groups.
44
+ 4. Summarize requirements, preferences, constraints, open decisions, and contradictions.
45
+ 5. Route uncertain product/technical choices to `debate-me` when useful.
46
+ 6. Present the proposed context and request human corrections or approval.
47
+ 7. Update `context/project-overview.md`, `context/coding-standards.md`, `context/ai-interaction.md`, `CLAUDE.md`, and `AGENTS.md` only after the choices are sufficiently clear.
45
48
  `context/project-overview.md` does not ship; create it from `templates/project-overview.template.md` at this step.
46
49
  Project facts go there; approval rules and tool actions requiring a human go
47
50
  in `context/ai-interaction.md`. Fill the sections the project has and mark
48
51
  the rest `TBD` or `None`. Do not add sections the template does not carry,
49
52
  and do not leave a field blank.
50
- 7. Recommend `debate-me`, `prototype`, or `to-specs` as the next action.
53
+ 8. Recommend `debate-me`, `prototype`, or `to-specs` as the next action.
54
+
55
+ ## Kit Bootstrap
56
+
57
+ The Pathfinder plugin distributes commands. It does not distribute project
58
+ state. A repository reached through `/plugin install` therefore has every
59
+ Pathfinder command and none of the files those commands read.
60
+
61
+ This step applies only when both are true: the project is missing kit files,
62
+ and this skill was loaded from the plugin, which is what makes
63
+ `${CLAUDE_PLUGIN_ROOT}` — the plugin's install directory — a real path. When
64
+ the kit installed this skill into the repository instead, there is no plugin
65
+ root, the condition is false, and this whole section is skipped without being
66
+ raised or quoted.
67
+
68
+ When it does apply:
69
+
70
+ - Copy from the plugin root into the project root, and copy only the kit. That
71
+ list is not restated here: `packages/create-pathfinder/copy-list.json`, inside
72
+ the plugin root, is the one statement of it. Read that file and copy the
73
+ entries it names.
74
+ - Exclude exactly what the installer excludes, and read that from the installer
75
+ too: `NEVER_SHIPS` in `packages/create-pathfinder/src/kit.mjs`, also inside
76
+ the plugin root, is the one statement of it. Skip every kit-relative path it
77
+ holds. Those files are one repository's own working state and would be wrong
78
+ in any other project. Restating them here would be a second list to keep in
79
+ step, and the first time it drifted this step would hand a project what
80
+ `npx create-pathfinder` refuses to.
81
+ - Name every file before writing it, and wait for approval.
82
+ - Overwrite nothing without asking about that file by name. Delete nothing.
83
+ - Report exactly what was written, what was skipped, and what was left alone.
84
+ - Generate no harness adapters. Plugin commands stay namespaced
85
+ `/<plugin-name>:<skill>`, and that is the intended plugin form.
86
+ `npx create-pathfinder --agents claude-code` is what generates adapters and
87
+ the bare command names, for a human who wants both.
88
+
89
+ When the project already has the kit, change nothing and say so.
51
90
 
52
91
  ## Stop Condition
53
92
 
@@ -173,7 +173,7 @@ Use one of these:
173
173
  * `debate-me` — when major product or technical decisions remain
174
174
  * `prototype` — when the experience or technical assumption needs validation
175
175
  * `to-specs` — when the direction is approved and ready to become feature files
176
- * `load-feature` — when the analysis applies to one already-planned feature
176
+ * `/feature load` — when the analysis applies to one already-planned feature
177
177
  * `learn-codebase` — when the user wants to understand their own repository instead
178
178
  * no handoff — when the user only requested analysis
179
179
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: role
3
3
  description: Activate one named Pathfinder role for the current session.
4
+ argument-hint: planner|developer|tester
4
5
  ---
5
6
 
6
7
  # Role
package/src/cli.mjs CHANGED
@@ -49,6 +49,8 @@ Options:
49
49
  It does not authorize \`git init\` or configure any tool;
50
50
  pass --git-init and --agents for those.
51
51
  -h, --help Show this message.
52
+ -v, --version Print the version and exit, whatever else you passed.
53
+ Nothing else is printed.
52
54
 
53
55
  Adapters are generated files Pathfinder owns and regenerates without --force.
54
56
  A file it did not generate is never replaced, at any path, without --force.
@@ -83,6 +85,22 @@ export async function run(
83
85
  ) {
84
86
  const options = parseArguments(argv);
85
87
 
88
+ // Answered before the error branch, and before every other flag: `--version`
89
+ // is a question about this package, not about this run. It holds outside a Git
90
+ // repository, alongside a misspelled flag, and when stdout is redirected to a
91
+ // file or a pipe, because the one thing a caller asking for a version number
92
+ // can never use is a paragraph explaining why the version could not be
93
+ // printed. A reader that closes the pipe before this write lands still raises
94
+ // EPIPE, as it does for every other write here; that is not something this
95
+ // early return changes.
96
+ //
97
+ // One line, `VERSION` alone. No `v` prefix, no identity block, no findings:
98
+ // this output is read by scripts, and the plain form is the whole contract.
99
+ if (options.version) {
100
+ out(`${VERSION}\n`);
101
+ return 0;
102
+ }
103
+
86
104
  if (options.error) {
87
105
  err(`create-pathfinder: ${options.error}\n\n${USAGE}`);
88
106
  return 2;
@@ -570,21 +588,43 @@ function countWritten(result, plan, options) {
570
588
  return result.written + result.overwritten;
571
589
  }
572
590
 
591
+ /**
592
+ * Every option at its unasked-for default. `parseArguments` starts from a copy
593
+ * of this and `--version` returns one, so the two agree by construction.
594
+ */
595
+ const NO_OPTIONS = {
596
+ dryRun: false,
597
+ force: false,
598
+ help: false,
599
+ version: false,
600
+ gitInit: false,
601
+ noGitInit: false,
602
+ noClipboard: false,
603
+ noOpen: false,
604
+ yes: false,
605
+ // null means "not said", which is not the same as "none". Only the first
606
+ // suppresses the question.
607
+ agents: null,
608
+ error: null,
609
+ };
610
+
611
+ /**
612
+ * Which options this run asks for.
613
+ *
614
+ * `-v` and `--version` are recognized here, before any other token in `argv`
615
+ * is interpreted, because they ask what this package is rather than what this
616
+ * run should do. A misspelled flag or an invalid `--agents` value must not
617
+ * swallow the answer, and the answer must not depend on position: a wrapper
618
+ * that appends `--version` to arguments it was handed still gets a version
619
+ * number. That is why this is a scan and not another `case` below — the
620
+ * refusals in the loop return early, and one of them would otherwise win.
621
+ */
573
622
  function parseArguments(argv) {
574
- const options = {
575
- dryRun: false,
576
- force: false,
577
- help: false,
578
- gitInit: false,
579
- noGitInit: false,
580
- noClipboard: false,
581
- noOpen: false,
582
- yes: false,
583
- // null means "not said", which is not the same as "none". Only the first
584
- // suppresses the question.
585
- agents: null,
586
- error: null,
587
- };
623
+ if (argv.some((argument) => argument === "-v" || argument === "--version")) {
624
+ return { ...NO_OPTIONS, version: true };
625
+ }
626
+
627
+ const options = { ...NO_OPTIONS };
588
628
 
589
629
  for (let index = 0; index < argv.length; index += 1) {
590
630
  const argument = argv[index];
package/src/kit.mjs CHANGED
@@ -68,7 +68,7 @@ export function isExcluded(basename) {
68
68
  *
69
69
  * `context/current-feature.md` and `context/handoff.md` are transient session
70
70
  * state, and they are here for the same reason one step further on: the kit
71
- * stopped shipping a blank `current-feature.md` stencil, because `load-feature`
71
+ * stopped shipping a blank `current-feature.md` stencil, because `/feature load`
72
72
  * writes the real one on first use and a placeholder is just a file a reader
73
73
  * has to recognise as empty. Having stopped shipping the blank one, the thing
74
74
  * to guard against is shipping a *filled-in* one — a destination project
@@ -1,23 +0,0 @@
1
- ---
2
- name: complete-feature
3
- description: Complete accepted work through the project's delivery workflow and durable records.
4
- ---
5
-
6
- # Complete Feature
7
-
8
- Complete only work the human has accepted.
9
-
10
- 1. Confirm the Feature is accepted.
11
- 2. Run the project's required final checks.
12
- 3. Follow the documented Git, merge, version, release, and deployment workflow.
13
- Ask for approval where required.
14
- 4. Mark the Feature complete.
15
- 5. Add a compact entry to `context/history.md`.
16
- Create it from `templates/history.template.md` if it does not exist.
17
- 6. Clear or update `context/current-feature.md`. Do nothing if it does not exist.
18
- 7. If work tracking is configured, sync the completed state.
19
- 8. Report the completed outcome and any remaining follow-up.
20
-
21
- Do not re-review accepted work unless final verification exposes a new problem.
22
-
23
- Do not claim completion if required checks or delivery steps failed.
@@ -1,29 +0,0 @@
1
- ---
2
- name: start-feature
3
- description: Implement the active Feature in small, stable increments.
4
- ---
5
-
6
- # Start Feature
7
-
8
- Implement the active delivery chunk.
9
-
10
- 1. Read only the context needed for the current work.
11
- 2. Restate the pre-implementation summary the project's agent guide requires,
12
- and wait for it to be answered where it names a human decision. Do not edit
13
- any file before this step is done.
14
- 3. Follow the Feature and existing project conventions.
15
- 4. Make the smallest complete change.
16
- 5. Verify the behavior you changed.
17
- 6. Keep the repository stable.
18
- 7. Create or update `context/current-feature.md` with the current state and next action.
19
-
20
- ## Rules
21
-
22
- - Stay inside the approved scope.
23
- - Stop if implementation requires a human decision or material scope change.
24
- - Do not silently add dependencies or adopt prototype code.
25
- - Follow the project's approval and Git rules.
26
- - Do not decide that your own work is accepted.
27
-
28
- When the chunk is done, report what changed, what was verified, and anything
29
- unresolved.