@trailstep/create-flows 0.3.0 → 0.3.1

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 +102 -11
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,20 +1,56 @@
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:
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 --scope project --install-skill
10
19
  ```
11
20
 
12
- ## Workflows
21
+ Then let `trailstep add` install and register the workflow package. `--project-skill` generates project skills so supported coding agents can discover and run the workflows from the agent UI.
22
+
23
+ ```bash
24
+ # Preview without installing, registering, or writing skills.
25
+ trailstep add @trailstep/create-flows@latest --scope project --workflow "*" --project-skill --dry-run
26
+
27
+ # Install/register both workflows and generate project skills.
28
+ trailstep add @trailstep/create-flows@latest --scope project --workflow "*" --project-skill --yes
29
+ ```
30
+
31
+ Run registered workflows directly if you prefer the CLI:
32
+
33
+ ```bash
34
+ trailstep project/grill-it-away
35
+ trailstep project/take-it-away --input-file feature-request.json
36
+ trailstep retry project/take-it-away <runName>
37
+ ```
38
+
39
+ ## Which workflow should I use?
40
+
41
+ ### `grill-it-away`
42
+
43
+ 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.
44
+
45
+ ```text
46
+ rough idea --> interactive grill step --> { conversation } --> implementation pipeline
47
+ ```
48
+
49
+ ### `take-it-away`
13
50
 
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.
51
+ 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
52
 
17
- ## Usage
53
+ Input is a JSON object:
18
54
 
19
55
  ```json
20
56
  {
@@ -22,11 +58,66 @@ pnpm add -D @trailstep/cli
22
58
  }
23
59
  ```
24
60
 
61
+ ## Step architecture
62
+
63
+ The two workflows share the same implementation pipeline after initial intake:
64
+
65
+ ```mermaid
66
+ flowchart TD
67
+ A[grill-it-away interactive intake] --> C[create-feature-doc]
68
+ B[take-it-away conversation input] --> C
69
+ C --> D[create-or-improve-implementation-doc]
70
+ D --> E[review-implementation-doc]
71
+ E -->|needs work| D
72
+ E -->|passes| F[split-implementation-stories]
73
+ F --> G[implement-story]
74
+ G --> H[review-story-implementation]
75
+ H -->|needs work| G
76
+ H -->|passes| I[commit-reviewed-story / mark complete]
77
+ I --> J{more stories?}
78
+ J -->|yes| G
79
+ J -->|no| K[done]
80
+ ```
81
+
82
+ The important TrailStep pattern is not the specific feature methodology; it is the architecture:
83
+
84
+ - each stage is a focused step with its own prompt and agent role
85
+ - each step passes structured output to the next step
86
+ - planning and implementation have review loops
87
+ - stories are split so implementation work happens one story at a time
88
+ - failed runs can be retried through TrailStep instead of restarting the entire conversation
89
+
90
+ ## Agent roles
91
+
92
+ The workflows declare role defaults so TrailStep can target different kinds of agent work:
93
+
94
+ - **grillingAgent**: clarifies vague requests interactively.
95
+ - **featureWriter**: turns the request/conversation into a standalone feature document.
96
+ - **planner**: creates or improves an architecture-aware implementation plan.
97
+ - **reviewer**: reviews implementation docs and story diffs.
98
+ - **implementer**: implements one story at a time.
99
+
100
+ ## Safety notes
101
+
102
+ These workflows are intended to change the current project when they reach implementation steps. Review your working tree before and after runs.
103
+
104
+ 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`.
105
+
106
+ 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`.
107
+
108
+ ## Direct package install
109
+
110
+ 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:
111
+
112
+ ```bash
113
+ npm install @trailstep/create-flows @trailstep/authoring
114
+ ```
115
+
116
+ Then direct bundle refs use manifest names:
117
+
25
118
  ```bash
26
- trailstep add @trailstep/create-flows#takeItAway
27
119
  trailstep @trailstep/create-flows#takeItAway --input-file feature-request.json
28
120
  trailstep @trailstep/create-flows#grillItAway
29
- trailstep retry @trailstep/create-flows#takeItAway <runName>
30
121
  ```
31
122
 
32
- Generated run artifacts live under `.trailstep/runs`; inspect them, but do not edit them to recover workflow state.
123
+ 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.1",
4
4
  "description": "Public reusable general-purpose TrailStep workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@trailstep/authoring": "0.1.0"
33
+ "@trailstep/authoring": "0.1.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@biomejs/biome": "^2.1.1",
@@ -38,7 +38,7 @@
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.1"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsup src/index.ts --format esm --dts --sourcemap --clean --loader .md=text",