@haus-tech/haus-workflow 6.7.1 → 6.8.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 (117) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cli.js +4617 -1761
  3. package/package.json +3 -1
  4. package/packages/agents/issue-creator.md +61 -0
  5. package/packages/configs/eslint/eslint.config.mjs +90 -0
  6. package/packages/configs/lighthouse/lighthouserc.yml +35 -0
  7. package/packages/configs/prettier/.prettierignore +28 -0
  8. package/packages/configs/prettier/prettier.config.cjs +12 -0
  9. package/packages/packages.yaml +81 -0
  10. package/packages/skills/adr-decisions/SKILL.md +114 -0
  11. package/packages/skills/auth-oidc-azure-bankid-patterns/SKILL.md +46 -0
  12. package/packages/skills/auth-oidc-azure-bankid-patterns/references/conventions.md +29 -0
  13. package/packages/skills/auth-oidc-azure-bankid-patterns/references/scope.md +30 -0
  14. package/packages/skills/auth-oidc-azure-bankid-patterns/references/workflow.md +38 -0
  15. package/packages/skills/bullmq-patterns/SKILL.md +63 -0
  16. package/packages/skills/bullmq-patterns/references/conventions.md +33 -0
  17. package/packages/skills/bullmq-patterns/references/scope.md +30 -0
  18. package/packages/skills/bullmq-patterns/references/workflow.md +50 -0
  19. package/packages/skills/i18next-patterns/SKILL.md +62 -0
  20. package/packages/skills/i18next-patterns/references/conventions.md +32 -0
  21. package/packages/skills/i18next-patterns/references/scope.md +29 -0
  22. package/packages/skills/i18next-patterns/references/workflow.md +39 -0
  23. package/packages/skills/issue-authoring/SKILL.md +191 -0
  24. package/packages/skills/issue-authoring/references/issue-tracker.md +29 -0
  25. package/packages/skills/issue-authoring/references/native-metadata.md +122 -0
  26. package/packages/skills/issue-authoring/references/recording-approval.md +29 -0
  27. package/packages/skills/laravel-nova-patterns/SKILL.md +55 -0
  28. package/packages/skills/laravel-nova-patterns/references/conventions.md +26 -0
  29. package/packages/skills/laravel-nova-patterns/references/scope.md +30 -0
  30. package/packages/skills/laravel-nova-patterns/references/workflow.md +36 -0
  31. package/packages/skills/nextauth-patterns/SKILL.md +48 -0
  32. package/packages/skills/nextauth-patterns/references/conventions.md +33 -0
  33. package/packages/skills/nextauth-patterns/references/scope.md +33 -0
  34. package/packages/skills/nextauth-patterns/references/workflow.md +46 -0
  35. package/packages/skills/nx-tag-conventions/SKILL.md +32 -0
  36. package/packages/skills/package-manager-yarn4-pnpm89/SKILL.md +41 -0
  37. package/packages/skills/package-manager-yarn4-pnpm89/references/conventions.md +25 -0
  38. package/packages/skills/package-manager-yarn4-pnpm89/references/scope.md +30 -0
  39. package/packages/skills/package-manager-yarn4-pnpm89/references/workflow.md +39 -0
  40. package/packages/skills/qliro-patterns/SKILL.md +48 -0
  41. package/packages/skills/qliro-patterns/references/conventions.md +28 -0
  42. package/packages/skills/qliro-patterns/references/scope.md +30 -0
  43. package/packages/skills/qliro-patterns/references/workflow.md +46 -0
  44. package/packages/skills/react-router-v7-patterns/SKILL.md +47 -0
  45. package/packages/skills/react-router-v7-patterns/references/conventions.md +30 -0
  46. package/packages/skills/react-router-v7-patterns/references/scope.md +32 -0
  47. package/packages/skills/react-router-v7-patterns/references/workflow.md +43 -0
  48. package/{library/global → packages}/skills/request/scripts/korning.mjs +1 -1
  49. package/packages/skills/strapi-patterns/SKILL.md +63 -0
  50. package/packages/skills/strapi-patterns/references/conventions.md +33 -0
  51. package/packages/skills/strapi-patterns/references/scope.md +29 -0
  52. package/packages/skills/strapi-patterns/references/workflow.md +47 -0
  53. package/packages/skills/vendure-app-patterns/SKILL.md +44 -0
  54. package/packages/skills/vendure-app-patterns/references/conventions.md +25 -0
  55. package/packages/skills/vendure-app-patterns/references/scope.md +29 -0
  56. package/packages/skills/vendure-app-patterns/references/workflow.md +45 -0
  57. package/packages/skills/vendure-plugin-patterns/SKILL.md +55 -0
  58. package/packages/skills/vendure-plugin-patterns/references/conventions.md +27 -0
  59. package/packages/skills/vendure-plugin-patterns/references/scope.md +30 -0
  60. package/packages/skills/vendure-plugin-patterns/references/workflow.md +42 -0
  61. package/packages/skills/whats-installed/SKILL.md +53 -0
  62. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/SKILL.md +41 -0
  63. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/conventions.md +25 -0
  64. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/scope.md +28 -0
  65. package/packages/skills/wordpress-acf-elementor-jetengine-patterns/references/workflow.md +41 -0
  66. package/packages/skills/wordpress-bedrock-patterns/SKILL.md +41 -0
  67. package/packages/skills/wordpress-bedrock-patterns/references/conventions.md +27 -0
  68. package/packages/skills/wordpress-bedrock-patterns/references/scope.md +28 -0
  69. package/packages/skills/wordpress-bedrock-patterns/references/workflow.md +42 -0
  70. package/packages/skills/writing-documentation/SKILL.md +161 -0
  71. package/packages/skills/writing-documentation/references/claude-template-workspace.md +60 -0
  72. package/packages/skills/writing-documentation/references/claude-template.md +43 -0
  73. package/packages/skills/writing-documentation/references/completeness-criteria.md +26 -0
  74. package/packages/skills/writing-documentation/references/summary-template.md +81 -0
  75. package/packages/skills/writing-documentation/references/topic-file-formats.md +125 -0
  76. package/packages/skills/writing-documentation/references/validation-checklist.md +42 -0
  77. package/packages/templates/agentic-workflow-poc.md +180 -0
  78. package/packages/templates/agentic-workflow-standard.md +160 -0
  79. package/packages/templates/decision-template.md +27 -0
  80. package/packages/templates/decisions-ci-gate.yml +32 -0
  81. package/packages/templates/lefthook-branch-guard.yml +27 -0
  82. package/packages/templates/lefthook-lighthouse.yml +28 -0
  83. package/packages/templates/lefthook-quality.yml +34 -0
  84. package/packages/templates/lefthook-security.yml +27 -0
  85. package/packages/templates/start-here.md +72 -0
  86. /package/{library/global → packages}/agents/request-assessor.md +0 -0
  87. /package/{library/global → packages}/agents/request-design-reviewer.md +0 -0
  88. /package/{library/global → packages}/agents/request-designer.md +0 -0
  89. /package/{library/global → packages}/agents/request-scorer.md +0 -0
  90. /package/{library/global → packages}/agents/request-specifier-eskalerad.md +0 -0
  91. /package/{library/global → packages}/agents/request-specifier.md +0 -0
  92. /package/{library/global → packages}/skills/haus-workflow/SKILL.md +0 -0
  93. /package/{library/global → packages}/skills/haus-workflow/references/clone.md +0 -0
  94. /package/{library/global → packages}/skills/haus-workflow/references/init.md +0 -0
  95. /package/{library/global → packages}/skills/haus-workflow/references/new.md +0 -0
  96. /package/{library/global → packages}/skills/request/SKILL.md +0 -0
  97. /package/{library/global → packages}/skills/request/scripts/archive.mjs +0 -0
  98. /package/{library/global → packages}/skills/request/scripts/bedom.mjs +0 -0
  99. /package/{library/global → packages}/skills/request/scripts/check-lasta.mjs +0 -0
  100. /package/{library/global → packages}/skills/request/scripts/compare-scores.mjs +0 -0
  101. /package/{library/global → packages}/skills/request/scripts/contract-check.mjs +0 -0
  102. /package/{library/global → packages}/skills/request/scripts/kontroll.mjs +0 -0
  103. /package/{library/global → packages}/skills/request/scripts/lib.mjs +0 -0
  104. /package/{library/global → packages}/skills/request/scripts/precheck.mjs +0 -0
  105. /package/{library/global → packages}/skills/request/scripts/ref-hash.mjs +0 -0
  106. /package/{library/global → packages}/skills/request/scripts/report.mjs +0 -0
  107. /package/{library/global → packages}/skills/request/scripts/resolve-anchors.mjs +0 -0
  108. /package/{library/global → packages}/skills/request/scripts/svep.mjs +0 -0
  109. /package/{library/global → packages}/skills/request-assess-impact/SKILL.md +0 -0
  110. /package/{library/global → packages}/skills/request-score/SKILL.md +0 -0
  111. /package/{library/global → packages}/skills/request-score/references/poangskala.md +0 -0
  112. /package/{library/global → packages}/skills/request-sync/SKILL.md +0 -0
  113. /package/{library/global → packages}/skills/request-write-spec/SKILL.md +0 -0
  114. /package/{library/global → packages}/skills/request-write-spec/references/specformat.md +0 -0
  115. /package/{library/global → packages}/skills/slack-cowork/SKILL.md +0 -0
  116. /package/{library/global → packages}/skills/slack-cowork/references/canvas-markdown.md +0 -0
  117. /package/{library/global → packages}/skills/slack-cowork/references/synk.md +0 -0
@@ -0,0 +1,32 @@
1
+ # Paste under `jobs:` in `.github/workflows/ci.yml` (sibling to `build:` / `test:`).
2
+ # Prerequisite: `haus` on PATH — e.g. `npm install -g @haus-tech/haus-workflow@latest`.
3
+ #
4
+ # Trivial-change carve-outs (dep bumps, lockfile-only, catalog sync) live in the
5
+ # CLI `haus decisions check` algorithm — not in this job fragment.
6
+ #
7
+ # Optional lefthook pre-commit — merge under `pre-commit.commands` in lefthook.yml:
8
+ #
9
+ # decisions-check:
10
+ # run: haus decisions check --staged
11
+ # fail_text: 'Staged change needs an ADR. Run `haus decisions suggest`.'
12
+
13
+ decisions-gate:
14
+ if: github.event_name == 'pull_request'
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+ - uses: actions/setup-node@v4
21
+ with:
22
+ node-version: '22'
23
+ - name: Install haus CLI
24
+ run: npm install -g @haus-tech/haus-workflow@latest
25
+ - name: Require ADR for decision-worthy changes
26
+ env:
27
+ PR_BODY: ${{ github.event.pull_request.body }}
28
+ BASE_REF: ${{ github.event.pull_request.base.ref }}
29
+ run: |
30
+ set -euo pipefail
31
+ git fetch --no-tags origin "$BASE_REF"
32
+ haus decisions check --range "origin/$BASE_REF..HEAD"
@@ -0,0 +1,27 @@
1
+ # Lefthook branch guard — deterministic backing for the workflow standard's
2
+ # "NEVER work directly on `main`" rule (agentic-workflow-standard.md, NEVER rules).
3
+ #
4
+ # `permissions.deny` in `.claude/settings.json` can only match tool-call patterns;
5
+ # it cannot express "which branch is checked out". This hook can: it fails any
6
+ # commit made while a protected branch is checked out. Copy to the repo root as
7
+ # `lefthook.yml` (or merge into an existing one), then run `lefthook install`.
8
+ #
9
+ # Escape hatches — for repos that intentionally commit straight to main:
10
+ # - opt out per repo: git config haus.allowProtectedCommits true
11
+ # - change the guard list: export HAUS_PROTECTED_BRANCHES="main master release"
12
+ # Detached HEAD (e.g. mid-rebase) is always allowed: those commits are not made
13
+ # "on" any branch, and blocking them would break rebase itself.
14
+ pre-commit:
15
+ commands:
16
+ branch-guard:
17
+ run: |
18
+ if [ "$(git config --get haus.allowProtectedCommits)" = "true" ]; then exit 0; fi
19
+ branch="$(git branch --show-current)"
20
+ [ -z "$branch" ] && exit 0
21
+ for protected in ${HAUS_PROTECTED_BRANCHES:-main master}; do
22
+ if [ "$branch" = "$protected" ]; then
23
+ echo "Refusing to commit directly on protected branch '$branch'."
24
+ exit 1
25
+ fi
26
+ done
27
+ fail_text: 'Direct commits on this branch are blocked (NEVER work directly on main). Create a branch first: `git checkout -b feat/<slug>`. If this repo intentionally commits to main, opt out once with `git config haus.allowProtectedCommits true`.'
@@ -0,0 +1,28 @@
1
+ # Lefthook Lighthouse pre-push: a performance gate for web front ends.
2
+ #
3
+ # Builds the production front end and runs Lighthouse CI (`lhci autorun`) against it
4
+ # before a push that touches front-end files, so a change that slows a page down stops
5
+ # before the PR, not after the deploy. The limits, the URLs and the server command live
6
+ # in `lighthouserc.yml` at the project root (`haus configs haus.lighthouserc` writes a
7
+ # starter).
8
+ #
9
+ # Setup:
10
+ # 1. Add the runner as a dev dependency: `npm install -D @lhci/cli` (or pnpm/yarn add -D).
11
+ # 2. Merge the `lighthouse` command below into the project's `lefthook.yml`.
12
+ # 3. REPLACE `glob` with the front end's source paths and `run` with its build command.
13
+ # Keep `/**` at the end of a folder glob: in Lefthook's default matcher `src/**/*`
14
+ # skips files directly under `src/`. With pnpm use `pnpm exec lhci autorun`, with Yarn
15
+ # `yarn lhci autorun`. In a monorepo, set `root:` to the app folder that holds
16
+ # `lighthouserc.yml`.
17
+ # 4. Add `.lighthouseci/` (the local reports) to `.gitignore`.
18
+ #
19
+ # The numbers are lab numbers from this machine. PageSpeed Insights runs the same lab test
20
+ # from Google's servers, so its score differs, and its field data (28 days of real
21
+ # visitors) no local run can see. The limits catch a regression; they do not promise a
22
+ # public score. Lighthouse needs Chrome installed, or CHROME_PATH set.
23
+ pre-push:
24
+ commands:
25
+ lighthouse:
26
+ glob: 'src/**'
27
+ run: npm run build && npm exec -- lhci autorun
28
+ fail_text: 'The Lighthouse gate failed. A build or server error (a port in use, a missing Chrome) is named in the lines above: fix it and push again. A broken limit is listed with its audit, value and limit: open the HTML report in .lighthouseci/ to see what got slower, fix it and push again. A limit that is wrong for this project changes in lighthouserc.yml in the same PR, with the reason in the PR body.'
@@ -0,0 +1,34 @@
1
+ # Lefthook quality pre-commit — lint, typecheck, and format gates for haus projects.
2
+ #
3
+ # Installable counterpart of the workflow standard's "Pre-commit hooks" section
4
+ # (agentic-workflow-standard.md): gate every commit on typecheck + lint + format,
5
+ # gate unit tests on pre-push. Copy to the repo root as `lefthook.yml` (or merge
6
+ # into an existing one), then run `lefthook install`.
7
+ #
8
+ # The `run:` commands below are Node-flavoured defaults. REPLACE each one with this
9
+ # project's real command (e.g. `composer lint`, `ruff check .`, `go vet ./...`,
10
+ # `dotnet format --verify-no-changes`) and delete any gate the project cannot back
11
+ # with a real command — a hook that runs the wrong command either blocks every
12
+ # commit or passes without checking anything.
13
+ #
14
+ # Write `fail_text` for the agent that reads it: name the exact fix command.
15
+ pre-commit:
16
+ parallel: true
17
+ commands:
18
+ lint:
19
+ run: npm run lint
20
+ fail_text: 'Lint failed. Run the lint fixer (e.g. `npm run lint -- --fix`), re-stage, then commit.'
21
+ typecheck:
22
+ run: npm run typecheck
23
+ fail_text: 'Type errors found. Fix all type errors before committing.'
24
+ format:
25
+ run: npm run format:check
26
+ fail_text: 'Formatting drift found. Run the formatter (e.g. `npm run format`), re-stage, then commit.'
27
+
28
+ # Unit tests are gated on pre-push, not pre-commit (too slow per-commit).
29
+ # Never gate E2E suites in hooks.
30
+ pre-push:
31
+ commands:
32
+ test:
33
+ run: npm test
34
+ fail_text: 'Unit tests failed. Fix the failures before pushing.'
@@ -0,0 +1,27 @@
1
+ # Lefthook security pre-commit — commit-time secret scanning for haus projects.
2
+ #
3
+ # Complements haus's runtime PreToolUse guards + settings.json permissions.deny
4
+ # (which gate the agent in real time) with a commit-time net. Copy to the repo
5
+ # root as `lefthook.yml` (or merge into an existing one), then run `lefthook install`.
6
+ #
7
+ # gitleaks is optional but recommended (https://github.com/gitleaks/gitleaks#installing):
8
+ # when present it does the heavy lifting; the grep baseline below always runs.
9
+ pre-commit:
10
+ parallel: true
11
+ commands:
12
+ gitleaks:
13
+ # Runs only when gitleaks is installed — a missing binary never fails the commit.
14
+ run: |
15
+ if command -v gitleaks >/dev/null 2>&1; then
16
+ gitleaks protect --staged --redact --no-banner
17
+ fi
18
+ fail_text: 'gitleaks found a likely secret in staged changes. Remove it, re-stage, and commit. Install gitleaks: https://github.com/gitleaks/gitleaks#installing'
19
+ secret-grep:
20
+ # Always-on baseline. Scans ADDED lines only (ignores removed lines, so
21
+ # deleting a leaked secret is never blocked) for inline credential assignments.
22
+ run: |
23
+ added="$(git diff --cached --no-color -U0 | grep -E '^\+' | grep -vE '^\+\+\+')"
24
+ if printf '%s\n' "$added" | grep -iqE "(password|secret|token|api_key)[[:space:]]*[:=][[:space:]]*['\"]"; then
25
+ exit 1
26
+ fi
27
+ fail_text: 'A staged line looks like an inline credential (password/secret/token/api_key). Move it to an environment variable or secret manager, then re-stage.'
@@ -0,0 +1,72 @@
1
+ # Start here — a guide for everyone on this project
2
+
3
+ > You do not need to be a developer to use this page. If words like
4
+ > "repository" or "pull request" are new to you, the glossary at the bottom
5
+ > is written for you.
6
+
7
+ ## What is this?
8
+
9
+ This project is set up with **haus**, an internal Haus tool. haus gives the
10
+ project's AI assistant (Claude Code) a set of ready-made instructions: how
11
+ this codebase works, what good work looks like here, and which rules the team
12
+ follows. Think of it as an employee handbook written for the AI — so everyone
13
+ who works with the assistant gets consistent, correct help, whatever their
14
+ role.
15
+
16
+ ## What can I do with it?
17
+
18
+ Open Claude Code in this project and ask for what you need in plain language
19
+ — your own words, in any language. You cannot break anything by asking
20
+ questions: reading and explaining change nothing, and changes to the project
21
+ itself only take effect after a person on the team has reviewed and accepted
22
+ them.
23
+
24
+ Good first things to ask:
25
+
26
+ - **"What is installed here, and what can I ask for?"** — you get a menu of
27
+ what the assistant knows how to help with in this project.
28
+ - **"Explain what this project does, in plain language."**
29
+ - **"What has changed in the project recently?"**
30
+ - **"Help me turn this idea into a description the developers can act on."**
31
+ - **"Walk me through this error message"** — or this page, or this file.
32
+
33
+ You do not need to know the correct technical term for anything. Describe
34
+ what you want in your own words; finding the right tool is the assistant's
35
+ job, not yours.
36
+
37
+ ## What did haus actually set up?
38
+
39
+ A few folders inside the project. All of them are safe to ignore in daily
40
+ work — this list exists so none of it looks mysterious:
41
+
42
+ | Where | What it is |
43
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
44
+ | `.claude/skills/` | Step-by-step guides the assistant follows for specific kinds of work (testing, reviewing, writing docs, …) |
45
+ | `.claude/agents/` | Specialist helpers the assistant can hand a task to — they work on their own and report back |
46
+ | `.claude/rules/` | House rules the assistant applies automatically while it works |
47
+ | `.claude/templates/` | Ready-made document skeletons — this guide is one of them |
48
+ | `.haus-workflow/WORKFLOW.md` | The engineering rulebook: how code is planned, tested, and reviewed. Written for developers and the AI — you never need to read it |
49
+
50
+ ## Glossary
51
+
52
+ | Word | What it means |
53
+ | --------------------- | ------------------------------------------------------------------------------------------------------ |
54
+ | **Repository** (repo) | The project's shared folder: every file, plus the full history of every change ever made |
55
+ | **Commit** | One saved change, with a note saying what changed and why |
56
+ | **Branch** | A working copy inside the repository where changes are prepared without touching the live version |
57
+ | **Pull request** (PR) | A proposed set of changes, presented for review before it is accepted |
58
+ | **Merge** | Accepting a pull request into the main version of the project |
59
+ | **CI** | Automatic checks that run on every proposed change — tests, style, safety — before a person reviews it |
60
+ | **Issue** | A tracked to-do on the project's GitHub page: a bug report, an idea, or a task |
61
+ | **Skill** | A step-by-step guide the AI assistant follows for a certain kind of task |
62
+ | **Agent** | A helper the assistant can delegate a task to; it works independently and reports back |
63
+ | **Claude Code** | The AI assistant tool this project uses |
64
+ | **haus** | The internal Haus tool that installed — and keeps updated — everything described on this page |
65
+
66
+ ## Where to learn more
67
+
68
+ - Ask the assistant. "What can I ask for?" is always a good start.
69
+ - The Haus Workflow documentation site:
70
+ <https://wearehaustech.github.io/docs/haus-workflow/>
71
+ - Any developer on the team — this setup is shared across Haus projects, so
72
+ everyone works with the same pieces.