@haus-tech/haus-workflow 5.10.1 → 5.12.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.
@@ -164,7 +164,13 @@ Bring haus current. Global half always runs; the project half depends on scope.
164
164
  `optInGroup` (purpose + tokenEstimate as plain language) and `recommended[]`
165
165
  config entries with `install: false` whose files aren't present. One
166
166
  multi-select `AskUserQuestion`, all unchecked. Then one single
167
- `haus recommend --include <id> <id> …` with every chosen id followed by
167
+ `haus recommend --declare-role <role> <role> …` with the common role of each
168
+ chosen group that has one, passed as the name after `role=` (every entry's
169
+ `requires` names only roles, `role=<name>`, and the same role first; a
170
+ declared role also admits the shared helpers listed under other groups),
171
+ then one single
172
+ `haus recommend --include <id> <id> …` with the ids of the chosen groups that
173
+ have none (skip a command with nothing to pass), followed by
168
174
  `haus apply --write`; configs via `haus configs <id>` (`--force` only if the
169
175
  user chose to replace an existing file). Nothing eligible → say so and stop.
170
176
  Reached directly by the `add-skills`/`opt-in` aliases. In workspace scope, ask
@@ -41,10 +41,19 @@ Do this in order:
41
41
  `optInGroup` label and present one `AskUserQuestion` option per group
42
42
  (use each item's `purpose` and `tokenEstimate` to describe it in plain
43
43
  language, e.g. "Code review workflow — request/receive structured reviews").
44
- Collect the item ids from **all** the groups the user picked into one list
45
- and run a **single** `haus recommend --include <id> <id> …` (one command with
46
- every chosen id). Don't run it once per group — each run rewrites
47
- `recommendation.json`, so repeated calls would drop the earlier includes.
44
+ Opt the user in by role wherever a group has one. A chosen group has a
45
+ common role when every entry's `requires` names only roles (`role=<name>`,
46
+ several joined by `|` when a helper serves more than one group) and all
47
+ its entries name the same role first. Collect each common role as the name
48
+ after `role=` (`interview-workflow`, not `role=interview-workflow`) and run a
49
+ **single** `haus recommend --declare-role <role> <role> …` with all of them:
50
+ haus records them in `.haus-workflow/haus.config.json`, and a declared role
51
+ also admits the shared helpers listed under other groups, which the group's
52
+ own ids would miss. Then, only for chosen groups with no common role (a
53
+ `requires` that names a stack or a dependency, or entries whose first roles
54
+ differ), run a **single** `haus recommend --include <id> <id> …` with all of
55
+ their ids. Skip a command that has nothing to pass, and never run either
56
+ once per group: each run re-scores the whole catalog.
48
57
  - **Project config** (entries in `recommended[]` with `install: false`, e.g.
49
58
  Haus ESLint / Prettier baselines): offer each as a plain choice ("Add the
50
59
  Haus ESLint baseline"). On confirm, run `haus configs <id>`. `haus configs`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-tech/haus-workflow",
3
- "version": "5.10.1",
3
+ "version": "5.12.0",
4
4
  "description": "Haus AI workflow CLI for Claude Code.",
5
5
  "type": "module",
6
6
  "bin": {