Run gstack on local and non-Claude models via a pi harness
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- javascript, typescript
调研方向
Start by reading harnesses/claude-code/harness.json, the existing harness files, and model-roles.md to understand the current contract. The issue proposes a pi harness, capability requirements for skills, and possibly a ticket runner, but leaves key design choices and pi behavior unresolved. First settle the extension versus generated agent files and missing capability behavior; done means those decisions are tested against a running pi install and the selected scope is implemented.
由索引模型根据 Issue 内容生成。
描述
Problem
Every gstack subagent runs on a Claude model. The Claude Code harness only accepts opus, sonnet, haiku and fable as models (harnesses/claude-code/harness.json), because those are the only values its Agent tool's model takes. That rules out two things:
- Cheap or local workers. Mechanical roles like
swarm workers,how explorerandwhy investigatorscan't run on a hosted budget model or a local model on a desktop GPU. - Real model diversity.
interrogate,arenaandarchitectrely on reviewers from different model families. In Claude Code they're all Claude, asPLAN.mdalready notes.
gstack's skills are written in harness-neutral language, so in principle another harness could fill this gap. In practice, they also assume capabilities that the token layer can't supply.
Idea
Add a pi harness that can run local and non-Claude models, and make the capability contract that gstack's skills already assume explicit.
| Where | What |
|---|---|
harness.json + skill frontmatter |
A capabilities list per harness and a requires list per skill (subagents, parallel, per-spawn-model, transcripts, loop). The build drops or fails a skill whose requirements a harness doesn't meet, instead of shipping a swarm that silently runs serially. |
New pi extension in harnesses/pi/ |
A fork of pi's example subagent extension that takes a model (and a thinking level, if pi supports one per call) on each task. model-roles.md then works unchanged: look up the role, read the override file, pass the model on the spawn. |
harnesses/pi/ |
tokens.md with pi's paths and session format, harness.json with pi model IDs (local llama.cpp models alongside hosted ones), models.md defaults, and agent overlays for go-agent and comment-sicko. |
models.md for pi |
Run the parent and the judgment roles on a strong hosted model. Put swarm workers and the explorer and investigator roles on a local model. Fill the interrogate, arena and architect lists with models from different vendors. |
What each harness provides
| Capability gstack assumes | Claude Code | Pi |
|---|---|---|
| Spawn subagents with their own context | Agent tool | The example subagent extension (each subagent is a separate pi process) |
| Run them in parallel and collect results | Background agents | The extension's parallel mode: up to 8 tasks, 4 at a time |
| Choose a model for each spawn | model and effort args |
Gap. The model is set in each agent file's frontmatter |
| Give each writer its own checkout | isolation: "worktree" |
None, but the runner can run git worktree add itself |
| Ask the user a structured question | AskUserQuestion | None. The skills already fall back to plain text |
Read past session transcripts (recall, reflect, ketchup) |
~/.claude/projects |
Pi's own session files |
Repeat a command ({{loop_command}}) |
/loop |
None |
Interim: an autonomous ticket runner
Until the harness exists, a plain script can run local workers with Claude as the reviewer:
- Take the next
ready-for-agentticket whose blockers are closed (from/to-tickets). - Create a git worktree for it.
- Run
pi -pwith a local model to implement the ticket. - Run typecheck, lint and tests.
- Only if those pass, run
claude -pwith/gstack:interrogate. - On a pass, push and open a draft PR. Otherwise, send the findings back to step 3 (at most 2 rounds), then relabel the ticket
ready-for-human.
Cron or a systemd timer starts it. The script drives the steps, not a Claude session, so frontier tokens are spent only on reviewing work that already passed the cheap checks.
Findings
- Per-spawn model choice is the main gap. Claude Code passes the model on each call. Pi's subagent extension sets it per agent definition. The defined agents load from
~/.pi/agent/agents/*.md, or from.pi/agents/*.mdwhen the project scope is enabled. - Generating one pi agent file per role from
models.mdwould avoid the extension work. The cost is that every change to the override file would need a rebuild. - Running local workers in parallel won't make them faster. On one GPU,
llama-server --parallel Ndivides the throughput and context between N slots, so only a few local workers can usefully run at once. interrogateasks the user when it's unsure of the intent. A headless run needs the ticket reference in the worker's commit messages and in the prompt.- Pi runs commands without asking for permission by default. Workers need a container or a separate user with no push credentials. The runner script does the pushing.
Nothing has been checked against a running pi install yet.
Open questions
- Extension or generated agent files? Is a pi extension that gstack has to maintain worth it, compared with generated agent files that need a rebuild after each override change?
- Effort mapping. Does pi let a spawn set the thinking level? If not, what does
effortmean on pi? - Pi skill loading. Does pi respect
disable-model-invocation? What's its syntax for invoking a skill by slash command, and what shouldskillPrefixbe set to? - Transcripts. What's the format of pi's session files, and is it good enough for
recall,reflectandketchup? - Loop. Should
{{loop_command}}be stubbed on pi, or replaced with an external timer? - Missing capabilities. When a harness lacks a capability, does the build drop the skill, fail, or ship it with a stub that says what's missing?
- Local model choice. Which local model and quantization actually complete gstack worker tasks reliably? This should be measured on real tickets with
benchmark-checklist, not taken from leaderboards. - Parent model on pi. Which strong hosted model runs
go-modeand the judgment roles, and under which billing (API key vs. subscription)? - Order. Should the ticket runner come first to collect data on how well local models do, or the capability contract?
Next step
Hold a grilling session on the open questions, starting with extension vs. generated agent files and what the build does when a capability is missing. Then write the capability contract, since it pays off even without pi.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 3 小时 33 分钟
- 30 天内合并 PR
- 13
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gregogun/gstack 的其他 Issue
-
ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
ready-for-agent
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ready-for-human
难度 4/5 3-5 天 新手友好度 43/100
维护者通常 1 天内回复
-
ready-for-agent
难度 3/5 1-2 天 新手友好度 56/100
维护者通常 1 天内回复
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 73/100
openclaw/openclaw#182077 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
aikido high security
难度 2/5 1-3 小时 新手友好度 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand mark可能已有人在做 @eric8810 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
lyswhut/lx-music-desktop#3026 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
abhigyanpatwari/GitNexus#3704 ·
维护者通常 1 天内回复