@glrs-dev/cli 2.0.1 → 2.2.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.
- package/CHANGELOG.md +8 -0
- package/dist/chunk-SB3MLROC.js +113 -0
- package/dist/cli.js +21 -0
- package/dist/lib/auto-update.d.ts +23 -0
- package/dist/lib/auto-update.js +7 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/build.md +18 -4
- package/dist/vendor/harness-opencode/dist/agents/prompts/build.open.md +18 -4
- package/dist/vendor/harness-opencode/dist/agents/prompts/{qa-thorough.md → code-reviewer-thorough.md} +34 -19
- package/dist/vendor/harness-opencode/dist/agents/prompts/code-reviewer.md +80 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/code-reviewer.open.md +68 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/gap-analyzer.md +2 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan-reviewer.md +3 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +23 -4
- package/dist/vendor/harness-opencode/dist/agents/prompts/prime.md +146 -87
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-auto.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-local.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/research-web.md +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/research.md +2 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/spec-reviewer.md +54 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/spec-reviewer.open.md +57 -0
- package/dist/vendor/harness-opencode/dist/agents/shared/index.ts +1 -0
- package/dist/vendor/harness-opencode/dist/agents/shared/ui-evaluation-ladder.md +50 -0
- package/dist/vendor/harness-opencode/dist/agents/shared/workflow-mechanics.md +5 -5
- package/dist/vendor/harness-opencode/dist/autopilot/prompt-template.md +80 -0
- package/dist/vendor/harness-opencode/dist/{chunk-VJUETC6A.js → chunk-PDMXYZM4.js} +53 -1
- package/dist/vendor/harness-opencode/dist/cli.js +1333 -1646
- package/dist/vendor/harness-opencode/dist/commands/prompts/fresh.md +27 -24
- package/dist/vendor/harness-opencode/dist/commands/prompts/review.md +3 -3
- package/dist/vendor/harness-opencode/dist/commands/prompts/ship.md +2 -0
- package/dist/vendor/harness-opencode/dist/index.js +106 -627
- package/dist/vendor/harness-opencode/dist/skills/adversarial-review-rubric/SKILL.md +47 -0
- package/dist/vendor/harness-opencode/dist/skills/code-quality/SKILL.md +1 -1
- package/dist/vendor/harness-opencode/dist/skills/root-cause-diagnosis/SKILL.md +24 -0
- package/dist/vendor/harness-opencode/dist/skills/spear-protocol/SKILL.md +166 -0
- package/dist/vendor/harness-opencode/package.json +1 -1
- package/package.json +1 -1
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-assessor.md +0 -77
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-builder.md +0 -40
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-planner.md +0 -56
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-scoper.md +0 -58
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.md +0 -68
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.open.md +0 -58
- package/dist/vendor/harness-opencode/dist/chunk-6CZPRUMJ.js +0 -869
- package/dist/vendor/harness-opencode/dist/chunk-DZG4D3OH.js +0 -54
- package/dist/vendor/harness-opencode/dist/chunk-OYRKOEXK.js +0 -88
- package/dist/vendor/harness-opencode/dist/commands/prompts/autopilot.md +0 -96
- package/dist/vendor/harness-opencode/dist/install-6775ZBDG.js +0 -13
- 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 (
|
|
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
|
|
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** —
|
|
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
|
|
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` (
|
|
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
|
|
333
|
+
## Integration with unattended-loop callers
|
|
334
334
|
|
|
335
|
-
When the user runs
|
|
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
|
|
337
|
+
**From the agent's side** (before calling `/fresh`):
|
|
338
338
|
|
|
339
|
-
-
|
|
340
|
-
-
|
|
341
|
-
-
|
|
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
|
|
346
|
-
- If the working tree has tracked changes or untracked non-gitignored files, `/fresh --yes` aborts.
|
|
347
|
-
- On success, `/fresh --yes` continues inline into the PRIME arc on the new ref (§7). The PRIME runs plan → build → verify → STOP
|
|
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
|
-
**
|
|
349
|
+
**Shape:**
|
|
350
350
|
|
|
351
351
|
```
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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 `@
|
|
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
|
|
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 `@
|
|
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).
|