docs(archive): preserve PR #4803#4842
Closed
AceHack wants to merge 2 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Archives the full discussion from PR #4803 into docs/pr-discussions/ for long-term provenance, and also updates the local Cursor “Riven” launchd tick script to use the newer agent chat --mode ask gate invocation.
Changes:
- Add a PR-preservation markdown capture for PR #4803 under
docs/pr-discussions/. - Update
.cursor/bin/riven-loop-tick.tsto run the gate viaagent chat --mode ask --model grok-4.3and simplify the prompt path.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/pr-discussions/PR-4803-feat-tools-apply-tooling-changes-decomposed-from-4767.md | New preserved PR discussion archive for PR #4803 (frontmatter + full thread capture). |
| .cursor/bin/riven-loop-tick.ts | Adjusts the Cursor Riven loop’s “agent gate” invocation and prompt flow. |
Comment on lines
200
to
+212
| if (elapsed >= agentIntervalMs) { | ||
| const prNum = Number(prCount) || 0; | ||
| const workMode = prNum === 0 ? "pickup" : "drain"; | ||
| agentStatus = "running"; | ||
| log(`riven work cycle start run_id=${runId} mode=${workMode} open_prs=${prNum}`); | ||
| log(`riven agent gate start run_id=${runId}`); | ||
|
|
||
| if (dryRun) { | ||
| log(`dry-run: would run riven ${workMode}`); | ||
| log(`dry-run: would run agent gate`); | ||
| agentStatus = "dry-run"; | ||
| } else { | ||
| let prompt: string; | ||
| if (workMode === "pickup") { | ||
| const pickup = run("bun", ["tools/backlog/autonomous-pickup.ts", "--json"], 30_000); | ||
| let executionPrompt = ""; | ||
| try { | ||
| const selection = JSON.parse(pickup.stdout); | ||
| executionPrompt = selection.executionPrompt ?? ""; | ||
| log(`pickup selected: ${selection.selected?.id ?? "none"} action=${selection.action ?? "none"}`); | ||
| } catch { log(`pickup parse error: ${pickup.stderr.slice(0, 200)}`); } | ||
|
|
||
| const preamble = [ | ||
| `You are Rivens background worker in Lucent-Financial-Group/Zeta.`, | ||
| `BEFORE ANY WORK: 1) Read CLAUDE.md and AGENTS.md for repo conventions.`, | ||
| `2) Run "bun tools/github/refresh-worldview.ts" to get current state.`, | ||
| `3) Read active trajectories at docs/trajectories/*/RESUME.md.`, | ||
| `4) Build gate: "dotnet build -c Release" must end with 0 warnings 0 errors.`, | ||
| `KEY RULES: TS over bash (Rule 0). Prefer F#/TS code over docs.`, | ||
| `Always re-decompose items during the build — assume decomposition has mistakes.`, | ||
| ].join(" "); | ||
|
|
||
| prompt = executionPrompt.length > 0 | ||
| ? `${preamble} YOUR TASK:\n${executionPrompt}` | ||
| : `${preamble} No backlog items available. Run refresh-worldview, check for stale classifications, fix them, open a PR.`; | ||
| } else { | ||
| prompt = [ | ||
| `You are Rivens background worker in Lucent-Financial-Group/Zeta.`, | ||
| `Read CLAUDE.md first. Run "bun tools/github/refresh-worldview.ts".`, | ||
| `Build gate: "dotnet build -c Release" (0 warnings).`, | ||
| `TASK: ${prNum} open PRs. Run "bun tools/github/poll-pr-gate-batch.ts --all-open".`, | ||
| `For any PR where gate=BLOCKED and nextAction=resolve-threads:`, | ||
| `check out branch, read review comments, fix code issues, push,`, | ||
| `reply to threads, resolve via GraphQL, arm auto-merge`, | ||
| `(gh pr merge NUMBER --auto --squash). Own your PRs through merge.`, | ||
| ].join(" "); | ||
| } | ||
|
|
||
| const gate = run("cursor-agent", [ | ||
| "-p", | ||
| const gate = run("agent", [ | ||
| "chat", | ||
| "--mode", "ask", | ||
| "--model", "grok-4.3", | ||
| prompt, | ||
| [ |
Member
Author
|
Closing this in favor of a single batched PR for archiving. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR preserves the discussion from PR #4803.