@haus-tech/haus-workflow 0.16.0 → 0.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.16.1](https://github.com/WeAreHausTech/haus-workflow/compare/v0.16.0...v0.16.1) (2026-06-09)
4
+
3
5
  ## [0.16.0](https://github.com/WeAreHausTech/haus-workflow/compare/v0.15.0...v0.16.0) (2026-06-05)
4
6
 
5
7
  ### Features
package/README.md CHANGED
@@ -31,7 +31,7 @@ Once installed, Claude Code gains a `/haus-workflow` slash command.
31
31
 
32
32
  ```
33
33
  /haus-workflow # interactive menu — pick setup, update, refresh, etc.
34
- /haus-workflow init # first-time project setup
34
+ /haus-workflow setup # full first-time setup — scaffolding, skills, commands + docs (runs the /haus-setup flow)
35
35
  /haus-workflow apply # refresh .claude/ and regenerate CLAUDE.md imports
36
36
  /haus-workflow update # update npm package + catalog + ~/.claude/
37
37
  /haus-workflow catalog # fetch only latest catalog
package/dist/cli.js CHANGED
@@ -3290,45 +3290,10 @@ async function runSetupCore(root, opts) {
3290
3290
  }
3291
3291
 
3292
3292
  // src/commands/setup-project.ts
3293
- var GUIDED_QUESTIONS = [
3294
- "What is this project for?",
3295
- "Is it for a client, internal Haus work, or experimentation?",
3296
- "What should Claude help with most?",
3297
- "Is this project connected to other repositories?",
3298
- "Are there parts of the project Claude should avoid touching?",
3299
- "Are there client-specific rules or sensitive areas?",
3300
- "Do you want a minimal, standard, or strict setup?"
3301
- ];
3302
3293
  async function runSetupProject(options) {
3303
3294
  const root = process.cwd();
3304
- let mode = options.guided ? "guided" : "fast";
3305
- if (!options.guided && !options.fast && !options.json) {
3306
- log("How do you want to set this project up?");
3307
- log("1. Guided setup - I'll ask a few simple questions, then scan the project.");
3308
- log("2. Fast setup - I'll only scan the project and recommend defaults.");
3309
- const choice = await ask("Choose 1 or 2");
3310
- mode = choice === "1" ? "guided" : "fast";
3311
- }
3312
- if (mode === "guided") {
3313
- const existing = await readJson(hausPath(root, "setup-answers.json")) ?? {};
3314
- const merged = {};
3315
- for (const question of GUIDED_QUESTIONS) {
3316
- if (options.json) {
3317
- merged[question] = existing[question] ?? "pending-user-answer";
3318
- continue;
3319
- }
3320
- const prefilled = existing[question];
3321
- if (prefilled && prefilled !== "pending-user-answer" && prefilled !== "no-answer") {
3322
- merged[question] = prefilled;
3323
- continue;
3324
- }
3325
- const answer = await ask(question);
3326
- merged[question] = answer || prefilled || "no-answer";
3327
- }
3328
- await writeJson(hausPath(root, "setup-answers.json"), merged);
3329
- }
3330
3295
  await runSetupCore(root, {
3331
- mode,
3296
+ mode: "fast",
3332
3297
  json: options.json,
3333
3298
  apply: !options.json,
3334
3299
  dryRun: false,
@@ -4963,7 +4928,7 @@ validateRuntimeNodeVersion();
4963
4928
  program.name("haus").description("Haus AI workflow CLI").version(cliVersion());
4964
4929
  program.command("scan").option("--json").action(runScan);
4965
4930
  program.command("recommend").option("--json").action(runRecommend);
4966
- program.command("setup-project").option("--guided").option("--fast").option("--json").action(runSetupProject);
4931
+ program.command("setup-project").option("--json").action(runSetupProject);
4967
4932
  program.command("doctor").option("--hooks", "Verify .claude/settings.json matches the hook contract").action(runDoctor);
4968
4933
  program.command("apply").option("--dry-run").option("--write").option("--select", "Interactively select catalog items before applying").option(
4969
4934
  "--allow-empty-cache",
@@ -4975,7 +4940,7 @@ program.command("apply").option("--dry-run").option("--write").option("--select"
4975
4940
  program.command("undo").option("-y, --yes", "Skip confirmation").action(runUndo);
4976
4941
  program.command("explain-recommendation").option("--json").action(runExplainRecommendation);
4977
4942
  program.command("context").option("--task <task>").option("--from-hook").option("--json").option("--verbose").action(runContext);
4978
- program.command("init").option("--fast").option("--json").action(runInit);
4943
+ program.command("init").option("--json").action(runInit);
4979
4944
  program.command("refresh").action(runRefresh);
4980
4945
  program.command("catalog-audit").action(runCatalogAudit);
4981
4946
  program.command("validate-catalog").argument("[manifest]").action(runValidateCatalog);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.4.1",
2
+ "version": "2.4.2",
3
3
  "items": [
4
4
  {
5
5
  "id": "haus.nextjs-patterns",
@@ -4,7 +4,7 @@ commands; they read plain language and approve.
4
4
 
5
5
  Do this in order:
6
6
 
7
- 1. **Detect.** Run `haus setup-project --fast --json`. Read the JSON yourself —
7
+ 1. **Detect.** Run `haus setup-project --json`. Read the JSON yourself —
8
8
  do not show it. Translate what was detected into one or two plain sentences,
9
9
  e.g. "This looks like a Next.js website using Yarn. I found unit tests but no
10
10
  end-to-end tests." If the detection status is `unknown` or `partial`, say so
@@ -17,16 +17,16 @@ All-in-one entry point for the Haus AI workflow.
17
17
 
18
18
  ## Task aliases → commands
19
19
 
20
- | Alias(es) | Command | What it does |
21
- | ------------------------------------ | -------------------- | ---------------------------------------------- |
22
- | `init`, `setup` | `haus init` | First-time project setup |
23
- | `apply`, `refresh`, `update-project` | `haus apply --write` | Re-run setup / refresh `.claude/` context |
24
- | `update`, `upgrade` | `haus update` | Update npm package + catalog + `~/.claude/` |
25
- | `catalog` | `haus update` | Fetch latest catalog (same command as update) |
26
- | `doctor`, `check` | `haus doctor` | Check for install drift |
27
- | `install`, `global` | `haus install` | Seed `~/.claude/` with haus-owned files |
28
- | `uninstall` | `haus uninstall` | Remove all haus global files from `~/.claude/` |
29
- | `claude-md`, `regenerate` | `haus apply --write` | Regenerate root `CLAUDE.md` import block |
20
+ | Alias(es) | Command | What it does |
21
+ | ------------------------------------ | ----------------------- | ------------------------------------------------------------------- |
22
+ | `init`, `setup` | _Setup procedure below_ | Full first-time setup: scaffolding, skills, commands + project docs |
23
+ | `apply`, `refresh`, `update-project` | `haus apply --write` | Re-run setup / refresh `.claude/` context |
24
+ | `update`, `upgrade` | `haus update` | Update npm package + catalog + `~/.claude/` |
25
+ | `catalog` | `haus update` | Fetch latest catalog (same command as update) |
26
+ | `doctor`, `check` | `haus doctor` | Check for install drift |
27
+ | `install`, `global` | `haus install` | Seed `~/.claude/` with haus-owned files |
28
+ | `uninstall` | `haus uninstall` | Remove all haus global files from `~/.claude/` |
29
+ | `claude-md`, `regenerate` | `haus apply --write` | Regenerate root `CLAUDE.md` import block |
30
30
 
31
31
  ## Step 1 — Determine the task
32
32
 
@@ -38,7 +38,7 @@ All-in-one entry point for the Haus AI workflow.
38
38
  Question: "What would you like to do?"
39
39
  Options:
40
40
  1. Set up this project for the first time
41
- (haus initscans repo, writes .haus-workflow/, updates CLAUDE.md)
41
+ (full setupscaffolding + skills + commands, then a deep read to write the CLAUDE.md docs body + docs/)
42
42
  2. Refresh project setup
43
43
  (haus apply --write — re-runs setup, regenerates CLAUDE.md imports)
44
44
  3. Update haus package + catalog + global files
@@ -55,21 +55,16 @@ Map the user's selection to the command from the alias table, then continue to S
55
55
 
56
56
  Run the mapped command via Bash. Quote the exact command you are running before executing it.
57
57
 
58
+ **Exception — `setup` / `init`:** this maps to a multi-step procedure, not a single command. Do not run a bare `haus init`. Skip to **Setup (`setup` / `init`)** under Step 3 and follow it.
59
+
58
60
  ## Step 3 — Post-run steps
59
61
 
60
62
  After the command completes, follow the relevant post-run steps below.
61
63
 
62
- ### After `haus init`
63
-
64
- 1. Open `.haus-workflow/workflow-config.md`.
65
- 2. Check for unfilled placeholders (`TODO`, `n/a`, empty values) in:
66
- - Test, lint, typecheck, build commands — confirm against `package.json` scripts.
67
- - Docs paths — check whether `docs/SPEC.md`, `docs/DESIGN.md`, `docs/UX.md` exist.
68
- - Validation library — check `package.json` dependencies for `zod`, `yup`, `joi`, `valibot`.
69
- - Pre-commit tool — check for `.husky/`, `lefthook.yml`, `.pre-commit-config.yaml`.
70
- - Highest-stakes logic — ask the user if unclear.
71
- 3. Fill in every unfilled field. Do not leave placeholders.
72
- 4. Confirm with the user that `workflow-config.md` is complete before proceeding.
64
+ ### Setup (`setup` / `init`)
65
+
66
+ 1. Open and follow `~/.claude/commands/haus-setup.md` — the installed `haus-setup` command (in some projects also `.claude/commands/haus-setup.md`). Run every step in order. It detects the stack, asks the guided questions, runs `haus apply --write` (scaffolding, skills, commands, rules, docs skill), writes the **project docs** (`CLAUDE.md` body + `docs/`) and `.haus-workflow/deep-context.json`, runs `haus recommend`, applies the newly-matched helpers, and confirms.
67
+ 2. Then fill `.haus-workflow/workflow-config.md` replace every placeholder (`TODO`, `n/a`, empty): test/lint/typecheck/build commands (check `package.json`), docs paths, validation library, pre-commit tool, highest-stakes logic (ask if unclear). Leave none.
73
68
 
74
69
  ### After `haus apply --write`
75
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-tech/haus-workflow",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Haus AI workflow CLI for Claude Code.",
5
5
  "type": "module",
6
6
  "bin": {