@haus-tech/haus-workflow 0.1.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/README.md +60 -0
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +3232 -0
  5. package/docs/user-guide.md +176 -0
  6. package/library/catalog/allowed-stacks.json +73 -0
  7. package/library/catalog/haus-lock.schema.json +43 -0
  8. package/library/catalog/manifest.json +696 -0
  9. package/library/catalog/sources.yaml +411 -0
  10. package/library/global/agents/haus-code-reviewer.md +27 -0
  11. package/library/global/agents/haus-docs-researcher.md +26 -0
  12. package/library/global/agents/haus-planner.md +26 -0
  13. package/library/global/agents/haus-security-reviewer.md +26 -0
  14. package/library/global/agents/haus-test-reviewer.md +26 -0
  15. package/library/global/settings-fragments/hooks.json +31 -0
  16. package/library/global/skills/haus-workflow/SKILL.md +56 -0
  17. package/library/global/templates/haus-way-of-work.md +40 -0
  18. package/package.json +88 -0
  19. package/tests/README.md +70 -0
  20. package/tests/fixtures/catalog/agents/code-reviewer.md +15 -0
  21. package/tests/fixtures/catalog/agents/docs-researcher.md +15 -0
  22. package/tests/fixtures/catalog/agents/planner.md +15 -0
  23. package/tests/fixtures/catalog/agents/security-reviewer.md +15 -0
  24. package/tests/fixtures/catalog/agents/test-reviewer.md +15 -0
  25. package/tests/fixtures/catalog/manifest.json +696 -0
  26. package/tests/fixtures/catalog/skills/auth-oidc-azure-bankid-patterns/SKILL.md +9 -0
  27. package/tests/fixtures/catalog/skills/database-patterns/SKILL.md +9 -0
  28. package/tests/fixtures/catalog/skills/dotnet-patterns/SKILL.md +9 -0
  29. package/tests/fixtures/catalog/skills/dotnet-service-patterns/SKILL.md +9 -0
  30. package/tests/fixtures/catalog/skills/global-engineering-rules/SKILL.md +9 -0
  31. package/tests/fixtures/catalog/skills/laravel-nova-patterns/SKILL.md +9 -0
  32. package/tests/fixtures/catalog/skills/laravel-patterns/SKILL.md +9 -0
  33. package/tests/fixtures/catalog/skills/nestjs-graphql-patterns/SKILL.md +9 -0
  34. package/tests/fixtures/catalog/skills/nextjs-patterns/SKILL.md +9 -0
  35. package/tests/fixtures/catalog/skills/nx21-monorepo-patterns/SKILL.md +9 -0
  36. package/tests/fixtures/catalog/skills/package-manager-yarn4-pnpm89/SKILL.md +9 -0
  37. package/tests/fixtures/catalog/skills/phpunit-patterns/SKILL.md +9 -0
  38. package/tests/fixtures/catalog/skills/playwright-patterns/SKILL.md +9 -0
  39. package/tests/fixtures/catalog/skills/production-readiness-review/SKILL.md +9 -0
  40. package/tests/fixtures/catalog/skills/radix-shadcn-patterns/SKILL.md +9 -0
  41. package/tests/fixtures/catalog/skills/react19-patterns/SKILL.md +9 -0
  42. package/tests/fixtures/catalog/skills/security-review/SKILL.md +9 -0
  43. package/tests/fixtures/catalog/skills/storybook-patterns/SKILL.md +9 -0
  44. package/tests/fixtures/catalog/skills/tailwind-scss-patterns/SKILL.md +9 -0
  45. package/tests/fixtures/catalog/skills/tanstack-query-router-patterns/SKILL.md +9 -0
  46. package/tests/fixtures/catalog/skills/testing-library-patterns/SKILL.md +9 -0
  47. package/tests/fixtures/catalog/skills/turbo-monorepo-patterns/SKILL.md +9 -0
  48. package/tests/fixtures/catalog/skills/typescript6-patterns/SKILL.md +9 -0
  49. package/tests/fixtures/catalog/skills/vendure-app-patterns/SKILL.md +9 -0
  50. package/tests/fixtures/catalog/skills/vendure-plugin-patterns/SKILL.md +9 -0
  51. package/tests/fixtures/catalog/skills/vite8-patterns/SKILL.md +9 -0
  52. package/tests/fixtures/catalog/skills/vue-patterns/SKILL.md +9 -0
  53. package/tests/fixtures/catalog/skills/wordpress-acf-elementor-jetengine-patterns/SKILL.md +9 -0
  54. package/tests/fixtures/catalog/skills/wordpress-bedrock-patterns/SKILL.md +9 -0
  55. package/tests/fixtures/catalog/skills/wordpress-patterns/SKILL.md +9 -0
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@haus-tech/haus-workflow",
3
+ "version": "0.1.0",
4
+ "description": "Haus AI workflow CLI for Claude Code.",
5
+ "type": "module",
6
+ "bin": {
7
+ "haus": "./dist/cli.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/WeAreHausTech/haus-workflow.git"
12
+ },
13
+ "homepage": "https://github.com/WeAreHausTech/haus-workflow",
14
+ "files": [
15
+ "dist",
16
+ "library/global",
17
+ "library/catalog",
18
+ "tests/fixtures/catalog",
19
+ "docs/user-guide.md",
20
+ "README.md",
21
+ "CHANGELOG.md",
22
+ "LICENSE",
23
+ "NOTICE"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup src/cli.ts --format esm --dts --clean --out-dir dist",
27
+ "dev": "tsx src/cli.ts",
28
+ "test": "node --test tests/**/*.test.js",
29
+ "lint": "eslint src scripts",
30
+ "format:check": "prettier --check src scripts",
31
+ "format:write": "prettier --write src scripts",
32
+ "typecheck": "tsc --noEmit",
33
+ "typecheck:scripts": "tsc --noEmit --project tsconfig.scripts.json",
34
+ "cleanup:status": "tsx scripts/cleanup-status.ts",
35
+ "bench:hooks": "tsx scripts/bench-hooks.ts",
36
+ "pack:local": "yarn pack",
37
+ "publish:dry": "npm pack --dry-run",
38
+ "publish:public": "yarn npm publish --access public",
39
+ "release": "GITHUB_TOKEN=$(gh auth token) release-it",
40
+ "release:dry": "GITHUB_TOKEN=$(gh auth token) release-it --dry-run",
41
+ "prepack": "yarn build",
42
+ "verify": "yarn typecheck && yarn typecheck:scripts && yarn lint && yarn build && yarn test",
43
+ "prepare": "husky",
44
+ "security:audit": "yarn npm audit -A -R --severity high --environment production"
45
+ },
46
+ "dependencies": {
47
+ "commander": "13.1.0",
48
+ "diff": "8.0.4",
49
+ "execa": "9.6.1",
50
+ "fast-glob": "3.3.3",
51
+ "fs-extra": "11.3.5",
52
+ "ignore": "6.0.2",
53
+ "picomatch": "4.0.4",
54
+ "semver": "7.8.0",
55
+ "yaml": "2.8.4",
56
+ "zod": "3.25.76"
57
+ },
58
+ "devDependencies": {
59
+ "@release-it/conventional-changelog": "11.0.0",
60
+ "@types/fs-extra": "11.0.4",
61
+ "@types/node": "22.19.17",
62
+ "@types/semver": "7.7.1",
63
+ "@typescript-eslint/eslint-plugin": "8.59.3",
64
+ "@typescript-eslint/parser": "8.59.3",
65
+ "eslint": "9.39.4",
66
+ "eslint-plugin-import": "2.32.0",
67
+ "husky": "9.1.7",
68
+ "lint-staged": "17.0.4",
69
+ "prettier": "3.8.3",
70
+ "release-it": "20.0.1",
71
+ "tsup": "8.5.1",
72
+ "tsx": "4.21.0",
73
+ "typescript": "5.9.3"
74
+ },
75
+ "engines": {
76
+ "node": ">=22"
77
+ },
78
+ "publishConfig": {
79
+ "access": "public"
80
+ },
81
+ "packageManager": "yarn@4.15.0",
82
+ "lint-staged": {
83
+ "**/*.ts": [
84
+ "eslint",
85
+ "prettier --write"
86
+ ]
87
+ }
88
+ }
@@ -0,0 +1,70 @@
1
+ # Tests
2
+
3
+ Node built-in test runner (`node --test`). No framework. All test files are `.js` (compiled output not required — tests import from `dist/` via `fixture-runner.js`).
4
+
5
+ ```bash
6
+ yarn test
7
+ ```
8
+
9
+ ## Structure
10
+
11
+ | Path | Contents |
12
+ |---|---|
13
+ | `tests/*.test.js` | Unit and integration tests |
14
+ | `tests/helpers/` | Shared test utilities |
15
+ | `tests/fixtures/` | Static fixture repos used by tests |
16
+ | `tests/golden/` | Golden output snapshots for scan/recommend/context |
17
+
18
+ ## helpers/fixture-runner.js
19
+
20
+ Utilities for running the compiled CLI against fixture repos in a temp directory:
21
+
22
+ - `cloneFixtureToTemp(fixtureName)` — copies `tests/fixtures/repos/<name>` to a temp dir, returns the path
23
+ - `runHaus(cwd, command)` — runs `node dist/cli.js <command>` in `cwd`, returns stdout
24
+ - `readHausJson(cwd, fileName)` — reads `.haus-workflow/<fileName>` as parsed JSON
25
+ - `normalizeRecommendationForGolden(rec)` — stable sort for golden snapshot comparison
26
+ - `normalizeContextForGolden(ctx)` — stable sort for golden snapshot comparison
27
+
28
+ Tests that use `fixture-runner.js` require a built `dist/` — run `yarn build && yarn test`, or use `yarn verify` which builds before running tests.
29
+
30
+ ## fixtures/
31
+
32
+ ### fixtures/repos/
33
+
34
+ Full fixture repos scanned by integration tests and golden tests. Each subdirectory is a minimal repo skeleton:
35
+
36
+ | Fixture | Stack |
37
+ |---|---|
38
+ | `laravel-app` | Laravel (PHP, Composer, PHPUnit) |
39
+ | `laravel-with-react-frontend` | Laravel + React (pnpm) |
40
+ | `nest-graphql-api` | NestJS + GraphQL (Yarn) |
41
+ | `nextjs-app` | Next.js (pnpm) |
42
+ | `nx-workspace` | Nx monorepo (Yarn) |
43
+ | `orphan-graphql-config` | GraphQL config without backend (pnpm) |
44
+ | `turbo-monorepo` | Turborepo (Yarn) |
45
+ | `vendure-monorepo` | Vendure e-commerce (Yarn) |
46
+ | `vendure-with-nextjs-storefront` | Vendure + Next.js storefront (Yarn) |
47
+ | `wordpress-bedrock-site` | WordPress Bedrock (Composer) |
48
+ | `wordpress-with-node-tooling` | WordPress + Node tooling (pnpm) |
49
+
50
+ ### fixtures/findings/
51
+
52
+ QA findings records (see `fixtures/findings/README.md`). Observational only — not gated by any test.
53
+
54
+ ### Other fixture dirs
55
+
56
+ - `fixtures/dotnet-service/` — unsupported stack (C#/.NET), used to verify unsupported-stack handling
57
+ - `fixtures/unsupported-go/` — unsupported stack (Go)
58
+ - `fixtures/unsupported-python/` — unsupported stack (Python)
59
+ - `fixtures/vendure-plugin/` — minimal Vendure plugin package
60
+ - `fixtures/laravel-app/`, `fixtures/next-react-app/`, `fixtures/wordpress-bedrock/` — legacy shallow fixtures; prefer `fixtures/repos/` equivalents for new tests
61
+
62
+ ## golden/
63
+
64
+ Snapshot files for `context-goldens.test.js` and `recommender.test.js`. Keyed by fixture name.
65
+
66
+ - `golden/scans/` — `scanProject` output
67
+ - `golden/recommendations/` — `runRecommend` output (normalized)
68
+ - `golden/context/` — `runContext` output (normalized)
69
+
70
+ To regenerate goldens after intentional recommender changes, delete the relevant `.json` file and re-run `yarn test` — the test will write the new snapshot and pass on the next run.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Fixture stub agent for CLI tests.
3
+ ---
4
+
5
+ ## Use when
6
+
7
+ Use when working on the relevant task.
8
+
9
+ ## Do not use when
10
+
11
+ Do not use for unrelated tasks.
12
+
13
+ ## Verification
14
+
15
+ Check that the output matches expectations.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Fixture stub agent for CLI tests.
3
+ ---
4
+
5
+ ## Use when
6
+
7
+ Use when working on the relevant task.
8
+
9
+ ## Do not use when
10
+
11
+ Do not use for unrelated tasks.
12
+
13
+ ## Verification
14
+
15
+ Check that the output matches expectations.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Fixture stub agent for CLI tests.
3
+ ---
4
+
5
+ ## Use when
6
+
7
+ Use when working on the relevant task.
8
+
9
+ ## Do not use when
10
+
11
+ Do not use for unrelated tasks.
12
+
13
+ ## Verification
14
+
15
+ Check that the output matches expectations.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Fixture stub agent for CLI tests.
3
+ ---
4
+
5
+ ## Use when
6
+
7
+ Use when working on the relevant task.
8
+
9
+ ## Do not use when
10
+
11
+ Do not use for unrelated tasks.
12
+
13
+ ## Verification
14
+
15
+ Check that the output matches expectations.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Fixture stub agent for CLI tests.
3
+ ---
4
+
5
+ ## Use when
6
+
7
+ Use when working on the relevant task.
8
+
9
+ ## Do not use when
10
+
11
+ Do not use for unrelated tasks.
12
+
13
+ ## Verification
14
+
15
+ Check that the output matches expectations.