create-pathfinder 2.1.0 → 3.0.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
@@ -79,11 +79,8 @@ An adapter carries the canonical skill's frontmatter and a pointer to it, and no
79
79
  - `reverse-engineer` — analyze an external reference and produce an evidence-based reconstruction blueprint
80
80
  - `prototype` — create and iterate the cheapest useful validation artifact
81
81
  - `to-specs` — generate context-sized feature specs
82
- - `load-feature` — prepare one feature for implementation
83
- - `start-feature` — implement scoped delivery chunks
82
+ - `feature` — run one action of the Feature delivery loop: `load`, `start`, `review`, `complete`
84
83
  - `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
84
  - `learn-feature` — create an interactive lesson for a completed feature
88
85
  - `learn-codebase` — create a modular learning portal for the repository
89
86
  - `teach-feature` — teach the verified current feature from its spec, diff, tests, and implementation
@@ -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.0.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.
@@ -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.