@glrs-dev/cli 2.1.0 → 2.3.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 (59) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{chunk-SB3MLROC.js → chunk-MIWZLETC.js} +7 -2
  3. package/dist/cli.js +1 -1
  4. package/dist/lib/auto-update.js +1 -1
  5. package/dist/vendor/harness-opencode/dist/agents/prompts/build.md +34 -4
  6. package/dist/vendor/harness-opencode/dist/agents/prompts/build.open.md +18 -4
  7. package/dist/vendor/harness-opencode/dist/agents/prompts/code-reviewer-thorough.md +77 -0
  8. package/dist/vendor/harness-opencode/dist/agents/prompts/code-reviewer.md +80 -0
  9. package/dist/vendor/harness-opencode/dist/agents/prompts/code-reviewer.open.md +68 -0
  10. package/dist/vendor/harness-opencode/dist/agents/prompts/debriefer.md +55 -0
  11. package/dist/vendor/harness-opencode/dist/agents/prompts/gap-analyzer.md +2 -0
  12. package/dist/vendor/harness-opencode/dist/agents/prompts/plan-reviewer.md +5 -1
  13. package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +119 -10
  14. package/dist/vendor/harness-opencode/dist/agents/prompts/prime.md +149 -88
  15. package/dist/vendor/harness-opencode/dist/agents/prompts/research-auto.md +1 -1
  16. package/dist/vendor/harness-opencode/dist/agents/prompts/research-local.md +1 -1
  17. package/dist/vendor/harness-opencode/dist/agents/prompts/research-web.md +1 -1
  18. package/dist/vendor/harness-opencode/dist/agents/prompts/research.md +2 -0
  19. package/dist/vendor/harness-opencode/dist/agents/prompts/scoper.md +129 -0
  20. package/dist/vendor/harness-opencode/dist/agents/prompts/spec-reviewer.md +53 -0
  21. package/dist/vendor/harness-opencode/dist/agents/prompts/spec-reviewer.open.md +56 -0
  22. package/dist/vendor/harness-opencode/dist/agents/shared/index.ts +1 -0
  23. package/dist/vendor/harness-opencode/dist/agents/shared/ui-evaluation-ladder.md +50 -0
  24. package/dist/vendor/harness-opencode/dist/agents/shared/workflow-mechanics.md +5 -5
  25. package/dist/vendor/harness-opencode/dist/autopilot/prompt-template.md +104 -0
  26. package/dist/vendor/harness-opencode/dist/chunk-GCWHRUOK.js +259 -0
  27. package/dist/vendor/harness-opencode/dist/chunk-MJSMBY2Y.js +87 -0
  28. package/dist/vendor/harness-opencode/dist/chunk-NIFAVPNN.js +544 -0
  29. package/dist/vendor/harness-opencode/dist/{chunk-VJUETC6A.js → chunk-PDMXYZM4.js} +53 -1
  30. package/dist/vendor/harness-opencode/dist/cli.js +1596 -1964
  31. package/dist/vendor/harness-opencode/dist/commands/prompts/fresh.md +27 -24
  32. package/dist/vendor/harness-opencode/dist/commands/prompts/review.md +3 -3
  33. package/dist/vendor/harness-opencode/dist/commands/prompts/ship.md +2 -0
  34. package/dist/vendor/harness-opencode/dist/index.js +188 -633
  35. package/dist/vendor/harness-opencode/dist/loop-session-J35NILUZ.js +30 -0
  36. package/dist/vendor/harness-opencode/dist/opencode-server-KPCDFYAX.js +22 -0
  37. package/dist/vendor/harness-opencode/dist/plan-parser-TMHEKT22.js +6 -0
  38. package/dist/vendor/harness-opencode/dist/plan-session-7VS32P52.js +117 -0
  39. package/dist/vendor/harness-opencode/dist/scoper-S77SOK7X.js +326 -0
  40. package/dist/vendor/harness-opencode/dist/skills/adversarial-review-rubric/SKILL.md +47 -0
  41. package/dist/vendor/harness-opencode/dist/skills/code-quality/SKILL.md +1 -1
  42. package/dist/vendor/harness-opencode/dist/skills/root-cause-diagnosis/SKILL.md +24 -0
  43. package/dist/vendor/harness-opencode/dist/skills/spear-protocol/SKILL.md +167 -0
  44. package/dist/vendor/harness-opencode/package.json +1 -1
  45. package/package.json +3 -1
  46. package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-assessor.md +0 -77
  47. package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-builder.md +0 -40
  48. package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-planner.md +0 -56
  49. package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-scoper.md +0 -58
  50. package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.md +0 -68
  51. package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.open.md +0 -58
  52. package/dist/vendor/harness-opencode/dist/agents/prompts/qa-thorough.md +0 -63
  53. package/dist/vendor/harness-opencode/dist/bin/plan-check.sh +0 -255
  54. package/dist/vendor/harness-opencode/dist/chunk-6CZPRUMJ.js +0 -869
  55. package/dist/vendor/harness-opencode/dist/chunk-DZG4D3OH.js +0 -54
  56. package/dist/vendor/harness-opencode/dist/chunk-OYRKOEXK.js +0 -88
  57. package/dist/vendor/harness-opencode/dist/commands/prompts/autopilot.md +0 -96
  58. package/dist/vendor/harness-opencode/dist/install-6775ZBDG.js +0 -13
  59. package/dist/vendor/harness-opencode/dist/paths-WZ23ZQOV.js +0 -18
@@ -43,7 +43,7 @@ What `/fresh` DOES do, in order:
43
43
  5. **Capture state** — `OLD_BRANCH`, unpushed commits.
44
44
  6. **Dispatch to the reset strategy** — hook present+executable → hook; otherwise (or `--skip-hook`) → built-in flow.
45
45
  7. **Print a compact summary** — **Do NOT tell the user to `cd` — they're already there.**
46
- 8. **Start the PRIME on the new task immediately** — in the SAME turn, begin the PRIME arc (Phase 0Phase 1 → …) on the user's original request. Do NOT stop after the summary and wait for the user to type "work on it." `/fresh` is "re-key and go," not "re-key and wait."
46
+ 8. **Start the PRIME on the new task immediately** — in the SAME turn, begin the PRIME arc (Bootstrap Scope Plan → …) on the user's original request. Do NOT stop after the summary and wait for the user to type "work on it." `/fresh` is "re-key and go," not "re-key and wait."
47
47
 
48
48
  ## Architectural principle: who owns what
49
49
 
@@ -102,7 +102,7 @@ To detect the tracked-vs-untracked split from `git status --porcelain`:
102
102
  - Lines starting with ` M`, `M `, `MM`, `A `, `D `, ` D`, `R `, `C `, `U ` (or any non-`??` prefix) = tracked changes present
103
103
  - Lines starting with `??` = untracked; run `git check-ignore --stdin` across them to split gitignored-debris from intentional-new-files
104
104
 
105
- **Why safety gates are owned by `/fresh`, not the hook:** the `question` tool is available only to the PRIME agent; a bash hook cannot prompt. To keep `--yes` abort semantics deterministic (which autopilot relies on) and interactive-mode confirmations coherent, all dirty-tree gating runs in `/fresh` BEFORE dispatching to either path. The dispatch target (hook or built-in) always runs against a tree that either is clean, is only gitignored debris cleared for `git clean -fdx`, or has been confirmed-for-discard by the user.
105
+ **Why safety gates are owned by `/fresh`, not the hook:** the `question` tool is available only to the PRIME agent; a bash hook cannot prompt. To keep `--yes` abort semantics deterministic (which unattended loops like `glrs oc autopilot` rely on) and interactive-mode confirmations coherent, all dirty-tree gating runs in `/fresh` BEFORE dispatching to either path. The dispatch target (hook or built-in) always runs against a tree that either is clean, is only gitignored debris cleared for `git clean -fdx`, or has been confirmed-for-discard by the user.
106
106
 
107
107
  ## 2. Derive the new branch name
108
108
 
@@ -296,12 +296,12 @@ Recover previous work: git checkout <OLD_BRANCH>
296
296
  This is the piece that makes `/fresh` feel like "re-key and go" instead of "re-key and wait." After printing the summary, DO NOT stop and wait for a follow-up message. Continue in the same turn:
297
297
 
298
298
  1. **Treat the user's original input (plus any tracker context you resolved in §2) as the new PRIME input** — same as if the user had just typed that request as a fresh prompt.
299
- 2. **Enter the PRIME arc from the top** — Phase 0 bootstrap probe, then Phase 1 intent classification, then Phase 1.5 framing (substantial requests only), etc.
300
- 3. **Do not re-prompt for confirmation of the task itself.** The user's request is already in hand. In `--confirm` mode you've already gated on discard; in default mode you haven't, but that's fine — the PRIME's own safety gates (e.g., the Phase 1.5 framing confirmation for low-confidence substantial requests) are the right place for task-level clarifiers, not a `/fresh` meta-prompt.
299
+ 2. **Enter the PRIME arc from the top** — Bootstrap probe, then Scope (intent classification + framing for substantial requests), etc.
300
+ 3. **Do not re-prompt for confirmation of the task itself.** The user's request is already in hand. In `--confirm` mode you've already gated on discard; in default mode you haven't, but that's fine — the PRIME's own safety gates (e.g., the Scope framing confirmation for low-confidence substantial requests) are the right place for task-level clarifiers, not a `/fresh` meta-prompt.
301
301
 
302
302
  **Why in the same turn:** the user ran `/fresh <task>` expecting work to start, not a checkpoint. One command, one turn, one uninterrupted transition from old task to new.
303
303
 
304
- **Interaction with `--yes` (autopilot sequence mode):** same behavior. `/fresh --yes <ref>` re-keys and continues inline into the PRIME arc on the new ref. `/autopilot`'s sequence loop drives the iteration — `/fresh` hands off to the PRIME in the same turn, the PRIME runs plan → build → verify → STOP, and the outer `/autopilot` loop pops the next ref.
304
+ **Interaction with `--yes` (unattended-loop mode):** same behavior. `/fresh --yes <ref>` re-keys and continues inline into the PRIME arc on the new ref. When invoked from inside an unattended loop (e.g., `glrs oc autopilot` driving a multi-issue prompt), the agent calls `/fresh --yes` between issues from within its own session — `/fresh` hands off to the PRIME, the PRIME runs plan → build → verify → STOP, and control returns to the outer loop.
305
305
 
306
306
  **Exception — abort paths:** if `/fresh` aborts in §0 (not in a worktree), §1 (empty input), §3 (`--yes` + dirty tracked), or §3 (`--no-discard` + dirty), DO NOT enter §7. The whole point of an abort is that no work should start. Print the abort message and stop.
307
307
 
@@ -330,34 +330,37 @@ This is the piece that makes `/fresh` feel like "re-key and go" instead of "re-k
330
330
  | 7 (PRIME kickoff) | Reset produced a WARNING status | Continue to §7, but make sure the warning banner is visible to the user before work starts | Same | Same |
331
331
  | 7 (PRIME kickoff) | `/fresh` aborted earlier (no worktree, empty input, --yes + dirty tracked, --no-discard + dirty) | Do NOT enter §7 — print abort message and stop | Same | Same |
332
332
 
333
- ## Integration with `/autopilot` (sequence-of-issues mode)
333
+ ## Integration with unattended-loop callers
334
334
 
335
- When the user runs `/autopilot` with a project / milestone / queue reference, the autopilot command sequences through multiple issues and invokes `/fresh <ref> --yes` between each one. The contract across that boundary:
335
+ When the user runs an unattended loop like `glrs oc autopilot "<multi-issue prompt>"`, the loop re-sends the same prompt each iteration and the agent (PRIME) decides what to do. For multi-issue workflows, the agent typically calls `/fresh --yes <next-ref>` from inside its session to isolate each issue on its own branch. The contract across that boundary:
336
336
 
337
- **From autopilot's side** (before calling `/fresh`):
337
+ **From the agent's side** (before calling `/fresh`):
338
338
 
339
- - Autopilot pops the next ref from its queue.
340
- - Autopilot pre-checks whether that ref already has an open or merged PR (via `gh pr list --search <ref>` or Linear MCP). If yes, skip silently, log, and pop the next ref. `/fresh` is not invoked for already-shipped work.
341
- - Autopilot calls `/fresh <ref> --yes` only when the ref is genuinely open.
339
+ - The agent decides which issue to work on next based on the prompt.
340
+ - Before invoking `/fresh --yes`, the agent should verify the target ref is genuinely open (e.g., `gh pr list --search <ref>` or `linear_get_issue`). Already-shipped refs should be skipped.
341
+ - The agent calls `/fresh --yes <ref>` only when the ref is genuinely open.
342
342
 
343
343
  **From `/fresh`'s side** (this command):
344
344
 
345
- - `--yes` suppresses every `question`-tool prompt. Autopilot cannot respond to them.
346
- - If the working tree has tracked changes or untracked non-gitignored files, `/fresh --yes` aborts. Autopilot treats this as a **hard stop** for the sequence, not "try next issue" — dirty tracked work means something went wrong in the previous iteration that requires human attention. This safety gate is owned by `/fresh`, not the reset strategy, which is what makes `--yes` abort semantics deterministic across repos (a hook cannot override them).
347
- - On success, `/fresh --yes` continues inline into the PRIME arc on the new ref (§7). The PRIME runs plan → build → verify → STOP. Control returns to `/autopilot`'s outer sequence loop, which pops the next ref and calls `/fresh --yes` again.
345
+ - `--yes` suppresses every `question`-tool prompt the unattended caller can't respond to them.
346
+ - If the working tree has tracked changes or untracked non-gitignored files, `/fresh --yes` aborts. An unattended caller treats this as a **hard stop** — dirty tracked work means something went wrong that requires human attention. This safety gate is owned by `/fresh`, not the reset strategy, which is what makes `--yes` abort semantics deterministic across repos (a hook cannot override them).
347
+ - On success, `/fresh --yes` continues inline into the PRIME arc on the new ref (§7). The PRIME runs plan → build → verify → STOP for that issue. The agent can then loop internally to the next issue.
348
348
 
349
- **Sequence-loop shape:**
349
+ **Shape:**
350
350
 
351
351
  ```
352
- autopilot queue → autopilot pops ref → /fresh <ref> --yes → /fresh re-keys:
353
- - discards tree (via hook or built-in)
354
- - fetches base, checks out new branch
355
- - prints summary
356
- - CONTINUES INLINE into PRIME (§7):
357
- runs Phase 0 1 1.5 → …
358
- plan build verify STOP
359
- autopilot sees acceptance criteria all [x],
360
- pops next ref, loops
352
+ outer loop (e.g., glrs oc autopilot)
353
+ sends the same prompt to PRIME each iteration
354
+ agent decides: "need to re-key for the next issue"
355
+ agent calls /fresh --yes <ref>
356
+ /fresh re-keys the worktree:
357
+ - discards tree (via hook or built-in)
358
+ - fetches base, checks out new branch
359
+ - prints summary
360
+ - CONTINUES INLINE into PRIME (§7):
361
+ runs Bootstrap → Scope → Plan → … → plan → build → verify → STOP
362
+ → agent completes the issue's SPEAR arc
363
+ → agent either loops to next issue or emits <autopilot-done>
361
364
  ```
362
365
 
363
366
  ## Hook contract, for repo authors
@@ -35,12 +35,12 @@ If the scope is ambiguous after the classifier (rare), make the most-likely pick
35
35
 
36
36
  ## 3. Run the review
37
37
 
38
- Delegate to `@qa-reviewer` with:
38
+ Delegate to `@code-reviewer` with:
39
39
  - The resolved target (e.g., "PR #1234" or "current branch ahead of main")
40
40
  - The intent baseline (tracker issue body + acceptance criteria, or PR description, or "no stated intent")
41
- - A directive: "Review this as PR-style adversarial analysis — not vs a specific plan. Output structured FAIL findings (file:line + specific issue) or PASS with summary."
41
+ - A directive: "Review this as PR-style adversarial analysis — not vs a specific plan. Output structured findings (file:line + specific issue) or PASS with summary."
42
42
 
43
- If `@qa-reviewer` returns `[PASS]`, accept it. If `[FAIL]`, that's your finding list.
43
+ If `@code-reviewer` returns `[PASS]`, accept it. If `[LOOP-TO-PLAN]` or `[FIX-INLINE]`, those are your finding lists.
44
44
 
45
45
  For any finding flagged as security-sensitive or architecture-level (new service boundary, new entity, new auth path, public API shape change), also delegate to `@architecture-advisor` for a second opinion. Include its recommendation in the report.
46
46
 
@@ -2,6 +2,8 @@
2
2
  description: Finalize, commit, squash, push, and open a PR for QA-passed changes. Handles both single-commit and multi-commit (hybrid-autonomy) flows.
3
3
  ---
4
4
 
5
+ **`/ship` is a resume/re-entry path.** PRIME's Resolve stage auto-ships after Assess passes — so in a normal SPEAR session you won't need to invoke `/ship` manually. Use `/ship` when: (a) the session was interrupted before Resolve ran, (b) Resolve errored mid-flight (push failed, PR creation failed), or (c) you want to manually trigger the ship pipeline. If a PR is already open for the current branch, this command reports the PR URL and stops (no-op).
6
+
5
7
  The plan at $ARGUMENTS has passed QA review. Ship it.
6
8
 
7
9
  **User invoking `/ship` IS the approval.** Execute the pipeline end-to-end without asking for per-step permission. Commits, pushes, and PR creation are not destructive — they're the whole point of this command. Only stop for genuinely unexpected states (see "Stop conditions" at the bottom).