@trailstep/create-flows 0.3.0 → 0.3.2

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 (2) hide show
  1. package/README.md +111 -11
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,20 +1,65 @@
1
1
  # @trailstep/create-flows
2
2
 
3
- `@trailstep/create-flows` is a public package of reusable, general-purpose TrailStep workflows.
3
+ `@trailstep/create-flows` is a public package of reusable, general-purpose TrailStep workflows. It demonstrates how TrailStep's small step model can grow into larger, long-horizon coding workflows with focused agent sessions, typed handoffs, review loops, and retryable boundaries.
4
4
 
5
- ## Install
5
+ ## Workflows
6
+
7
+ - `grillItAway`: default registered id `grill-it-away`; starts interactively by asking clarifying questions, then runs the implementation pipeline.
8
+ - `takeItAway`: default registered id `take-it-away`; starts from an already-organic conversation, ticket, or feature request, then runs the implementation pipeline.
9
+
10
+ Both workflows end with a typed output containing implementation status, feature/implementation document paths, completed story count, completed story titles, and a summary.
11
+
12
+ ## Recommended setup
13
+
14
+ Install the TrailStep CLI if you do not already have it, then use the interactive setup from your project root:
6
15
 
7
16
  ```bash
8
- pnpm add @trailstep/create-flows @trailstep/authoring
9
- pnpm add -D @trailstep/cli
17
+ npm install --global @trailstep/cli
18
+ trailstep init
19
+ trailstep add @trailstep/create-flows@latest
10
20
  ```
11
21
 
12
- ## Workflows
22
+ Choose **project** scope, install the TrailStep usage skill, select the workflows you want, and add project skills when prompted. Project skills let supported coding agents discover and run the workflows from the agent UI.
23
+
24
+ <details>
25
+ <summary>Scriptable setup</summary>
26
+
27
+ ```bash
28
+ # Initialize config and install the packaged TrailStep usage skill.
29
+ trailstep init --scope project --install-skill
30
+
31
+ # Preview without installing, registering, or writing skills.
32
+ trailstep add @trailstep/create-flows@latest --scope project --workflow "*" --project-skill --dry-run
33
+
34
+ # Install/register both workflows and generate project skills.
35
+ trailstep add @trailstep/create-flows@latest --scope project --workflow "*" --project-skill --yes
36
+ ```
37
+
38
+ </details>
39
+
40
+ Run registered workflows directly if you prefer the CLI:
41
+
42
+ ```bash
43
+ trailstep project/grill-it-away
44
+ trailstep project/take-it-away --input-file feature-request.json
45
+ trailstep retry project/take-it-away <runName>
46
+ ```
47
+
48
+ ## Which workflow should I use?
49
+
50
+ ### `grill-it-away`
51
+
52
+ Use this when you have an idea but not a complete feature request. The first step is interactive: the grilling agent asks questions until it can produce the normalized `take-it-away` input.
53
+
54
+ ```text
55
+ rough idea --> interactive grill step --> { conversation } --> implementation pipeline
56
+ ```
57
+
58
+ ### `take-it-away`
13
59
 
14
- - `takeItAway`: turns an existing conversation or feature request into reviewed planning and story-by-story delivery.
15
- - `grillItAway`: starts with an interactive conversation and then runs the same implementation pipeline.
60
+ Use this when you already have enough context in a conversation, ticket, issue, or feature request. It skips the interactive grill step and starts the implementation pipeline directly.
16
61
 
17
- ## Usage
62
+ Input is a JSON object:
18
63
 
19
64
  ```json
20
65
  {
@@ -22,11 +67,66 @@ pnpm add -D @trailstep/cli
22
67
  }
23
68
  ```
24
69
 
70
+ ## Step architecture
71
+
72
+ The two workflows share the same implementation pipeline after initial intake:
73
+
74
+ ```mermaid
75
+ flowchart TD
76
+ A[grill-it-away interactive intake] --> C[create-feature-doc]
77
+ B[take-it-away conversation input] --> C
78
+ C --> D[create-or-improve-implementation-doc]
79
+ D --> E[review-implementation-doc]
80
+ E -->|needs work| D
81
+ E -->|passes| F[split-implementation-stories]
82
+ F --> G[implement-story]
83
+ G --> H[review-story-implementation]
84
+ H -->|needs work| G
85
+ H -->|passes| I[commit-reviewed-story / mark complete]
86
+ I --> J{more stories?}
87
+ J -->|yes| G
88
+ J -->|no| K[done]
89
+ ```
90
+
91
+ The important TrailStep pattern is not the specific feature methodology; it is the architecture:
92
+
93
+ - each stage is a focused step with its own prompt and agent role
94
+ - each step passes structured output to the next step
95
+ - planning and implementation have review loops
96
+ - stories are split so implementation work happens one story at a time
97
+ - failed runs can be retried through TrailStep instead of restarting the entire conversation
98
+
99
+ ## Agent roles
100
+
101
+ The workflows declare role defaults so TrailStep can target different kinds of agent work:
102
+
103
+ - **grillingAgent**: clarifies vague requests interactively.
104
+ - **featureWriter**: turns the request/conversation into a standalone feature document.
105
+ - **planner**: creates or improves an architecture-aware implementation plan.
106
+ - **reviewer**: reviews implementation docs and story diffs.
107
+ - **implementer**: implements one story at a time.
108
+
109
+ ## Safety notes
110
+
111
+ These workflows are intended to change the current project when they reach implementation steps. Review your working tree before and after runs.
112
+
113
+ By default, the `commit-reviewed-story` step marks reviewed stories complete without creating commits. Automatic story commits are enabled only when `TRAILSTEP_STORY_COMMIT_MODE` is set to `1`, `true`, `enabled`, or `worktree`.
114
+
115
+ Generated run artifacts live under `.trailstep/runs` by default. Inspect them when needed, but do not edit them to recover workflow state; use `trailstep continue` or `trailstep retry`.
116
+
117
+ ## Direct package install
118
+
119
+ If you want to import the workflows from TypeScript or run bundle refs directly after installing them yourself, install the package and its peer dependency:
120
+
121
+ ```bash
122
+ npm install @trailstep/create-flows @trailstep/authoring
123
+ ```
124
+
125
+ Then direct bundle refs use manifest names:
126
+
25
127
  ```bash
26
- trailstep add @trailstep/create-flows#takeItAway
27
128
  trailstep @trailstep/create-flows#takeItAway --input-file feature-request.json
28
129
  trailstep @trailstep/create-flows#grillItAway
29
- trailstep retry @trailstep/create-flows#takeItAway <runName>
30
130
  ```
31
131
 
32
- Generated run artifacts live under `.trailstep/runs`; inspect them, but do not edit them to recover workflow state.
132
+ Use the equivalent install command for your package manager if you use `pnpm`, `yarn`, or `bun`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trailstep/create-flows",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Public reusable general-purpose TrailStep workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -30,15 +30,15 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@trailstep/authoring": "0.1.0"
33
+ "@trailstep/authoring": "0.1.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@biomejs/biome": "^2.1.1",
37
- "@types/node": "^26.1.1",
36
+ "@biomejs/biome": "^2.5.8",
37
+ "@types/node": "^26.2.0",
38
38
  "tsup": "^8.5.0",
39
39
  "typescript": "^5.8.3",
40
40
  "vitest": "^3.2.4",
41
- "@trailstep/core": "0.1.0"
41
+ "@trailstep/core": "0.1.1"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
@@ -49,7 +49,7 @@
49
49
  "LICENSE"
50
50
  ],
51
51
  "peerDependencies": {
52
- "@trailstep/authoring": "^0.1.0"
52
+ "@trailstep/authoring": "^0.1.2"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsup src/index.ts --format esm --dts --sourcemap --clean --loader .md=text",