@haystackeditor/cli 0.12.1 → 0.12.3

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.
@@ -7,19 +7,20 @@ These rules govern how LLM agents should interact with this codebase. They are e
7
7
  **Always use `haystack submit` instead of `gh pr create` or GitHub API.**
8
8
 
9
9
  ```bash
10
- # Auto-merge queue (default) - PR merges automatically if Haystack approves
10
+ # Default submit - creates the PR from the current branch
11
11
  haystack submit
12
12
 
13
13
  # Request Haystack review - for complex/uncertain changes
14
14
  haystack submit --review
15
15
  ```
16
16
 
17
- This routes your PR through the Haystack auto-merge queue:
18
- 1. Haystack analyzes your changes
19
- 2. If approved: auto-merged
20
- 3. If issues found: routed for review with feedback
17
+ This routes your PR through Haystack's submit workflow:
18
+ 1. Haystack runs pre-PR triage on your changes
19
+ 2. Pushes the current branch and creates the PR
20
+ 3. Waits for analysis results by default
21
+ 4. Auto-merges only if the repo has auto-merge enabled and the PR is approved
21
22
 
22
- Do NOT use `gh pr create` - it bypasses the auto-merge queue.
23
+ Do NOT use `gh pr create` - it bypasses Haystack's submit workflow.
23
24
 
24
25
  After submitting, use `haystack triage <pr-number>` to check analysis results (rating, findings, agent fix prompts). Use `--json` for machine-readable output.
25
26
 
@@ -14,7 +14,7 @@ if [ -n "$current_branch" ] && [ "$current_branch" != "main" ] && [ "$current_br
14
14
  # Check if this is an AI agent session (set by agent-context detector)
15
15
  if [ -n "$HAYSTACK_AGENT_SESSION" ] || [ -n "$CLAUDE_CODE" ] || [ -n "$CODEX_CLI" ] || [ -n "$CODEX_SHELL" ] || [ -n "$CODEX_THREAD_ID" ] || [ -n "$CODEX_CI" ]; then
16
16
  echo ""
17
- echo "💡 Tip: Use 'haystack submit' to create PRs through the auto-merge queue."
17
+ echo "💡 Tip: Use 'haystack submit' to create PRs through Haystack's submit workflow."
18
18
  echo " This enables automatic analysis and merge when approved."
19
19
  echo ""
20
20
  fi
@@ -6,20 +6,20 @@
6
6
 
7
7
  ## Why Use Haystack Submit?
8
8
 
9
- When you create PRs through Haystack, they enter the **auto-merge queue**:
9
+ When you create PRs through Haystack, the CLI keeps PR creation inside Haystack's analysis workflow:
10
10
 
11
- 1. **Haystack analyzes** your changes automatically
12
- 2. **If approved**: PR is marked ready-to-merge and merged automatically
13
- 3. **If issues found**: PR is routed for review with detailed feedback
14
-
15
- This is faster than waiting for human review on every change.
11
+ 1. **Runs pre-PR triage** on your current branch
12
+ 2. **Pushes that branch** to origin
13
+ 3. **Creates the PR** on GitHub
14
+ 4. **Waits for Haystack analysis** by default
15
+ 5. **Applies auto-merge** only if the repo has it enabled in `.haystack.json`
16
16
 
17
17
  ---
18
18
 
19
19
  ## Command Reference
20
20
 
21
21
  ```bash
22
- # Default: Submit to auto-merge queue
22
+ # Default: Submit current branch and create the PR
23
23
  haystack submit
24
24
 
25
25
  # Optional alpha auto-fix for straightforward mechanical issues
@@ -53,9 +53,9 @@ haystack submit --body-file /tmp/pr-body.md
53
53
 
54
54
  ## When to Use Each Mode
55
55
 
56
- ### Auto-Merge (Default)
56
+ ### Default Submit
57
57
 
58
- Use for straightforward changes that don't need human review:
58
+ Use for straightforward changes that don't need explicit human review:
59
59
 
60
60
  - Bug fixes with clear scope
61
61
  - Small features with tests
@@ -67,6 +67,8 @@ Use for straightforward changes that don't need human review:
67
67
  haystack submit
68
68
  ```
69
69
 
70
+ If the repo has `preferences.auto_merge` enabled in `.haystack.json`, the PR will also enter the auto-merge queue.
71
+
70
72
  ### Auto-Fix (Alpha, Discouraged)
71
73
 
72
74
  > **Do NOT default to `--auto-fix`.** It is an alpha feature.
@@ -86,8 +88,8 @@ haystack submit --auto-fix
86
88
  ### Review Mode
87
89
 
88
90
  > **Do NOT use `--review` unless the user explicitly asks for human review.**
89
- > The default auto-merge queue already runs full Haystack analysis. Using `--review`
90
- > blocks auto-merge until a human approves, which delays merging unnecessarily.
91
+ > Plain `haystack submit` already runs full Haystack analysis. Using `--review`
92
+ > blocks auto-merge when auto-merge is enabled, which delays merging unnecessarily.
91
93
 
92
94
  Use `--review` only when the user specifically requests human review:
93
95
 
@@ -107,8 +109,7 @@ haystack submit --review
107
109
  3. **Submit** via Haystack: `haystack submit`
108
110
 
109
111
  Haystack will:
110
- - Create a `haystack/<your-branch>` branch
111
- - Push to origin
112
+ - Push your current branch to origin
112
113
  - Create the PR with appropriate labels
113
114
  - Trigger analysis automatically
114
115
 
@@ -130,7 +131,7 @@ This uses GitHub device flow - no tokens to copy/paste.
130
131
 
131
132
  - **Always use `haystack submit`** instead of `gh pr create` when working in Haystack-enabled repos
132
133
  - Prefer plain `haystack submit` by default; use `--auto-fix` only as an explicit alpha opt-in for straightforward mechanical issues
133
- - The command creates a `haystack/` prefixed branch automatically
134
+ - The command uses your current branch as the PR head
134
135
  - Labels are applied automatically based on your chosen mode
135
136
  - You don't need to push manually - the command handles it
136
137
  - Use `haystack triage <pr>` to view full analysis results (rating, findings, agent fix prompts) for any PR at any time
@@ -150,13 +151,9 @@ Haystack Submit
150
151
  ✓ Repository: acme/webapp
151
152
  Current branch: fix-auth
152
153
  Base branch: main
153
- Submission type: Auto-merge queue
154
-
155
- Creating branch haystack/fix-auth...
156
- ✓ Created branch: haystack/fix-auth
157
154
  ✓ Branch pushed
158
155
  ✓ Pull request created: #142
159
- Applied label: haystack:auto-merge
156
+ Auto-merge enabled for this PR
160
157
 
161
158
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
162
159
 
@@ -164,9 +161,8 @@ Pull Request Created!
164
161
 
165
162
  URL: https://github.com/acme/webapp/pull/142
166
163
  Title: Fix session expiry handling
167
- Branch: haystack/fix-auth → main
168
- Type: Auto-merge queue
169
- Label: haystack:auto-merge
164
+ Branch: fix-auth → main
165
+ Merge: Auto-merge if safe
170
166
 
171
167
  Haystack will analyze this PR and:
172
168
  • Auto-merge if approved
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ const program = new Command();
38
38
  program
39
39
  .name('haystack')
40
40
  .description('Haystack CLI — automated PR review, triage, and merge queue')
41
- .version('0.12.1');
41
+ .version('0.12.3');
42
42
  program
43
43
  .command('init')
44
44
  .description('Create .haystack.json configuration')
@@ -117,8 +117,9 @@ Pre-PR Triage:
117
117
  straightforward mechanical issues.
118
118
 
119
119
  Review Routing:
120
- By default, PRs enter the auto-merge queue and merge automatically once
121
- Haystack analysis passes. This is the correct default for most PRs.
120
+ If repo auto-merge is enabled in .haystack.json, plain \`haystack submit\`
121
+ enters the auto-merge queue after submission. Otherwise it still runs the
122
+ same Haystack analysis workflow without enabling auto-merge.
122
123
 
123
124
  ⚠ --auto-fix is currently alpha and discouraged by default. Prefer plain
124
125
  haystack submit unless you explicitly want the sandbox fixer to attempt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haystackeditor/cli",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "Set up Haystack for your project — automated PR review, triage, and merge queue",
5
5
  "type": "module",
6
6
  "bin": {