@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
@@ -0,0 +1,176 @@
1
+ # Haus AI User Guide
2
+
3
+ This guide shows how to use `haus` in a real project, even if you are not a developer.
4
+
5
+ ## What Haus AI does
6
+
7
+ Haus AI scans your project, recommends context files/rules, then writes controlled files so Claude works with safer, stack-aware guidance.
8
+
9
+ Main output folders:
10
+
11
+ - `./.claude` (Claude settings/rules/commands)
12
+ - `./.haus-workflow` (scan/recommendation/lock/memory metadata)
13
+
14
+ ## Before you start
15
+
16
+ You need:
17
+
18
+ - a project folder on your machine
19
+ - Node.js 22+ (`node --version`)
20
+ - terminal access
21
+
22
+ Check Node:
23
+
24
+ ```bash
25
+ node --version
26
+ ```
27
+
28
+ If version is below 22, install/update Node first.
29
+
30
+ ## Install Haus AI
31
+
32
+ ```bash
33
+ npm install -g @haus-tech/haus-workflow
34
+ haus --help
35
+ ```
36
+
37
+ Seed `~/.claude/` with Haus skills, agents, and hooks (once per machine):
38
+
39
+ ```bash
40
+ haus install
41
+ ```
42
+
43
+ ### If you switch Node versions often (nvm, Herd, Volta…)
44
+
45
+ `npm install -g` binds to the currently active Node version. Switch Node → `haus` disappears. Two options:
46
+
47
+ 1. **Re-install per version.** When you change Node, carry globals forward:
48
+ ```bash
49
+ nvm install <new-version> --reinstall-packages-from=current
50
+ ```
51
+
52
+ 2. **Use a shell alias.** No per-version install needed:
53
+ ```bash
54
+ echo 'alias haus="node $(npm root -g)/@haus-tech/haus-workflow/dist/cli.js"' >> ~/.zshrc
55
+ source ~/.zshrc
56
+ ```
57
+
58
+ ## Use Haus in a project
59
+
60
+ Move terminal to project root (folder that contains your app code), then run:
61
+
62
+ ```bash
63
+ haus setup-project
64
+ ```
65
+
66
+ Setup modes:
67
+
68
+ - guided: asks simple onboarding questions
69
+ - fast: minimal prompts, default flow
70
+
71
+ ## Typical daily workflow
72
+
73
+ ### 1) Scan project
74
+
75
+ ```bash
76
+ haus scan --json
77
+ ```
78
+
79
+ Writes project detection outputs to `./.haus-workflow/*`.
80
+
81
+ ### 2) Generate recommendations
82
+
83
+ ```bash
84
+ haus recommend --json
85
+ ```
86
+
87
+ Creates `./.haus-workflow/recommendation.json` with selected and skipped items, confidence, and reasons.
88
+
89
+ ### 3) Preview generated changes
90
+
91
+ ```bash
92
+ haus apply --dry-run
93
+ ```
94
+
95
+ Shows planned files without writing.
96
+
97
+ ### 4) Apply generated files
98
+
99
+ ```bash
100
+ haus apply --write
101
+ ```
102
+
103
+ Writes generated files and reports overwrite summaries with concise diff counts.
104
+
105
+ ### 5) Verify setup health
106
+
107
+ ```bash
108
+ haus doctor
109
+ haus doctor --hooks
110
+ ```
111
+
112
+ `--hooks` checks that project hook settings still match the hook contract.
113
+
114
+ ## Update flow
115
+
116
+ Check update state:
117
+
118
+ ```bash
119
+ haus update --check
120
+ ```
121
+
122
+ Apply lock refresh:
123
+
124
+ ```bash
125
+ haus update
126
+ ```
127
+
128
+ Update behavior:
129
+
130
+ - preserves local `.claude` overrides
131
+ - backs up lockfile under `./.haus-workflow/backups`
132
+ - prints unified lockfile diff summary
133
+
134
+ ## Memory commands
135
+
136
+ ```bash
137
+ haus memory status
138
+ haus memory add "Use explicit transaction boundaries in checkout service"
139
+ haus memory inject --task "review checkout flow"
140
+ haus memory promote
141
+ ```
142
+
143
+ Memory is local-only in `./.haus-workflow/memory`.
144
+
145
+ ## Explain/context commands
146
+
147
+ Use when you need to understand why rules were selected:
148
+
149
+ ```bash
150
+ haus explain-recommendation --json
151
+ haus context --task "build shipping plugin" --json
152
+ ```
153
+
154
+ ## Claude slash-command usage
155
+
156
+ After `haus apply --write`, command docs are generated in:
157
+
158
+ - `./.claude/commands/haus-doctor.md`
159
+ - `./.claude/commands/haus-review.md`
160
+
161
+ Some environments expose these as slash commands. If not, run the CLI commands directly.
162
+
163
+ ## If something fails
164
+
165
+ - `haus: command not found` -> run `npm install -g @haus-tech/haus-workflow` or check Node version
166
+ - Node engine error -> switch to Node 22+
167
+ - hook mismatch in doctor -> run `haus apply --write` again
168
+ - wrong project scanned -> `cd` into correct project root, rerun
169
+
170
+ ## Remove generated setup
171
+
172
+ ```bash
173
+ haus undo --yes
174
+ ```
175
+
176
+ Removes `./.claude` and `./.haus-workflow` in current project.
@@ -0,0 +1,73 @@
1
+ {
2
+ "stacks": [
3
+ "haus",
4
+ "security",
5
+ "quality",
6
+ "frontend",
7
+ "backend",
8
+ "testing",
9
+ "review",
10
+ "workflow",
11
+ "reference-pack",
12
+ "core-skill",
13
+ "workflow-skill",
14
+ "stack-skill",
15
+ "review-skill",
16
+ "agent",
17
+ "hook",
18
+ "rule",
19
+ "react",
20
+ "typescript",
21
+ "php",
22
+ "csharp",
23
+ "vendure",
24
+ "vendure3",
25
+ "nestjs",
26
+ "graphql",
27
+ "nx21",
28
+ "turbo",
29
+ "nextjs",
30
+ "react19",
31
+ "typescript6",
32
+ "vite8",
33
+ "tanstack-query",
34
+ "tanstack-router",
35
+ "radix",
36
+ "radix-ui",
37
+ "shadcn",
38
+ "shadcn-ui",
39
+ "tailwind",
40
+ "tailwindcss",
41
+ "scss",
42
+ "scss-modules",
43
+ "vue",
44
+ "expressjs",
45
+ "soup-base",
46
+ "laravel",
47
+ "laravel-nova",
48
+ "wordpress",
49
+ "bedrock",
50
+ "elementor-pro",
51
+ "acf-pro",
52
+ "jetengine",
53
+ "dotnet",
54
+ "oidc",
55
+ "azure-ad",
56
+ "bankid",
57
+ "myid",
58
+ "cgi",
59
+ "crypto",
60
+ "collection2",
61
+ "postgresql",
62
+ "mariadb",
63
+ "mssql",
64
+ "elasticsearch",
65
+ "yarn4",
66
+ "pnpm89",
67
+ "playwright",
68
+ "testing-library",
69
+ "phpunit",
70
+ "storybook",
71
+ "wisest"
72
+ ]
73
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "array",
4
+ "items": {
5
+ "type": "object",
6
+ "required": ["id", "type", "source", "version", "hash", "installMode", "paths"],
7
+ "properties": {
8
+ "id": { "type": "string" },
9
+ "type": { "type": "string" },
10
+ "source": { "type": "string", "description": "\"haus\" for Haus-owned items; \"curated\" for approved external items." },
11
+ "version": { "type": "string", "description": "haus package version when the row was written." },
12
+ "hash": {
13
+ "type": "string",
14
+ "description": "sha256 digest of installed files listed in paths (see src/update/hash-installed.ts); placeholder when paths is empty."
15
+ },
16
+ "installMode": { "type": "string" },
17
+ "paths": { "type": "array", "items": { "type": "string" } },
18
+ "originSourceId": {
19
+ "type": "string",
20
+ "description": "For source:\"curated\" items — references the sourceId from sources.yaml."
21
+ },
22
+ "useMode": {
23
+ "type": "string",
24
+ "enum": ["copy", "adapted", "wrapped", "rewritten", "reference-only"],
25
+ "description": "How the upstream item was incorporated."
26
+ },
27
+ "license": {
28
+ "type": "string",
29
+ "description": "SPDX license identifier of the upstream source, e.g. \"MIT\"."
30
+ },
31
+ "riskLevel": {
32
+ "type": "string",
33
+ "enum": ["low", "medium", "high", "blocked"],
34
+ "description": "Risk level assessed during curation review."
35
+ },
36
+ "reviewStatus": {
37
+ "type": "string",
38
+ "enum": ["approved", "candidate", "needs-review", "rejected", "deprecated"],
39
+ "description": "Curation review gate status. Only approved items are installed."
40
+ }
41
+ }
42
+ }
43
+ }